Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73c307173b | ||
|
|
8239aad928 | ||
|
|
5612636b29 | ||
|
|
6f162b6d15 | ||
|
|
ca1cfb7575 | ||
|
|
8005cc6c1c | ||
|
|
20c751a7b5 | ||
|
|
60a8fe7361 | ||
|
|
1489deb618 | ||
|
|
2f180d5178 | ||
|
|
e9739cacf5 | ||
|
|
c8c531db17 | ||
|
|
5c67c608bc | ||
|
|
ebe6595f81 | ||
|
|
0408cb3ef6 | ||
|
|
fe26033a9f | ||
|
|
4499e0b816 | ||
|
|
c6dd5eac67 | ||
|
|
c65df5c741 | ||
|
|
073c80e781 | ||
|
|
6b0edf0752 | ||
|
|
cd909ede83 | ||
|
|
eb070953c0 | ||
|
|
2995383d63 | ||
|
|
983dbda3e6 | ||
|
|
240f2d227d | ||
|
|
2052b189f2 | ||
|
|
d37a6a865a | ||
|
|
a2a949be8f | ||
|
|
305f05bade | ||
|
|
ec2e110bd7 | ||
|
|
7cbb226416 | ||
|
|
1e53287927 | ||
|
|
3cc2f1e019 | ||
|
|
db63ace4b0 | ||
|
|
b80b7205e9 | ||
|
|
61273b78b9 | ||
|
|
de639c808c | ||
|
|
8fa58c7010 | ||
|
|
bd6db202ab | ||
|
|
b7fb67d975 | ||
|
|
9c5bf7f854 | ||
|
|
fcb5d20ef1 | ||
|
|
87d767d4ff | ||
|
|
23cc635971 | ||
|
|
b5722c27b6 | ||
|
|
f56acf5a76 |
32
App.vue
@@ -1,4 +1,5 @@
|
||||
|
||||
|
||||
<script>
|
||||
/**
|
||||
* vuex管理登录状态,具体可以参考官方登录模板示例
|
||||
@@ -15,6 +16,35 @@ export default {
|
||||
config,
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听返回
|
||||
*/
|
||||
onBackPress(e) {
|
||||
if (e.from == "backbutton") {
|
||||
let routes = getCurrentPages();
|
||||
let curRoute = routes[routes.length - 1].options;
|
||||
routes.forEach((item) => {
|
||||
if (
|
||||
item.route == "pages/tabbar/cart/cartList" ||
|
||||
item.route.indexOf("pages/product/goods") != -1
|
||||
) {
|
||||
uni.redirectTo({
|
||||
url: item.route,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (curRoute.addId) {
|
||||
uni.reLaunch({
|
||||
url: "/pages/tabbar/cart/cartList",
|
||||
});
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
return true; //阻止默认返回行为
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(["login"]),
|
||||
},
|
||||
@@ -22,6 +52,7 @@ export default {
|
||||
// #ifdef APP-PLUS
|
||||
this.checkArguments(); // 检测启动参数
|
||||
APPUpdate();
|
||||
|
||||
// 重点是以下: 一定要监听后台恢复 !一定要
|
||||
plus.globalEvent.addEventListener("newintent", (e) => {
|
||||
this.checkArguments(); // 检测启动参数
|
||||
@@ -34,7 +65,6 @@ export default {
|
||||
this.getClipboard();
|
||||
// #endif
|
||||
},
|
||||
|
||||
methods: {
|
||||
// TODO 开屏广告 后续优化添加
|
||||
launch() {
|
||||
|
||||
@@ -1,25 +1,9 @@
|
||||
/**
|
||||
* 公共API
|
||||
*/
|
||||
import storage from "@/utils/storage.js"
|
||||
import {http, Method} from '@/utils/request.js';
|
||||
import api from '@/config/api.js';
|
||||
|
||||
/**
|
||||
* 获取图片验证码URL
|
||||
* @param type
|
||||
* @param uuid
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getValidateCodeUrl(type, uuid) {
|
||||
if (!type) {
|
||||
return '';
|
||||
}
|
||||
if (!uuid) {
|
||||
uuid = storage.getUuid()
|
||||
}
|
||||
return `${api.base}/captchas/${uuid}/${type}?r=${new Date().getTime()}`;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
143
api/members.js
@@ -1,28 +1,55 @@
|
||||
import storage from "@/utils/storage"
|
||||
import {http, Method} from '@/utils/request.js';
|
||||
|
||||
|
||||
import storage from "@/utils/storage";
|
||||
import { http, Method } from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 意见反馈
|
||||
*/
|
||||
export function feedBack(params) {
|
||||
export function feedBack(params) {
|
||||
return http.request({
|
||||
url: '/feedback',
|
||||
url: "/feedback",
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 提现
|
||||
export function withdrawalApply(params) {
|
||||
return http.request({
|
||||
url: "/members/wallet/withdrawal",
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付结果查询
|
||||
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
|
||||
* @param sn 订单编号
|
||||
*/
|
||||
export function payCallback(params) {
|
||||
return http.request({
|
||||
url: `/cashier/result`,
|
||||
method: Method.GET,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 在线充值
|
||||
export function recharge(params) {
|
||||
return http.request({
|
||||
url: "/trade/recharge",
|
||||
method: Method.POST,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取预存款充值记录
|
||||
* @param params
|
||||
*/
|
||||
export function getUserRecharge(params) {
|
||||
export function getUserRecharge(params) {
|
||||
return http.request({
|
||||
url: "/member/recharge",
|
||||
method: Method.GET,
|
||||
@@ -35,7 +62,7 @@ import {http, Method} from '@/utils/request.js';
|
||||
* 分页获取预存款充值记录
|
||||
* @param params
|
||||
*/
|
||||
export function getWalletLog(params) {
|
||||
export function getWalletLog(params) {
|
||||
return http.request({
|
||||
url: "/wallet/log",
|
||||
method: Method.GET,
|
||||
@@ -44,16 +71,13 @@ import {http, Method} from '@/utils/request.js';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取优惠券列表
|
||||
* @param params
|
||||
*/
|
||||
export function getCoupons(params) {
|
||||
return http.request({
|
||||
url: '/promotion/coupon/getCoupons',
|
||||
url: "/promotion/coupon/getCoupons",
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params,
|
||||
@@ -79,14 +103,13 @@ export function receiveCoupons(couponId) {
|
||||
*/
|
||||
export function getPointsData(params) {
|
||||
return http.request({
|
||||
url: 'member/memberPointsHistory/getByPage',
|
||||
url: "member/memberPointsHistory/getByPage",
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取我的评论列表
|
||||
* @param params
|
||||
@@ -94,7 +117,7 @@ export function getPointsData(params) {
|
||||
*/
|
||||
export function getComments(params) {
|
||||
return http.request({
|
||||
url: '/memberEvaluation',
|
||||
url: "/memberEvaluation",
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params,
|
||||
@@ -108,26 +131,23 @@ export function getComments(params) {
|
||||
*/
|
||||
export function getFootprintNum(params) {
|
||||
return http.request({
|
||||
url: '/footprint/getFootprintNum',
|
||||
url: "/footprint/getFootprintNum",
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 订单评论
|
||||
* @param params
|
||||
*/
|
||||
export function commentsMemberOrder(params) {
|
||||
return http.request({
|
||||
url: '/memberEvaluation',
|
||||
url: "/memberEvaluation",
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
header:{'content-type':"application/x-www-form-urlencoded"},
|
||||
header: { "content-type": "application/x-www-form-urlencoded" },
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
@@ -138,30 +158,30 @@ export function commentsMemberOrder(params) {
|
||||
*/
|
||||
export function AppendCommentsOrder(params) {
|
||||
return http.request({
|
||||
url: 'members/comments/additional',
|
||||
url: "members/comments/additional",
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
header:{'content-type':"application/x-www-form-urlencoded"},
|
||||
header: { "content-type": "application/x-www-form-urlencoded" },
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
// TODO 第一版本暂未实现此功能
|
||||
/**
|
||||
/**
|
||||
* 商品咨询
|
||||
* @param goods_id
|
||||
* @param ask_content
|
||||
*/
|
||||
export function consultating(goods_id, ask_content,anonymous) {
|
||||
export function consultating(goods_id, ask_content, anonymous) {
|
||||
return http.request({
|
||||
url: 'members/asks',
|
||||
url: "members/asks",
|
||||
method: Method.POST,
|
||||
header:{'content-type':"application/x-www-form-urlencoded"},
|
||||
header: { "content-type": "application/x-www-form-urlencoded" },
|
||||
needToken: true,
|
||||
data: {
|
||||
goods_id,
|
||||
ask_content,
|
||||
anonymous
|
||||
anonymous,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -171,7 +191,7 @@ export function consultating(goods_id, ask_content,anonymous) {
|
||||
* @param params
|
||||
* @returns {AxiosPromise}
|
||||
*/
|
||||
export function getGoodsCollection(params,type) {
|
||||
export function getGoodsCollection(params, type) {
|
||||
return http.request({
|
||||
url: `/member/collection/${type}`,
|
||||
method: Method.GET,
|
||||
@@ -182,23 +202,18 @@ export function getGoodsCollection(params,type) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 收藏商品
|
||||
* @returns {AxiosPromise}
|
||||
*/
|
||||
export function collectionGoods(id,type) {
|
||||
export function collectionGoods(id, type) {
|
||||
return http.request({
|
||||
url: `/member/collection/add/${type}/${id}`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除商品收藏
|
||||
* @param ids 收藏ID【集合或单个商品ID】
|
||||
@@ -206,7 +221,7 @@ export function collectionGoods(id,type) {
|
||||
*/
|
||||
export function deleteGoodsCollection(ids) {
|
||||
if (Array.isArray(ids)) {
|
||||
ids = ids.join(',');
|
||||
ids = ids.join(",");
|
||||
}
|
||||
return http.request({
|
||||
url: `/member/collection/delete/GOODS/${ids}`,
|
||||
@@ -219,7 +234,7 @@ export function deleteGoodsCollection(ids) {
|
||||
* 获取商品是否被收藏
|
||||
* @param good_id
|
||||
*/
|
||||
export function getGoodsIsCollect(good_id,type) {
|
||||
export function getGoodsIsCollect(good_id, type) {
|
||||
return http.request({
|
||||
url: `/member/collection/isCollection/${type}/${good_id}`,
|
||||
method: Method.GET,
|
||||
@@ -228,7 +243,6 @@ export function getGoodsIsCollect(good_id,type) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 收藏店铺
|
||||
* @param store_id 店铺ID
|
||||
@@ -236,10 +250,10 @@ export function getGoodsIsCollect(good_id,type) {
|
||||
*/
|
||||
export function collectionStore(store_id) {
|
||||
return http.request({
|
||||
url: 'members/collection/store',
|
||||
header:{'content-type':"application/x-www-form-urlencoded"},
|
||||
url: "members/collection/store",
|
||||
header: { "content-type": "application/x-www-form-urlencoded" },
|
||||
method: Method.POST,
|
||||
data: {store_id},
|
||||
data: { store_id },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -255,14 +269,13 @@ export function deleteStoreCollection(store_id) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前登录的用户信息
|
||||
* @returns {AxiosPromise}
|
||||
*/
|
||||
export function getUserInfo() {
|
||||
export function getUserInfo() {
|
||||
return http.request({
|
||||
url: '/members',
|
||||
url: "/members",
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
});
|
||||
@@ -274,7 +287,7 @@ export function deleteStoreCollection(store_id) {
|
||||
*/
|
||||
export function getUserWallet() {
|
||||
return http.request({
|
||||
url: '/members/wallet',
|
||||
url: "/members/wallet",
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
});
|
||||
@@ -287,30 +300,27 @@ export function getUserWallet() {
|
||||
*/
|
||||
export function saveUserInfo(params) {
|
||||
return http.request({
|
||||
url: '/members/editOwn',
|
||||
url: "/members/editOwn",
|
||||
method: Method.PUT,
|
||||
header:{'content-type':"application/x-www-form-urlencoded"},
|
||||
header: { "content-type": "application/x-www-form-urlencoded" },
|
||||
needToken: true,
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加发票
|
||||
* @param params
|
||||
*/
|
||||
export function addReceipt(params) {
|
||||
return http.request({
|
||||
url: '/trade/receipt',
|
||||
url: "/trade/receipt",
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取商品评论列表
|
||||
* @param goodsId
|
||||
@@ -337,7 +347,6 @@ export function getGoodsCommentsCount(goodsId) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取未读消息数量信息
|
||||
*/
|
||||
@@ -345,21 +354,21 @@ export function getNoReadMessageNum() {
|
||||
return http.request({
|
||||
url: `members/member-nocice-logs/number`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
})
|
||||
needToken: true,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的足迹列表
|
||||
* @param pageNumber pageSize
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function myTrackList(params) {
|
||||
return http.request({
|
||||
url: `/footprint`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -371,42 +380,42 @@ export function deleteHistoryListId(ids) {
|
||||
return http.request({
|
||||
url: `/footprint/delByIds/${ids}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
})
|
||||
needToken: true,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前会员优惠券列表
|
||||
* @param
|
||||
* @param
|
||||
*/
|
||||
export function getMemberCoupons(data) {
|
||||
return http.request({
|
||||
url: `/promotion/coupon/getCoupons`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params:data
|
||||
})
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前会员可使用的优惠券数量
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function getCouponsNum() {
|
||||
return http.request({
|
||||
url: `/promotion/coupon/getCouponsNum`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
})
|
||||
needToken: true,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员积分VO
|
||||
* @param
|
||||
* @param
|
||||
*/
|
||||
export function getMemberPointSum() {
|
||||
return http.request({
|
||||
url: `member/memberPointsHistory/getMemberPointsHistoryVO`,
|
||||
method: Method.GET
|
||||
})
|
||||
method: Method.GET,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -67,15 +67,28 @@ export function getLogisticsMessages(params) {
|
||||
|
||||
|
||||
/**
|
||||
* TODO 获取版本更新信息 暂无此功能。后续会优化更新
|
||||
* @param appType
|
||||
* @returns {AxiosPromise}
|
||||
*
|
||||
*/
|
||||
export function getAppVersionList(appType) {
|
||||
export function getAppVersion(appType) {
|
||||
return http.request({
|
||||
url: `/appVersion/${appType}`,
|
||||
method: Method.GET,
|
||||
type:"manager"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param appType
|
||||
* @returns {AxiosPromise}
|
||||
*
|
||||
*/
|
||||
export function getAppVersionList(type,data) {
|
||||
return http.request({
|
||||
url: `/appVersion/appVersion/${type}`,
|
||||
method: Method.GET,
|
||||
type:"manager",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
/**
|
||||
* 促销相关API
|
||||
*/
|
||||
import {http, Method} from '@/utils/request.js';
|
||||
import { http, Method } from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 获取当前直播列表
|
||||
*
|
||||
* @param {*}
|
||||
* @returns
|
||||
*/
|
||||
export function getLiveList(params) {
|
||||
return http.request({
|
||||
url: `broadcast/studio`,
|
||||
method: Method.GET,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前拼团活动的未成团的会员
|
||||
@@ -14,24 +27,22 @@ export function getPromotionGroupMember(pintuanId) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** 获取拼团列表 */
|
||||
export function getAssembleList(params) {
|
||||
return http.request({
|
||||
url: 'promotion/pintuan',
|
||||
url: "promotion/pintuan",
|
||||
method: Method.GET,
|
||||
loading: false,
|
||||
params
|
||||
})
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取积分商城分类
|
||||
*/
|
||||
export function getPointsCategory() {
|
||||
return http.request({
|
||||
url: '/promotion/pointsGoods/category',
|
||||
url: "/promotion/pointsGoods/category",
|
||||
method: Method.GET,
|
||||
});
|
||||
}
|
||||
@@ -42,7 +53,7 @@ export function getPointsCategory() {
|
||||
*/
|
||||
export function getPointsGoods(params) {
|
||||
return http.request({
|
||||
url: '/promotion/pointsGoods',
|
||||
url: "/promotion/pointsGoods",
|
||||
method: Method.GET,
|
||||
params,
|
||||
});
|
||||
@@ -53,7 +64,7 @@ export function getPointsGoods(params) {
|
||||
*/
|
||||
export function getSeckillTimeLine() {
|
||||
return http.request({
|
||||
url: 'promotion/seckill',
|
||||
url: "promotion/seckill",
|
||||
method: Method.GET,
|
||||
});
|
||||
}
|
||||
@@ -75,7 +86,7 @@ export function getSeckillTimeGoods(timeline) {
|
||||
*/
|
||||
export function getAllCoupons(params) {
|
||||
return http.request({
|
||||
url: '/promotion/coupon',
|
||||
url: "/promotion/coupon",
|
||||
method: Method.GET,
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
uni.share({
|
||||
provider: "weixin",
|
||||
scene: scene,
|
||||
href: configs.downloadLink + this.link,
|
||||
href: configs.shareLink + this.link,
|
||||
imageUrl: this.thumbnail,
|
||||
type: 0,
|
||||
summary: this.goodsName,
|
||||
|
||||
343
components/popups/popups.vue
Normal file
@@ -0,0 +1,343 @@
|
||||
<template>
|
||||
<view class="shadow" :class="!show?'':'shadow-show'" :style="{backgroundColor:show?maskBg:'rgba(0,0,0,0)'}" @tap="tapMask">
|
||||
<view class="popups" :class="[theme]" :style="{top: popupsTop ,left: popupsLeft,flexDirection:direction}">
|
||||
<text :class="dynPlace" :style="{width:'0px',height:'0px'}" v-if="triangle"></text>
|
||||
<view v-for="(item,index) in popData" :key="index" @tap.stop="tapItem(item)" class="itemChild view" :class="[direction=='row'?'solid-right':'solid-bottom',item.disabled?'disabledColor':'']">
|
||||
<u-icon size="35" :name="item.icon" v-if="item.icon"></u-icon><span class="title">{{item.title}}</span>
|
||||
</view>
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
maskBg: {
|
||||
type: String,
|
||||
default: "rgba(0,0,0,0)",
|
||||
},
|
||||
placement: {
|
||||
type: String,
|
||||
default: "default", //default top-start top-end bottom-start bottom-end
|
||||
},
|
||||
direction: {
|
||||
type: String,
|
||||
default: "column", //column row
|
||||
},
|
||||
x: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
y: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
popData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
theme: {
|
||||
type: String,
|
||||
default: "light", //light dark
|
||||
},
|
||||
dynamic: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
gap: {
|
||||
type: Number,
|
||||
default: 20,
|
||||
},
|
||||
triangle: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
popupsTop: "0rpx",
|
||||
popupsLeft: "0rpx",
|
||||
show: false,
|
||||
dynPlace: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.popupsPosition();
|
||||
},
|
||||
methods: {
|
||||
tapMask() {
|
||||
this.$emit("input", !this.value);
|
||||
},
|
||||
tapItem(item) {
|
||||
if (item.disabled) return;
|
||||
this.$emit("tapPopup", item);
|
||||
this.$emit("input", !this.value);
|
||||
},
|
||||
getStatusBar() {
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
uni.getSystemInfo({
|
||||
success: function (e) {
|
||||
let customBar;
|
||||
// #ifdef H5
|
||||
|
||||
customBar = e.statusBarHeight + e.windowTop;
|
||||
|
||||
// #endif
|
||||
resolve(customBar);
|
||||
},
|
||||
});
|
||||
});
|
||||
return promise;
|
||||
},
|
||||
async popupsPosition() {
|
||||
let statusBar = await this.getStatusBar();
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
let popupsDom = uni.createSelectorQuery().in(this).select(".popups");
|
||||
popupsDom
|
||||
.fields(
|
||||
{
|
||||
size: true,
|
||||
},
|
||||
(data) => {
|
||||
let width = data.width;
|
||||
let height = data.height;
|
||||
|
||||
|
||||
|
||||
let y = this.dynamic
|
||||
? this.dynamicGetY(this.y, this.gap)
|
||||
: this.transformRpx(this.y);
|
||||
|
||||
let x = this.dynamic
|
||||
? this.dynamicGetX(this.x, this.gap)
|
||||
: this.transformRpx(this.x);
|
||||
|
||||
// #ifdef H5
|
||||
y = this.dynamic
|
||||
? this.y + statusBar
|
||||
: this.transformRpx(this.y + statusBar);
|
||||
// #endif
|
||||
|
||||
this.dynPlace =
|
||||
this.placement == "default"
|
||||
? this.getPlacement(x, y)
|
||||
: this.placement;
|
||||
|
||||
switch (this.dynPlace) {
|
||||
case "top-start":
|
||||
this.popupsTop = `${y + 9}rpx`;
|
||||
this.popupsLeft = `${x - 15}rpx`;
|
||||
break;
|
||||
case "top-end":
|
||||
this.popupsTop = `${y + 9}rpx`;
|
||||
this.popupsLeft = `${x + 15 - width}rpx`;
|
||||
break;
|
||||
case "bottom-start":
|
||||
this.popupsTop = `${y - 18 - height}rpx`;
|
||||
this.popupsLeft = `${x - 15}rpx`;
|
||||
break;
|
||||
case "bottom-end":
|
||||
this.popupsTop = `${y - 9 - height}rpx`;
|
||||
this.popupsLeft = `${x + 15 - width}rpx`;
|
||||
break;
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
)
|
||||
.exec();
|
||||
});
|
||||
return promise;
|
||||
},
|
||||
getPlacement(x, y) {
|
||||
let width = uni.getSystemInfoSync().windowWidth;
|
||||
let height = uni.getSystemInfoSync().windowHeight;
|
||||
if (x > width / 2 && y > height / 2) {
|
||||
return "bottom-end";
|
||||
} else if (x < width / 2 && y < height / 2) {
|
||||
return "top-start";
|
||||
} else if (x > width / 2 && y < height / 2) {
|
||||
return "top-end";
|
||||
} else if (x < width / 2 && y > height / 2) {
|
||||
return "bottom-start";
|
||||
} else if (x > width / 2) {
|
||||
return "top-end";
|
||||
} else {
|
||||
return "top-start";
|
||||
}
|
||||
},
|
||||
dynamicGetY(y, gap) {
|
||||
let height = uni.getSystemInfoSync().windowHeight;
|
||||
y = y < gap ? gap : y;
|
||||
y = height - y < gap ? height - gap : y;
|
||||
|
||||
return y;
|
||||
},
|
||||
dynamicGetX(x, gap) {
|
||||
let width = uni.getSystemInfoSync().windowWidth;
|
||||
x = x < gap ? gap : x;
|
||||
x = width - x < gap ? width - gap : x;
|
||||
return x;
|
||||
},
|
||||
transformRpx(params) {
|
||||
return (params * uni.getSystemInfoSync().screenWidth) / 375;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
immediate: true,
|
||||
handler: async function (newVal, oldVal) {
|
||||
if (newVal) await this.popupsPosition();
|
||||
this.show = newVal;
|
||||
},
|
||||
},
|
||||
placement: {
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
this.dynPlace = newVal;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.title {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.shadow {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
z-index: 9999;
|
||||
transition: background 0.3s ease-in-out;
|
||||
visibility: hidden;
|
||||
|
||||
&.shadow-show {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
.popups {
|
||||
position: absolute;
|
||||
padding: 20rpx;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
.view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 15rpx 10rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
.image {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
.dark {
|
||||
background-color: #4c4c4c;
|
||||
color: #fff;
|
||||
.top-start:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -18rpx;
|
||||
left: 10rpx;
|
||||
border-width: 0 20rpx 20rpx;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent #4c4c4c;
|
||||
}
|
||||
.top-end:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -18rpx;
|
||||
right: 10rpx;
|
||||
border-width: 0 20rpx 20rpx;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent #4c4c4c;
|
||||
}
|
||||
.bottom-start:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: -18rpx;
|
||||
left: 10rpx;
|
||||
border-width: 20rpx 20rpx 0;
|
||||
border-style: solid;
|
||||
border-color: #4c4c4c transparent transparent;
|
||||
}
|
||||
.bottom-end:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: -18rpx;
|
||||
right: 10rpx;
|
||||
border-width: 20rpx 20rpx 0;
|
||||
border-style: solid;
|
||||
border-color: #4c4c4c transparent transparent;
|
||||
}
|
||||
.disabledColor {
|
||||
color: #c5c8ce;
|
||||
}
|
||||
}
|
||||
.light {
|
||||
color: #515a6e;
|
||||
box-shadow: 0upx 0upx 30upx rgba(0, 0, 0, 0.2);
|
||||
background: #fff;
|
||||
.top-start:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -18rpx;
|
||||
left: 10rpx;
|
||||
border-width: 0 20rpx 20rpx;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent #fff;
|
||||
}
|
||||
.top-end:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -18rpx;
|
||||
right: 10rpx;
|
||||
border-width: 0 20rpx 20rpx;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent #fff;
|
||||
}
|
||||
.bottom-start:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: -18rpx;
|
||||
left: 10rpx;
|
||||
border-width: 20rpx 20rpx 0;
|
||||
border-style: solid;
|
||||
border-color: #fff transparent transparent;
|
||||
}
|
||||
.bottom-end:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: -18rpx;
|
||||
right: 10rpx;
|
||||
border-width: 20rpx 20rpx 0;
|
||||
border-style: solid;
|
||||
border-color: #fff transparent transparent;
|
||||
}
|
||||
.disabledColor {
|
||||
color: #c5c8ce;
|
||||
}
|
||||
}
|
||||
.solid-bottom {
|
||||
border-bottom: 1px solid #f3f5f7;
|
||||
}
|
||||
.solid-right {
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.popups .itemChild:last-child {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
@@ -49,31 +49,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view
|
||||
@click="hide"
|
||||
v-show="flage"
|
||||
class="flex-row-around"
|
||||
style="border-radius: 10rpx; background-color: #ebebeb"
|
||||
:style="{
|
||||
width: width,
|
||||
height: height,
|
||||
'margin-left': left,
|
||||
'margin-top': top,
|
||||
}"
|
||||
:class="vsr ? 'border-index' : ''"
|
||||
>
|
||||
<view class="flex-row-center" style="width: 45rpx; height: 45rpx">
|
||||
<view v-show="!vsr" class="dh-wt"> </view>
|
||||
<view
|
||||
v-show="vsr"
|
||||
class="cuIcon-roundcheck"
|
||||
style="font-size: 45rpx; color: #07c160"
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<text :class="vsr ? 'ttcl' : ''" style="color: #5a5a5a">{{ vsrtx }}</text>
|
||||
<view class="cuIcon-safe text-gray"> </view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -209,13 +185,12 @@ export default {
|
||||
},
|
||||
success: (res) => {
|
||||
this.endLoad = true;
|
||||
|
||||
res.data.result == false
|
||||
? (res.data.result = false)
|
||||
: (res.data.result = true);
|
||||
|
||||
if (res.data && res.data.result) {
|
||||
// // 验证成功后把key发送出去,后端会把验证信息存在缓存里
|
||||
//验证成功后把key发送出去,后端会把验证信息存在缓存里
|
||||
this.$emit("send", this.key);
|
||||
this.hide();
|
||||
this.vsr = true;
|
||||
@@ -389,33 +364,6 @@ export default {
|
||||
margin-top: -35rpx;
|
||||
}
|
||||
|
||||
.lk-tag {
|
||||
height: 50rpx;
|
||||
padding: 0 10rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 2rpx solid #24bd9f;
|
||||
border-radius: 6rpx;
|
||||
color: #1c947a;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tb-tag-my {
|
||||
border-radius: 15rpx;
|
||||
font-size: 16rpx;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
|
||||
.my-green {
|
||||
color: #29c7a5;
|
||||
}
|
||||
|
||||
.my-hui {
|
||||
color: #585858;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.flex-column-center {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -524,75 +472,15 @@ export default {
|
||||
bottom: 70rpx;
|
||||
}
|
||||
|
||||
.white-box {
|
||||
padding: 0 20rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-top: 5rpx;
|
||||
width: 715rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.green-box {
|
||||
padding: 0 20rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-top: 5rpx;
|
||||
width: 715rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 30rpx;
|
||||
background-image: linear-gradient(#1faf97, #29c7a5);
|
||||
}
|
||||
|
||||
.yuan-sm {
|
||||
width: 13rpx;
|
||||
height: 13rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #1fc189;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.yuan-normal {
|
||||
width: 14rpx;
|
||||
height: 14rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #159f3c;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.yuan-normal-red {
|
||||
width: 14rpx;
|
||||
height: 14rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #bc3c11;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.yuan-sm-red {
|
||||
width: 13rpx;
|
||||
height: 13rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #de410d;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.white-box-all {
|
||||
margin-top: 5rpx;
|
||||
width: 750rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 13px;
|
||||
}
|
||||
|
||||
.moneycolor {
|
||||
color: #ea5002;
|
||||
}
|
||||
|
||||
.text-bold-sm {
|
||||
font-weight: 425;
|
||||
}
|
||||
|
||||
.sm-moneycolor {
|
||||
color: #e3793b;
|
||||
}
|
||||
|
||||
.margin-top {
|
||||
margin-top: 20rpx;
|
||||
@@ -610,71 +498,13 @@ export default {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.margin-left-top {
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.margin-right {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.my-absolute {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.my-fixed {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.my-seach {
|
||||
width: 450rpx;
|
||||
height: 55rpx;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 30rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.move-view {
|
||||
width: 48rpx;
|
||||
height: 10rpx;
|
||||
background-color: #28ba91;
|
||||
border-radius: 4rpx;
|
||||
margin-left: 100rpx;
|
||||
}
|
||||
|
||||
.move-view-p {
|
||||
width: 45rpx;
|
||||
height: 10rpx;
|
||||
background-color: #28ba91;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.header-dh {
|
||||
position: fixed;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 15rpx;
|
||||
height: 70rpx;
|
||||
width: 750rpx;
|
||||
background-color: #f1f1f1;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.tp-normal {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.tp-sm {
|
||||
width: 45rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
|
||||
.tp-big {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.main-color {
|
||||
color: #07d188;
|
||||
|
||||
@@ -11,7 +11,6 @@ const dev = {
|
||||
const prod = {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
|
||||
};
|
||||
|
||||
//默认生产环境
|
||||
@@ -22,7 +21,7 @@ if (process.env.NODE_ENV == "development") {
|
||||
} else {
|
||||
api = prod;
|
||||
}
|
||||
//微信小程序,app的打包方式只能是生产环境,所以这块直接条件编译赋值
|
||||
//微信小程序,app的打包方式建议为生产环境,所以这块直接条件编译赋值
|
||||
// #ifdef MP-WEIXIN || APP-PLUS
|
||||
api = prod;
|
||||
// #endif
|
||||
|
||||
@@ -2,9 +2,12 @@ const name = "lilishop";
|
||||
export default {
|
||||
name: name,
|
||||
schemeLink: `${name}://`, //唤起app地址
|
||||
downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址
|
||||
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址
|
||||
downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址,下载app的地址
|
||||
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址
|
||||
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
|
||||
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
|
||||
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
|
||||
};
|
||||
scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
|
||||
iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
|
||||
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png" //logo地址
|
||||
};
|
||||
|
||||
15
main.js
@@ -2,7 +2,6 @@ import Vue from "vue";
|
||||
import App from "./App";
|
||||
import * as filters from "./utils/filters.js"; // global filter
|
||||
import uView from "uview-ui";
|
||||
import empty from "./components/empty";
|
||||
import store from "./store";
|
||||
|
||||
// #ifdef H5
|
||||
@@ -12,6 +11,8 @@ let btn = Vue.component("airBtn", airBtn); //全局注册
|
||||
document.body.appendChild(new btn().$mount().$el);
|
||||
// #endif
|
||||
|
||||
|
||||
|
||||
Object.keys(filters).forEach((key) => {
|
||||
Vue.filter(key, filters[key]);
|
||||
});
|
||||
@@ -27,17 +28,15 @@ const msg = (title, duration = 1500, mask = false, icon = "none") => {
|
||||
mask,
|
||||
icon,
|
||||
});
|
||||
};
|
||||
};
|
||||
// 引入vuex
|
||||
Vue.prototype.$store = store;
|
||||
// 全局引入空组件
|
||||
Vue.component("empty", empty);
|
||||
Vue.prototype.$store = store;
|
||||
Vue.use(uView);
|
||||
Vue.config.productionTip = false;
|
||||
Vue.config.productionTip = false;
|
||||
// 主题色
|
||||
Vue.prototype.$mainColor = "#ff3c2a";
|
||||
Vue.prototype.$mainColor = "#ff3c2a";
|
||||
// 高亮主题色
|
||||
Vue.prototype.$lightColor = "#ff6b35";
|
||||
Vue.prototype.$lightColor = "#ff6b35";
|
||||
// 可直接 this.$api调用
|
||||
Vue.prototype.$api = { msg };
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "lili商城",
|
||||
"appid" : "__UNI__C100675",
|
||||
"description" : "",
|
||||
"versionName" : "4.0.16",
|
||||
"versionCode" : 4000016,
|
||||
"versionName" : "4.0.21",
|
||||
"versionCode" : 4000021,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"compatible" : {
|
||||
@@ -81,8 +81,8 @@
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "wx6cfbe6e0ace12ce8",
|
||||
"UniversalLinks" : "https://m-b2b2c.pickmall.cn/"
|
||||
"appid" : "wx32788b91bdb614c0",
|
||||
"UniversalLinks" : "https://m-b2b2c.pickmall.cn/app/"
|
||||
},
|
||||
"alipay" : {
|
||||
"__platform__" : [ "ios", "android" ]
|
||||
@@ -91,15 +91,15 @@
|
||||
"ad" : {},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx6cfbe6e0ace12ce8",
|
||||
"UniversalLinks" : "https://m-b2b2c.pickmall.cn/"
|
||||
"appid" : "wx32788b91bdb614c0",
|
||||
"UniversalLinks" : "https://m-b2b2c.pickmall.cn/app/"
|
||||
}
|
||||
},
|
||||
"oauth" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx6cfbe6e0ace12ce8",
|
||||
"appsecret" : "6dfbe0c72380dce5d49d65b3c91059b1",
|
||||
"UniversalLinks" : "https://m-b2b2c.pickmall.cn/"
|
||||
"appid" : "wx32788b91bdb614c0",
|
||||
"appsecret" : "230233cef7520ee935bbecad372a370e",
|
||||
"UniversalLinks" : "https://m-b2b2c.pickmall.cn/app/"
|
||||
},
|
||||
"apple" : {},
|
||||
"qq" : {
|
||||
@@ -178,20 +178,30 @@
|
||||
"mp-weixin" : {
|
||||
/* 小程序特有相关 */
|
||||
"usingComponents" : true,
|
||||
"appid" : "wx6f10f29075dc1b0b",
|
||||
"appid" : "",
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
},
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true,
|
||||
"postcss" : true,
|
||||
"postcss" : false,
|
||||
"es6" : true
|
||||
},
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "位置信息将用于高德地图的效果展示"
|
||||
}
|
||||
},
|
||||
"plugins" : {
|
||||
"myPlugin" : {
|
||||
"version" : "1.1.0",
|
||||
"provider" : "wx738958e0f4c894f9"
|
||||
},
|
||||
"live-player-plugin" : {
|
||||
"version" : "1.3.0",
|
||||
"provider" : "wx2b03c6e691cd7370"
|
||||
}
|
||||
}
|
||||
},
|
||||
"h5" : {
|
||||
@@ -210,6 +220,7 @@
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"title" : "lilishop"
|
||||
"title" : "lilishop",
|
||||
"template" : ""
|
||||
}
|
||||
}
|
||||
|
||||
76
pages.json
@@ -42,15 +42,7 @@
|
||||
"navigationBarTitleText": "积分商城",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/navigation/selectShops",
|
||||
"style": {
|
||||
"navigationBarTitleText": "精选店铺"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
"path": "pages/navigation/search/searchPage",
|
||||
"style": {
|
||||
@@ -176,7 +168,28 @@
|
||||
{
|
||||
"path": "deposit/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "预存款列表"
|
||||
"navigationStyle": "custom"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "deposit/operation",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "deposit/recharge",
|
||||
"style": {
|
||||
"navigationBarTitleText": "充值金额"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "deposit/withdrawal",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提现金额"
|
||||
|
||||
}
|
||||
},
|
||||
@@ -188,12 +201,7 @@
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "aboutUs",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于我们"
|
||||
}
|
||||
}, {
|
||||
{
|
||||
"path": "address/address",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
@@ -212,6 +220,13 @@
|
||||
"navigationBarTitleText": "地址管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "set/versionFunctionList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "功能介绍"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "set/securityCenter/fingerLogin",
|
||||
"style": {
|
||||
@@ -251,7 +266,7 @@
|
||||
{
|
||||
"path": "set/editionIntro",
|
||||
"style": {
|
||||
"navigationBarTitleText": "版本说明"
|
||||
"navigationBarTitleText": "关于我们"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -364,6 +379,17 @@
|
||||
//app页面不显示滚动条
|
||||
"scrollIndicator": "none"
|
||||
}
|
||||
},
|
||||
{ // 客服
|
||||
"path": "customerservice/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "客服",
|
||||
"usingComponents": {
|
||||
// #ifdef MP-WEIXIN
|
||||
"chat": "plugin://myPlugin/chat"
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -403,7 +429,9 @@
|
||||
{
|
||||
"path": "wechatMPLogin",
|
||||
"style": {
|
||||
"navigationBarTitleText": "小程序登录"
|
||||
"navigationBarTitleText": "小程序登录",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -424,7 +452,9 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "限时抢购",
|
||||
"app-plus": {
|
||||
"titleNView": {}
|
||||
"titleNView": {
|
||||
"homeButton":true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -446,6 +476,13 @@
|
||||
"navigationBarTitleText": "人气推荐",
|
||||
"navigationStyle": "custom"
|
||||
|
||||
}
|
||||
},{
|
||||
"path": "lives",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,6 +603,7 @@
|
||||
"enablePullDownRefresh": true,
|
||||
"app-plus": {
|
||||
"bounce": "none"
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import * as API_Trade from "@/api/trade";
|
||||
|
||||
import {payCallback} from '@/api/members'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -71,6 +71,7 @@
|
||||
walletValue: 0.0,
|
||||
// 支付倒计时
|
||||
autoCancel: 0,
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(val) {
|
||||
@@ -91,12 +92,23 @@
|
||||
// 区别是:h5是通过浏览器外部调用微信app进行支付,而JSAPI则是 在微信浏览器内部,或者小程序 调用微信支付
|
||||
this.paymentClient = this.isWeiXin() ? "JSAPI" : "H5";
|
||||
//#endif
|
||||
|
||||
|
||||
|
||||
//
|
||||
},
|
||||
onBackPress(e) {
|
||||
if (e.from == "backbutton") {
|
||||
if(this.routerVal.recharge_sn){
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/user/my'
|
||||
});
|
||||
}
|
||||
else{
|
||||
uni.redirectTo({
|
||||
url: "/pages/order/myOrder?status=0",
|
||||
});
|
||||
}
|
||||
return true; //阻止默认返回行为
|
||||
}
|
||||
},
|
||||
@@ -104,16 +116,28 @@
|
||||
this.cashierData();
|
||||
},
|
||||
methods: {
|
||||
navigateTo(url) {
|
||||
|
||||
/**
|
||||
* 支付成功后跳转
|
||||
*/
|
||||
callback(paymentMethod){
|
||||
uni.navigateTo({
|
||||
url,
|
||||
url: "/pages/cart/payment/success?paymentMethod=" +
|
||||
paymentMethod +
|
||||
"&payPrice=" +
|
||||
this.cashierParams.price+
|
||||
"&orderType="+this.orderType
|
||||
});
|
||||
},
|
||||
// 获取收银详情
|
||||
|
||||
/**
|
||||
* 获取收银详情
|
||||
*/
|
||||
cashierData() {
|
||||
let parms = {};
|
||||
|
||||
if (this.routerVal.recharge_sn) {
|
||||
// 判断当前是否是充值
|
||||
this.sn = this.routerVal.recharge_sn;
|
||||
this.orderType = "RECHARGE";
|
||||
} else if (this.routerVal.trade_sn) {
|
||||
@@ -136,8 +160,18 @@
|
||||
});
|
||||
// #endif
|
||||
|
||||
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.payList = res.data.result.support;
|
||||
if(this.routerVal.recharge_sn){
|
||||
this.payList = res.data.result.support.filter((item) => {
|
||||
return item != "WALLET";
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.payList = res.data.result.support;
|
||||
}
|
||||
|
||||
// #endif
|
||||
this.walletValue = res.data.result.walletValue;
|
||||
this.autoCancel =
|
||||
@@ -147,13 +181,14 @@
|
||||
|
||||
|
||||
awaitPay(payment){
|
||||
|
||||
this.$u.debounce(this.pay(payment), 3000)
|
||||
|
||||
this.$u.throttle(()=>{
|
||||
this.pay(payment)
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
//订单支付
|
||||
async pay(payment) {
|
||||
|
||||
// 支付编号
|
||||
const sn = this.sn;
|
||||
// 交易类型【交易号|订单号】
|
||||
@@ -179,16 +214,15 @@
|
||||
|
||||
//如果支付异常
|
||||
if (!signXml.data.success) {
|
||||
uni.showModal({
|
||||
content: signXml.data.message,
|
||||
showCancel: false,
|
||||
})
|
||||
uni.showToast({
|
||||
title: signXml.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let payForm = signXml.data.result;
|
||||
|
||||
console.log(payForm)
|
||||
let paymentType = paymentMethod === "WECHAT" ? "wxpay" : "alipay";
|
||||
uni.requestPayment({
|
||||
provider: paymentType,
|
||||
@@ -199,12 +233,10 @@
|
||||
icon: "none",
|
||||
title: "支付成功!",
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: "/pages/payment/success?paymentType=" +
|
||||
paymentType +
|
||||
"&payPrice=" +
|
||||
this.cashierParams.price,
|
||||
});
|
||||
|
||||
this.callback(paymentMethod)
|
||||
|
||||
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
@@ -225,16 +257,18 @@
|
||||
await API_Trade.initiatePay(paymentMethod, paymentClient, params).then(
|
||||
(res) => {
|
||||
let response = res.data;
|
||||
//如果支付异常
|
||||
if (!response.success) {
|
||||
|
||||
uni.showModal({
|
||||
content: response.message,
|
||||
showCancel: false,
|
||||
})
|
||||
return;
|
||||
//如果非支付宝支付才需要进行判定,因为支付宝h5支付是直接输出的,没有返回所谓的消息状态
|
||||
if(paymentMethod !== "ALIPAY"){
|
||||
//如果支付异常
|
||||
if (!response.success) {
|
||||
uni.showToast({
|
||||
title: response.message,
|
||||
duration: 2000,
|
||||
icon:"none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (paymentMethod === "ALIPAY") {
|
||||
document.write(response);
|
||||
} else if (paymentMethod === "WECHAT") {
|
||||
@@ -251,12 +285,8 @@
|
||||
icon: "none",
|
||||
title: "支付成功!",
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: "/pages/cart/payment/success?paymentMethod=" +
|
||||
paymentMethod +
|
||||
"&payPrice=" +
|
||||
this.cashierParams.price,
|
||||
});
|
||||
this.callback(paymentMethod)
|
||||
|
||||
} else {
|
||||
uni.showModal({
|
||||
content: "支付失败,如果您已支付,请勿反复支付",
|
||||
@@ -274,12 +304,7 @@
|
||||
icon: "none",
|
||||
});
|
||||
if (response.success) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/cart/payment/success?paymentMethod=" +
|
||||
paymentMethod +
|
||||
"&payPrice=" +
|
||||
this.cashierParams.price,
|
||||
});
|
||||
this.callback(paymentMethod)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -315,12 +340,8 @@
|
||||
icon: "none",
|
||||
title: "支付成功!",
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: "/pages/cart/payment/success?paymentMethod=" +
|
||||
paymentType +
|
||||
"&payPrice=" +
|
||||
this.cashierParams.price,
|
||||
});
|
||||
this.callback(paymentMethod)
|
||||
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
@@ -336,12 +357,8 @@
|
||||
icon: "none",
|
||||
title: "支付成功!",
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: "/pages/cart/payment/success?paymentMethod=" +
|
||||
paymentMethod +
|
||||
"&payPrice=" +
|
||||
this.cashierParams.price,
|
||||
});
|
||||
this.callback(paymentMethod)
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="wrapper">
|
||||
<div class="pay-wrapper">
|
||||
<div class="pay-money">
|
||||
¥{{ payPrice | unitPrice }}
|
||||
¥{{ Number(payPrice) | unitPrice }}
|
||||
</div>
|
||||
<div class="pay-btns">
|
||||
<div v-show="!from" @click="navigateTo('/pages/order/myOrder?status=0')">查看订单</div>
|
||||
<div v-show="!from" @click="checkOrder">查看{{this.orderType == "RECHARGE" ? '余额' : '订单'}}</div>
|
||||
<div @click="navigateTo('/pages/tabbar/home/index', 'switch')">回到首页</div>
|
||||
|
||||
</div>
|
||||
@@ -51,7 +51,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getGoodsList } from "@/api/goods.js";
|
||||
@@ -65,10 +64,10 @@ export default {
|
||||
from: "",
|
||||
payPrice: 0,
|
||||
goodsList: [],
|
||||
activeColor:this.$mainColor,
|
||||
activeColor: this.$mainColor,
|
||||
params: {
|
||||
pageSize: 12,
|
||||
pageNumber: 0,
|
||||
pageNumber: 1,
|
||||
},
|
||||
};
|
||||
},
|
||||
@@ -89,11 +88,26 @@ export default {
|
||||
onLoad(options) {
|
||||
this.paymentMethod = options.paymentMethod || "";
|
||||
this.from = options.from || "";
|
||||
this.payPrice = parseInt(options.payPrice) || 0;
|
||||
this.payPrice = options.payPrice || 0;
|
||||
this.orderType = options.orderType;
|
||||
//搜索商品
|
||||
this.initGoods();
|
||||
},
|
||||
methods: {
|
||||
checkOrder() {
|
||||
/**
|
||||
* 查看订单
|
||||
* 1.充值跳转到明细里面
|
||||
* 2.支付跳转到订单详情
|
||||
*/
|
||||
if (this.orderType == "RECHARGE") {
|
||||
uni.reLaunch({
|
||||
url: `/pages/mine/deposit/operation`
|
||||
})
|
||||
} else {
|
||||
this.navigateTo("/pages/order/myOrder?status=0");
|
||||
}
|
||||
},
|
||||
changeStatus(val) {
|
||||
if (val) {
|
||||
this.sendMessage();
|
||||
@@ -112,12 +126,11 @@ export default {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: templateid,
|
||||
success: (res) => {
|
||||
for(let key in res){
|
||||
if(res[key] == "reject"){
|
||||
this.checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (let key in res) {
|
||||
if (res[key] == "reject") {
|
||||
this.checked = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: (res) => {
|
||||
uni.removeStorageSync("acceptSubscribeMessage");
|
||||
@@ -155,7 +168,6 @@ export default {
|
||||
margin: 0 auto 40rpx auto;
|
||||
padding: 0 20rpx 20rpx;
|
||||
width: 80%;
|
||||
|
||||
}
|
||||
.pay-btns {
|
||||
display: flex;
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
<template>
|
||||
<view class="about-us">
|
||||
<view class="box flex-center">
|
||||
<image src="/static/logo.png" mode="scaleToFill"></image>
|
||||
<view>{{config.name}}</view>
|
||||
</view>
|
||||
<u-cell-group :border="false">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
|
||||
<!-- #endif -->
|
||||
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
|
||||
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
|
||||
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
|
||||
<u-cell-item title="关于我们" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=about')"></u-cell-item>
|
||||
</u-cell-group>
|
||||
<view class="intro flex-center c-content">
|
||||
<view>客服热线:13161366885</view>
|
||||
<view>客服邮箱:lili@lili.com</view>
|
||||
</view>
|
||||
<view class="bottom flex-center">
|
||||
<view @click="navigateTo('/pages/help/tips?type=user')">《lili商城用户协议》</view>
|
||||
<view>CopyRight @ {{config.name}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef APP-PLUS
|
||||
import APPUpdate, { getCurrentNo, getServerNo } from "@/plugins/APPUpdate";
|
||||
import { getAppVersionList } from "@/api/message.js";
|
||||
// #endif
|
||||
import config from "@/config/config";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
showUpdate: false,
|
||||
version: "",
|
||||
currentNo: 0,
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
/**
|
||||
* 根据当前app系统判断
|
||||
*/
|
||||
// #ifdef APP-PLUS
|
||||
let _this = this;
|
||||
plus.runtime.getProperty(plus.runtime.appid, function (inf) {
|
||||
var wgtVer = inf.version;
|
||||
_this.currentVersion = wgtVer;
|
||||
});
|
||||
if (uni.getSystemInfoSync().platform === "android") {
|
||||
this.params.type = 0;
|
||||
} else {
|
||||
this.params.type = 1;
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击查看更新
|
||||
*/
|
||||
async checkUpdate() {
|
||||
// #ifdef APP-PLUS
|
||||
let needUpdate = false;
|
||||
getCurrentNo((res) => {
|
||||
this.currentNo = res.versionCode;
|
||||
});
|
||||
let res = await getAppVersionList(this.params);
|
||||
res.data.data.forEach((ele) => {
|
||||
let versionDetail = ele.version.replace(/\./g, "");
|
||||
if (versionDetail.length < this.currentNo.length) {
|
||||
versionDetail = versionDetail.padEnd(this.currentNo.length, "0");
|
||||
}
|
||||
if (versionDetail > this.currentNo) {
|
||||
needUpdate = true;
|
||||
}
|
||||
});
|
||||
if (needUpdate) {
|
||||
APPUpdate(true);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已是最新版本!",
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
navigateTo(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 242rpx;
|
||||
image {
|
||||
transform: scale(2.5);
|
||||
width: 94rpx;
|
||||
height: 94rpx;
|
||||
}
|
||||
view {
|
||||
font-size: 30rpx;
|
||||
margin-top: 25rpx;
|
||||
}
|
||||
}
|
||||
.u-cell {
|
||||
padding: 35rpx 20rpx;
|
||||
height: 110rpx;
|
||||
}
|
||||
.intro {
|
||||
color: #999999;
|
||||
font-size: $font-sm;
|
||||
margin-top: 20rpx;
|
||||
border: none;
|
||||
padding: 45rpx 0;
|
||||
line-height: 2em;
|
||||
}
|
||||
.bottom {
|
||||
:nth-child(1) {
|
||||
color: $main-color;
|
||||
font-size: 22rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
:last-child {
|
||||
font-size: 20rpx;
|
||||
color: $font-color-light;
|
||||
}
|
||||
margin-top: 110rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,14 +1,17 @@
|
||||
<template>
|
||||
<view class="wap">
|
||||
<u-navbar back-text="" title="预存款列表">
|
||||
</u-navbar>
|
||||
<view class="wrapper-show-money">
|
||||
<view class="money-view">
|
||||
<h3>预存款金额 </h3>
|
||||
<view class="money">¥{{walletNum | unitPrice }}</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper-tabs">
|
||||
|
||||
<swiper class="swiper-box" @change="changeSwiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
|
||||
|
||||
<swiper class="swiper-box" :current="swiperCurrent">
|
||||
<swiper-item class="swiper-item" v-for="index in list.length" :key="index">
|
||||
<scroll-view class="scroll-v view-wrapper" enableBackToTop="true" scroll-with-animation scroll-y @scrolltolower="loadMore">
|
||||
<view v-if="datas.length!=0" class="view-item" v-for="(logItem, logIndex) in datas" :key="logIndex">
|
||||
@@ -37,12 +40,11 @@
|
||||
|
||||
<script>
|
||||
import { getUserRecharge, getWalletLog } from "@/api/members";
|
||||
import storage from "@/utils/storage.js";
|
||||
import { getUserWallet } from "@/api/members";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
walletNum:0,
|
||||
walletNum: 0,
|
||||
status: "loadmore",
|
||||
current: 0,
|
||||
swiperCurrent: 0,
|
||||
@@ -77,6 +79,7 @@ export default {
|
||||
this.walletNum = result.data.result.memberWallet;
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**分页获取预存款充值记录 */
|
||||
getRecharge() {
|
||||
this.status = "loading";
|
||||
@@ -105,10 +108,7 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// 点击swiper的时候清空数据
|
||||
changeSwiper() {
|
||||
this.groupBuy = [];
|
||||
},
|
||||
|
||||
changed(index) {
|
||||
this.datas = [];
|
||||
this.swiperCurrent = index;
|
||||
@@ -121,19 +121,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// swiper-item左右移动,通知tabs的滑块跟随移动
|
||||
transition({ detail: { dx } }) {
|
||||
this.$refs.tabs.setDx(dx);
|
||||
},
|
||||
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
|
||||
// swiper滑动结束,分别设置tabs和swiper的状态
|
||||
animationfinish(e) {
|
||||
// this.groupBuy = []
|
||||
let current = e.detail.current;
|
||||
this.$refs.tabs.setFinishCurrent(current);
|
||||
this.swiperCurrent = current;
|
||||
this.current = current;
|
||||
},
|
||||
loadMore() {
|
||||
this.params.pageNumber++;
|
||||
this.getWallet();
|
||||
@@ -144,93 +131,96 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.green {
|
||||
color: $aider-color-green !important;
|
||||
}
|
||||
.view-item {
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.view-item-change {
|
||||
text-align: right;
|
||||
> .-money {
|
||||
font-size: 36rpx;
|
||||
color: $main-color;
|
||||
color: $aider-color-green !important;
|
||||
}
|
||||
.view-item {
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.view-item-change {
|
||||
text-align: right;
|
||||
> .-money {
|
||||
font-size: 36rpx;
|
||||
color: $main-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
> .-time {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.view-item-detail {
|
||||
line-height: 1.75;
|
||||
> .-title {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
> .-number {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.submit-btn {
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
|
||||
color: #fff;
|
||||
background: $main-color;
|
||||
|
||||
margin: 0 auto;
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
.operation {
|
||||
font-size: 32rpx;
|
||||
margin-right: 24rpx;
|
||||
color: rgb(96, 98, 102);
|
||||
}
|
||||
.money {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
> .-time {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
|
||||
.money-view {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0 32rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
color: #fff;
|
||||
background-image: linear-gradient(
|
||||
25deg,
|
||||
$main-color,
|
||||
$light-color,
|
||||
$aider-light-color
|
||||
);
|
||||
}
|
||||
}
|
||||
.view-item-detail {
|
||||
line-height: 1.75;
|
||||
> .-title {
|
||||
font-size: 28rpx;
|
||||
|
||||
.swiper-item,
|
||||
.scroll-v {
|
||||
height: 100%;
|
||||
}
|
||||
> .-number {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
|
||||
.swiper-box {
|
||||
/* #ifndef H5 */
|
||||
height: calc(100vh - 200rpx);
|
||||
/* #endif */
|
||||
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - 288rpx);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.wap {
|
||||
width: 100%;
|
||||
height: calc(100vh - 44px);
|
||||
}
|
||||
|
||||
.wrapper-show-money {
|
||||
height: 200rpx;
|
||||
// background-image: url('/static/img/main-bg.jpg');
|
||||
}
|
||||
}
|
||||
.submit-btn {
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
|
||||
color: #fff;
|
||||
background: $main-color;
|
||||
|
||||
margin: 0 auto;
|
||||
height: 90rpx;
|
||||
}
|
||||
.wap {
|
||||
}
|
||||
|
||||
.money {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.money-view {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0 32rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
color: #fff;
|
||||
background-image: linear-gradient(
|
||||
25deg,
|
||||
$main-color,
|
||||
$light-color,
|
||||
$aider-light-color
|
||||
);
|
||||
}
|
||||
|
||||
.swiper-item,
|
||||
.scroll-v {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
/* #ifndef H5 */
|
||||
height: calc(100vh - 200rpx);
|
||||
/* #endif */
|
||||
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - 288rpx);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.wap {
|
||||
width: 100%;
|
||||
height: calc(100vh - 44px);
|
||||
}
|
||||
|
||||
.wrapper-show-money {
|
||||
height: 200rpx;
|
||||
// background-image: url('/static/img/main-bg.jpg');
|
||||
}
|
||||
</style>
|
||||
|
||||
110
pages/mine/deposit/operation.vue
Normal file
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<u-navbar :custom-back="back" title="余额"></u-navbar>
|
||||
<div class="box">
|
||||
<div class="deposit">预存款金额</div>
|
||||
<div class="money">¥{{walletNum | unitPrice }}</div>
|
||||
<div class="operation-btns">
|
||||
<div class="operation-btn light" @click="navgition('/pages/mine/deposit/withdrawal')">提现</div>
|
||||
<div class="operation-btn" @click="navgition('/pages/mine/deposit/recharge')">充值</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box list" @click="navgition('/pages/mine/deposit/index')">
|
||||
<div class="list-left">预存款明细</div>
|
||||
<div class="list-right">
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserWallet } from "@/api/members";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
walletNum: 0,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
let result = await getUserWallet(); //预存款
|
||||
this.walletNum = result.data.result.memberWallet;
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.switchTab({
|
||||
url: "/pages/tabbar/user/my",
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 跳转
|
||||
*/
|
||||
navgition(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.list-left {
|
||||
flex: 8;
|
||||
}
|
||||
.list-right {
|
||||
flex: 2;
|
||||
text-align: right;
|
||||
}
|
||||
.wrapper {
|
||||
width: 94%;
|
||||
margin: 0 3%;
|
||||
}
|
||||
.box {
|
||||
margin: 20rpx 0;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
||||
padding: 40rpx;
|
||||
}
|
||||
.operation-btns {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.money {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
font-size: 50rpx;
|
||||
margin: 20rpx 0 40rpx 0;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.deposit {
|
||||
margin-top: 50rpx;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.operation-btn {
|
||||
background: #ee6d41;
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
width: 240rpx;
|
||||
margin: 0 20rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.light {
|
||||
background: #fdf2ee;
|
||||
color: #ee6d41;
|
||||
}
|
||||
</style>
|
||||
50
pages/mine/deposit/recharge.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="-list">
|
||||
<view class="title">充值金额</view>
|
||||
<view class="content">
|
||||
<view class="price">
|
||||
<span> ¥</span>
|
||||
<u-input v-model="price" placeholder="" type="number" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="submit" :class="{'light':flag}" @click="handlerRecharge">充值</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { recharge } from "@/api/members";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
price: 0,
|
||||
flag: true,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
price(val) {
|
||||
val <= 0 ? (this.flag = true) : (this.flag = false);
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 充值
|
||||
async handlerRecharge() {
|
||||
if (this.price > 0) {
|
||||
|
||||
let res = await recharge({ price: this.price });
|
||||
if (res.data.success) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/cart/payment/payOrder?orderType=RECHARGE&recharge_sn=${res.data.result.rechargeSn}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './style.scss';
|
||||
</style>
|
||||
46
pages/mine/deposit/style.scss
Normal file
@@ -0,0 +1,46 @@
|
||||
/deep/ .u-input__input,
|
||||
.u-input {
|
||||
font-size: 80rpx !important;
|
||||
height: 102rpx !important;
|
||||
}
|
||||
/deep/ .u-input__input {
|
||||
height: 100%;
|
||||
font-size: 80rpx;
|
||||
}
|
||||
.content {
|
||||
display: flex;
|
||||
> .price {
|
||||
width: 60%;
|
||||
margin: 20rpx 0;
|
||||
font-size: 80rpx;
|
||||
display: flex;
|
||||
}
|
||||
> .all {
|
||||
justify-content: center;
|
||||
width: 40%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
||||
.-list {
|
||||
margin: 20rpx 0;
|
||||
background: #fff;
|
||||
padding: 16rpx 32rpx;
|
||||
}
|
||||
.title {
|
||||
font-size: 35rpx;
|
||||
}
|
||||
.light {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.submit {
|
||||
margin: 80rpx auto;
|
||||
width: 94%;
|
||||
background: $light-color;
|
||||
height: 90rpx;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
70
pages/mine/deposit/withdrawal.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="-list">
|
||||
<view class="title">提现金额</view>
|
||||
<view class="content">
|
||||
<view class="price">
|
||||
<span> ¥</span>
|
||||
<u-input v-model="price" placeholder="" type="number" />
|
||||
</view>
|
||||
|
||||
<view class="all">
|
||||
<view @click="handleAll" :style="{ color: $mainColor }">全部</view>
|
||||
<view style="font-size: 24rpx; color: #999">可提现金额<span>{{ walletNum | unitPrice }}</span>元</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="submit" @click="cashd">提现</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getUserWallet,withdrawalApply } from "@/api/members";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
price: 0,
|
||||
walletNum: 0,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
let result = await getUserWallet(); //预存款
|
||||
this.walletNum = result.data.result.memberWallet;
|
||||
},
|
||||
|
||||
methods: {
|
||||
cashd() {
|
||||
this.price = this.price + "";
|
||||
|
||||
if (this.$u.test.amount(parseInt(this.price))) {
|
||||
withdrawalApply({ price: this.price }).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "提现成功!",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "请输入正确金额",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAll() {
|
||||
this.price = this.walletNum;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./style.scss";
|
||||
</style>
|
||||
@@ -40,10 +40,7 @@
|
||||
<view>提现</view>
|
||||
</view>
|
||||
|
||||
<view class="nav-item" @click="handleClick('/pages/mine/distribution/list')">
|
||||
<u-icon size="50" color="#1e9ff2" name="home-fill"></u-icon>
|
||||
<view>选品库</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -156,9 +156,7 @@ export default {
|
||||
this.routers = options;
|
||||
},
|
||||
watch: {
|
||||
showFlag(val) {
|
||||
|
||||
},
|
||||
showFlag(val) {},
|
||||
},
|
||||
onShow() {
|
||||
this.goodsList = [];
|
||||
@@ -172,27 +170,34 @@ export default {
|
||||
},
|
||||
|
||||
async handleLink(goods) {
|
||||
uni.showToast({
|
||||
title: "请请按住保存图片",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
let page = `pages/product/goods`;
|
||||
let scene = `${goods.skuId},${goods.id},${this.routers.id}`;
|
||||
let scene = `${goods.skuId},${goods.goodsId},${this.routers.id}`;
|
||||
let result = await getMpCode({ page, scene });
|
||||
if(result.data.success){
|
||||
let callback = result.data.result;
|
||||
this.res.container.title = `${goods.goodsName}`;
|
||||
this.res.bottom.code = `data:image/png;base64,${callback}`;
|
||||
this.res.bottom.price = this.$options.filters.unitPrice(goods.price, "¥");
|
||||
this.res.bottom.desc = `${goods.goodsName}`;
|
||||
this.res.bottom.img = `${goods.thumbnail}`;
|
||||
if (result.data.success) {
|
||||
let callback = result.data.result;
|
||||
this.res.container.title = `${goods.goodsName}`;
|
||||
this.res.bottom.code = `data:image/png;base64,${callback}`;
|
||||
this.res.bottom.price = this.$options.filters.unitPrice(
|
||||
goods.price,
|
||||
"¥"
|
||||
);
|
||||
this.res.bottom.desc = `${goods.goodsName}`;
|
||||
this.res.bottom.img = `${goods.thumbnail}`;
|
||||
|
||||
if (this.showFlag) {
|
||||
this.$refs.drawCanvas.init();
|
||||
}
|
||||
this.showFlag = true;
|
||||
}
|
||||
else{
|
||||
if (this.showFlag) {
|
||||
this.$refs.drawCanvas.init();
|
||||
}
|
||||
this.showFlag = true;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: `制作二维码失败!请稍后重试`,
|
||||
duration: 2000,
|
||||
icon:"none"
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,30 +1,33 @@
|
||||
<template>
|
||||
<view class="myTracks">
|
||||
<empty v-if="whetherEmpty"></empty>
|
||||
<view v-else v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navgaiteToStore(item)">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
<view class="myTracks-item">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox v-model="item.___isDel" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx" @change="changeChecked(item)"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
||||
<image :src="item.thumbnail"></image>
|
||||
</view>
|
||||
<view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)">
|
||||
<view class="myTracks-item-title">
|
||||
{{ item.goodsName }}
|
||||
<view class="myTracks-item-title-desc"> </view>
|
||||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||
<div v-else>
|
||||
<view v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navgaiteToStore(item)">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
<view class="myTracks-item">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox v-model="item.___isDel" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx" @change="changeChecked(item)"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
||||
<image :src="item.thumbnail"></image>
|
||||
</view>
|
||||
<view class="myTracks-item-price">
|
||||
¥{{ item.price | unitPrice }}
|
||||
<view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)">
|
||||
<view class="myTracks-item-title">
|
||||
{{ item.goodsName }}
|
||||
<view class="myTracks-item-title-desc"> </view>
|
||||
</view>
|
||||
<view class="myTracks-item-price">
|
||||
¥{{ item.price | unitPrice }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="myTracks-divider"></view>
|
||||
|
||||
</view>
|
||||
<view class="myTracks-divider"></view>
|
||||
</view>
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
</div>
|
||||
<view v-if="editFlag">
|
||||
<view class="myTracks-action-placeholder"></view>
|
||||
<view class="myTracks-action">
|
||||
|
||||
@@ -1,122 +1,158 @@
|
||||
// TODO 第一版本暂无此功能 后续优化以及更新
|
||||
|
||||
<template>
|
||||
<view class="edition-intro">
|
||||
<view class="logo c-content">
|
||||
<view>
|
||||
<image src="/static/img/edition.png" mode=""></image>
|
||||
</view>
|
||||
<view>版本不息 优化不止</view>
|
||||
<image src="https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png" class="logo" />
|
||||
<h1> {{config.name}}</h1>
|
||||
<view class='version'>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
Version {{localVersion.version}}
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="edition c-content" v-for="(item,index) in editionHistory" :key="index">
|
||||
<view class="level">
|
||||
<text style="color: #1ABC9C;">{{item.version}}</text>
|
||||
<text>{{$u.timeFormat(item.update_time, 'yyyy-mm-dd')}}</text>
|
||||
|
||||
<!-- {{localVersion}} -->
|
||||
<u-cell-group class="cell" :border="false">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<u-cell-item v-if="IosWhether" @click="checkStar" title="去评分"></u-cell-item>
|
||||
<u-cell-item title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell-item>
|
||||
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
|
||||
<!-- #endif -->
|
||||
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
|
||||
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
|
||||
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
|
||||
<u-cell-item title="关于我们" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=about')"></u-cell-item>
|
||||
|
||||
</u-cell-group>
|
||||
|
||||
<view class="intro">
|
||||
<view>客服热线:13161366885</view>
|
||||
<view style="margin:20rpx 0 0 0;">客服邮箱:lili@lili.com</view>
|
||||
|
||||
<view>
|
||||
<view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=user')">《lili商城用户协议》</view>
|
||||
<view>CopyRight @{{config.name}} </view>
|
||||
</view>
|
||||
<view class="detail" v-html="item.content"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as API_Message from "@/api/message.js";
|
||||
import APPUpdate from "@/plugins/APPUpdate";
|
||||
import config from "@/config/config";
|
||||
import { getAppVersion } from "@/api/message.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
IosWhether: false, //是否是ios
|
||||
editionHistory: [], //版本历史
|
||||
versionData: {}, //版本信息
|
||||
localVersion: "", //当前版本信息
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
},
|
||||
loadStatus: "more",
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
if (uni.getSystemInfoSync().platform === "android") {
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
/**
|
||||
* 获取是否是安卓
|
||||
*/
|
||||
if (platform === "android") {
|
||||
this.params.type = 0;
|
||||
} else {
|
||||
this.IosWhether = true;
|
||||
this.params.type = 1;
|
||||
}
|
||||
this.GET_AppVersionList(true);
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.loadStatus != "noMore") {
|
||||
this.params.pageNumber++;
|
||||
this.GET_AppVersionList(false);
|
||||
}
|
||||
this.getVersion(platform);
|
||||
|
||||
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
|
||||
this.localVersion = {
|
||||
versionCode: inf.version.replace(/\./g, ""),
|
||||
version: inf.version,
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
GET_AppVersionList(reset) {
|
||||
if (reset) {
|
||||
this.params.pageNumber = 1;
|
||||
async getVersion(platform) {
|
||||
let type;
|
||||
platform == "android" ? (type = "ANDROID") : (type = "IOS");
|
||||
|
||||
let res = await getAppVersion(type);
|
||||
if (res.data.success) {
|
||||
this.versionData = res.data.result;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
},
|
||||
|
||||
navigateTo(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
});
|
||||
API_Message.getAppVersionList(this.params).then((response) => {
|
||||
uni.hideLoading();
|
||||
if (response.statusCode == 200) {
|
||||
const { data } = response;
|
||||
if (data.data.length < 10) {
|
||||
this.loadStatus = "noMore";
|
||||
}
|
||||
this.editionHistory.push(...data.data);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* ios点击评分
|
||||
*/
|
||||
checkStar() {
|
||||
plus.runtime.launchApplication({
|
||||
action: `itms-apps://itunes.apple.com/app/${config.iosAppId}?action=write-review`,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 检查更新
|
||||
*/
|
||||
checkUpdate() {
|
||||
if (
|
||||
this.versionData.version.replace(/\./g, "") <
|
||||
this.localVersion.versionCode
|
||||
) {
|
||||
APPUpdate();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "当前版本已是最新版",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #fff !important;
|
||||
}
|
||||
.cell {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.edition-intro {
|
||||
.logo {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
font-size: $font-lg;
|
||||
color: $font-color-light;
|
||||
height: 330rpx;
|
||||
margin-bottom: 20rpx;
|
||||
> view:nth-child(1) {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
border: 1px solid #ffc71c;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
margin-bottom: 30rpx;
|
||||
image {
|
||||
width: 80rpx;
|
||||
height: 113rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
min-height: 100vh;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
> h1 {
|
||||
margin: 20rpx 0 20rpx 0;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.edition {
|
||||
margin-bottom: 20rpx;
|
||||
color: $font-color-light;
|
||||
font-size: $font-sm;
|
||||
.level {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 30rpx;
|
||||
border-bottom: 2rpx solid $border-color-light;
|
||||
text:nth-child(1) {
|
||||
font-size: $font-base;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
.detail {
|
||||
margin-left: 20rpx;
|
||||
line-height: 2em;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
> .version {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
}
|
||||
.intro {
|
||||
margin-top: 100rpx;
|
||||
font-size: 24rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.logo {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<template>
|
||||
<view class="notify">
|
||||
<u-cell-group>
|
||||
<u-cell-item title="账户通知" :arrow="false">
|
||||
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="setting.account"></u-switch>
|
||||
</u-cell-item>
|
||||
<u-cell-item title="物流通知" :arrow="false">
|
||||
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="setting.logistics"></u-switch>
|
||||
</u-cell-item>
|
||||
<u-cell-item title="优惠促销" :arrow="false">
|
||||
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="setting.cheap"></u-switch>
|
||||
</u-cell-item>
|
||||
<u-cell-item title="服务通知" :arrow="false">
|
||||
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="setting.service"></u-switch>
|
||||
</u-cell-item>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
setting:{
|
||||
account:false,
|
||||
logistics:false,
|
||||
cheap:false,
|
||||
service:false
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-view{
|
||||
font-size: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -3,7 +3,8 @@
|
||||
<view class="person" @click="checkUserInfo()">
|
||||
<u-image width=140 height="140" shape="circle" :src="userInfo.face || '/static/missing-face.png'" mode=""></u-image>
|
||||
<view class="user-name">
|
||||
<view>{{ userInfo.id ? userInfo.username || '' : '暂未登录' }}</view>
|
||||
|
||||
{{ userInfo.id ? userInfo.nickName || '' : '暂未登录' }}
|
||||
</view>
|
||||
<u-icon color="#ccc" name="arrow-right"></u-icon>
|
||||
</view>
|
||||
@@ -17,10 +18,8 @@
|
||||
<u-cell-item title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell-item>
|
||||
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
|
||||
<!-- #ifndef H5 -->
|
||||
<u-cell-item title="版本说明" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
|
||||
<!-- #endif -->
|
||||
<!-- <u-cell-item title="好评鼓励"></u-cell-item> -->
|
||||
<u-cell-item title="关于我们" @click="navigateTo('/pages/mine/aboutUs')"></u-cell-item>
|
||||
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
|
||||
</u-cell-group>
|
||||
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'返回登录'}}</view>
|
||||
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true" :content="userInfo.id ? '确定要退出登录么?' : '确定要返回登录么?'"></u-modal>
|
||||
@@ -29,9 +28,11 @@
|
||||
|
||||
<script>
|
||||
import storage from "@/utils/storage.js";
|
||||
import config from "@/config/config";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
lightColor: this.$lightColor,
|
||||
quitShow: false,
|
||||
isCertificate: false,
|
||||
@@ -49,7 +50,7 @@ export default {
|
||||
url: url,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 确认退出
|
||||
* 清除缓存重新登录
|
||||
@@ -136,9 +137,7 @@ export default {
|
||||
});
|
||||
that.getCacheSize(); // 重新计算缓存
|
||||
},
|
||||
function (e) {
|
||||
|
||||
}
|
||||
function (e) {}
|
||||
);
|
||||
} else {
|
||||
entry.remove();
|
||||
@@ -195,7 +194,12 @@ export default {
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
.user-name {
|
||||
flex: 1;
|
||||
width: 500rpx;
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
margin-left: 30rpx;
|
||||
line-height: 2em;
|
||||
font-size: 34rpx;
|
||||
|
||||
58
pages/mine/set/versionFunctionList.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div>
|
||||
<u-collapse v-if="versionData.length !=0">
|
||||
<u-collapse-item class="version-item" :title="item.versionName" v-for="(item, index) in versionData" :key="index">
|
||||
<!-- {{item.body}} -->
|
||||
|
||||
{{item.content}}
|
||||
</u-collapse-item>
|
||||
|
||||
</u-collapse>
|
||||
<u-empty class="empty" v-else text="暂无版本信息" mode="list"></u-empty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAppVersionList } from "@/api/message";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
versionData: [],
|
||||
appType: "",
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
/**
|
||||
* 获取是否是安卓
|
||||
*/
|
||||
if (platform === "android") {
|
||||
this.appType = "ANDROID";
|
||||
} else {
|
||||
this.IosWhether = true;
|
||||
this.appType = "IOS";
|
||||
}
|
||||
this.getVersionList();
|
||||
},
|
||||
methods: {
|
||||
async getVersionList() {
|
||||
let res = await getAppVersionList(this.appType, this.params);
|
||||
if (res.data.success) {
|
||||
this.versionData = res.data.result.records;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.version-item{
|
||||
padding: 10rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
async onShow() {
|
||||
//获取顶级分类
|
||||
let response = await getPointsCategory();
|
||||
if (response.data.success) {
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
</div>
|
||||
<div class="storeSellerName">
|
||||
<div class="textHidden">
|
||||
<u-tag style="margin-right: 10rpx" size="mini" mode="dark" v-if="item.selfOperated == 1" text="自营" type="error" />
|
||||
<u-tag style="margin-right: 10rpx" size="mini" mode="dark" v-if="item.selfOperated" text="自营" type="error" />
|
||||
<span>{{ item.storeName || "暂无" }}</span>
|
||||
</div>
|
||||
<span>
|
||||
@@ -314,7 +314,7 @@ export default {
|
||||
isSWitch: false,
|
||||
|
||||
params: {
|
||||
pageNumber: 0,
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
// sort: 'grade_asc',
|
||||
sort: "releaseTime",
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
minPrice: "",
|
||||
maxPrice: "",
|
||||
sortParams: {
|
||||
pageNumber: 0,
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
|
||||
// price: "", //价格,示例值(10_30)
|
||||
@@ -474,7 +474,7 @@ export default {
|
||||
this.minPrice = "";
|
||||
this.maxPrice = "";
|
||||
this.params = {
|
||||
pageNumber: 0,
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.loadData();
|
||||
@@ -545,7 +545,7 @@ export default {
|
||||
},
|
||||
|
||||
tabClick(index, type) {
|
||||
this.params.pageNumber = 0;
|
||||
this.params.pageNumber = 1;
|
||||
this.params.pageSize = 10;
|
||||
// this.params.order = "desc";
|
||||
if (this.params.sort == type) {
|
||||
@@ -687,7 +687,7 @@ export default {
|
||||
this.isShowSeachGoods = true;
|
||||
this.$refs.mSearch.isShowSeachGoods = true;
|
||||
this.params.keyword = keyword;
|
||||
this.params.pageNumber = 0;
|
||||
this.params.pageNumber = 1;
|
||||
this.$set(this.sortParams, "keyword", keyword);
|
||||
|
||||
this.loadData("refresh", 1);
|
||||
|
||||
@@ -1,325 +0,0 @@
|
||||
<template>
|
||||
<view class="selected-store">
|
||||
<!-- 点击搜索出现搜索框 -->
|
||||
<!-- <div v-show="searchHandle" class="searchBox">
|
||||
<u-search placeholder="请输入关键字" :clearabled="true" :show-action="false" v-model="pageParams.name" @blur="searchStore()" @clear="clearSearch()" @confirm="searchStore()" ></u-search>
|
||||
</div> -->
|
||||
<div>
|
||||
<empty v-if="nomsg"></empty>
|
||||
<div class="swiper-item">
|
||||
<scroll-view class="scroll-v" enableBackToTop="true" scroll-with-animation scroll-y>
|
||||
<view class="index-item" v-for="(store,storeIndex) in stores" :key="storeIndex" @click.prevent="storeDetail(store.id)">
|
||||
<div class="item-goods">
|
||||
<u-image width="51px" height="51px" class="item-title-img" :src="store.storeLogo || noLogo">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
<view class="item-content">
|
||||
<view>
|
||||
<span>{{ store.storeName }}</span><span class="self-store" v-if="store.selfOperated">自营</span>
|
||||
</view>
|
||||
<view>
|
||||
<u-rate size="24" :count="5" :disabled="true" v-model="store.descriptionScore"></u-rate>
|
||||
</view>
|
||||
<view>{{ store.store_collect }} 关注</view>
|
||||
<button v-if="store.is_connect==0" @click.stop="collectstore(store.id)" class="collect btn-mini">
|
||||
<u-icon name="plus"></u-icon>关注
|
||||
</button>
|
||||
<button v-if="store.is_connect==1" @click.stop="collectstore(store.id)" class="collect btn-mini"></u-icon>已关注</button>
|
||||
</view>
|
||||
<view class="store-num">
|
||||
<!-- <view> {{store.goods_num}}</view> -->
|
||||
<view>进店逛逛</view>
|
||||
</view>
|
||||
|
||||
</div>
|
||||
</view>
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
</scroll-view>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { collectionStore } from "@/api/members.js";
|
||||
import { getstoreList } from "@/api/store.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabIndex: 0,
|
||||
currentLeft: 0,
|
||||
stores: [],
|
||||
pageParams: {
|
||||
pageNumber: 1, //页码
|
||||
pageSize: 10, //分页大小
|
||||
category_id: 0, //分类
|
||||
key_words: "", //搜索关键字
|
||||
name: "", //店铺名字
|
||||
},
|
||||
loadStatus: "more",
|
||||
nomsg: false,
|
||||
noLogo: require("@/static/logo.png"),
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.searchStore();
|
||||
},
|
||||
watch: {
|
||||
tabIndex(val) {
|
||||
this.pageParams.pageNumber = 1;
|
||||
this.stores = [];
|
||||
this.loadStatus = "more";
|
||||
this.searchStore();
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
|
||||
this.pageParams.pageNumber++;
|
||||
this.searchStore();
|
||||
},
|
||||
methods: {
|
||||
// 清空店铺
|
||||
clearSearch() {
|
||||
(this.pageParams = {
|
||||
pageNumber: 1, //页码
|
||||
pageSize: 10, //分页大小
|
||||
category_id: 0, //分类
|
||||
key_words: "", //搜索关键字
|
||||
name: "", //店铺名字
|
||||
}),
|
||||
this.searchStore();
|
||||
},
|
||||
|
||||
async searchStore() {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
|
||||
//获取商品数据
|
||||
let response = await getstoreList(this.pageParams);
|
||||
uni.hideLoading();
|
||||
if (this.pageParams.name) {
|
||||
this.stores = [];
|
||||
}
|
||||
|
||||
this.stores = this.stores.concat(response.data.result.records);
|
||||
uni.hideLoading();
|
||||
if (
|
||||
response.data.result.total <=
|
||||
response.data.result.current * response.data.result.size
|
||||
) {
|
||||
this.loadStatus = "noMore";
|
||||
} else {
|
||||
this.loadStatus = "loadmore";
|
||||
}
|
||||
if (this.stores.length == 0) {
|
||||
this.nomsg = true;
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
collectstore(id) {
|
||||
//收藏店铺
|
||||
collectionStore(id).then((res) => {
|
||||
if (res.statusCode == 200) {
|
||||
this.$api.msg("收藏成功");
|
||||
this.pageParams.pageNumber = 1;
|
||||
this.stores = [];
|
||||
this.searchStore();
|
||||
}
|
||||
});
|
||||
},
|
||||
storeDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/product/shopPage?id=" + id,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.searchBox {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.selected-store {
|
||||
height: 100%;
|
||||
|
||||
.list-scroll-content {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
|
||||
.tab-item {
|
||||
width: 160rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.active {
|
||||
border-bottom: 2px solid #ffffff;
|
||||
broder-width: 60rpx;
|
||||
font-size: 30rpx;
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: calc(100% - 80rpx);
|
||||
|
||||
.scroll-v {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.index-item {
|
||||
// height: 535rpx;
|
||||
margin: 20rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 14rpx;
|
||||
|
||||
.item-goods {
|
||||
height: 170rpx;
|
||||
margin: 0 20rpx;
|
||||
padding: 30rpx 0;
|
||||
// border-bottom: 1px solid #eeeeee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.item-title-img {
|
||||
width: 102rpx !important;
|
||||
height: 102rpx !important;
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
line-height: 2em;
|
||||
font-size: $font-sm;
|
||||
position: relative;
|
||||
.collect {
|
||||
position: absolute;
|
||||
width: 100rpx;
|
||||
height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
bottom: 20rpx;
|
||||
right: 30rpx;
|
||||
padding: 0;
|
||||
line-height: 40rpx;
|
||||
text-align: right;
|
||||
padding-right: 14rpx;
|
||||
.u-icon {
|
||||
font-size: 26rpx;
|
||||
position: absolute;
|
||||
top: 7rpx;
|
||||
left: 10rpx;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}
|
||||
> view:first-child {
|
||||
font-size: $font-base;
|
||||
color: #333333;
|
||||
font-weight: 700;
|
||||
position: relative;
|
||||
|
||||
span:nth-child(2) {
|
||||
position: absolute;
|
||||
font-weight: 400;
|
||||
top: 12rpx;
|
||||
font-size: 18rpx;
|
||||
margin-left: 20rpx;
|
||||
height: 26rpx;
|
||||
width: 50rpx;
|
||||
line-height: 26rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
background-color: #ff6262;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
color: #999;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.store-num {
|
||||
width: 150rpx;
|
||||
text-align: center;
|
||||
border-left: 1px solid #eeeeee;
|
||||
|
||||
:nth-child(1) {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
:nth-child(2) {
|
||||
font-size: 18rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-in-store {
|
||||
height: 364rpx;
|
||||
white-space: nowrap;
|
||||
padding: 20rpx 0 20rpx 20rpx;
|
||||
|
||||
.goods-item {
|
||||
width: 195rpx;
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
margin-right: 20rpx;
|
||||
font-size: $font-sm;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
||||
image {
|
||||
width: 195rpx;
|
||||
height: 195rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
> view {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.goods-item-img {
|
||||
width: 195rpx !important;
|
||||
height: 195rpx !important;
|
||||
border-radius: 8rpx !important;
|
||||
}
|
||||
|
||||
> view:nth-child(2) {
|
||||
color: #ff5a10;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -149,7 +149,7 @@ export default {
|
||||
customStyle: {
|
||||
backgroundColor: this.$lightColor,
|
||||
},
|
||||
applyInfo: {},
|
||||
applyInfo: {},
|
||||
form: {
|
||||
orderItemSn: "", // 订单sn
|
||||
skuId: "",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
|
||||
<view class="select-view">
|
||||
<view class="select-cell" @click="onSelect(1)">
|
||||
<view class="select-cell" v-if="applyInfo.returnGoods" @click="onSelect(1)">
|
||||
<view class="select-image">
|
||||
<image style="height: 51rpx; width: 51rpx" src="/static/order/t1.png"></image>
|
||||
</view>
|
||||
@@ -38,7 +38,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-cell" @click="onSelect(3)">
|
||||
<view class="select-cell" v-if="applyInfo.returnMoney" @click="onSelect(3)">
|
||||
<view class="select-image">
|
||||
<image style="height: 51rpx; width: 51rpx" src="/static/order/t3.png"></image>
|
||||
</view>
|
||||
@@ -56,14 +56,17 @@
|
||||
|
||||
<script>
|
||||
import UniIcons from "@/components/uni-icons/uni-icons.vue";
|
||||
|
||||
import { getAfterSaleInfo } from "@/api/after-sale";
|
||||
export default {
|
||||
components: {
|
||||
UniIcons,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sn: "",
|
||||
sn: "",
|
||||
sku: {}, //sku
|
||||
applyInfo:""
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -71,8 +74,20 @@ export default {
|
||||
let dData = decodeURIComponent(options.sku);
|
||||
let newData = JSON.parse(dData);
|
||||
this.sku = newData;
|
||||
|
||||
// 查看当前商品是否支持退款退货
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
getAfterSaleInfo(this.sn).then((response) => {
|
||||
if (response.data.success) {
|
||||
this.applyInfo = response.data.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择退货流程
|
||||
*/
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
<!-- 发票信息 -->
|
||||
<invoices :res="receiptList" @callbackInvoice="callbackInvoice" v-if="invoiceFlag" />
|
||||
<u-select v-model="shippingFlag" :list="shippingMethod" @confirm="checkedshipMethod"></u-select>
|
||||
<u-select v-model="shippingFlag" :list="shippingMethod" ></u-select>
|
||||
|
||||
<!-- 优惠券 -->
|
||||
<div class="box box4">
|
||||
@@ -252,7 +252,6 @@ export default {
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
|
||||
/**
|
||||
* 发票收据类型
|
||||
*/
|
||||
@@ -403,73 +402,78 @@ export default {
|
||||
/**
|
||||
* 提交订单准备支付
|
||||
*/
|
||||
submit() {
|
||||
if (!this.address.id) {
|
||||
uni.showToast({
|
||||
title: "请选择地址",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// 创建订单
|
||||
let client;
|
||||
// #ifdef H5
|
||||
client = "H5";
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
client = "WECHAT_MP";
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
client = "APP";
|
||||
// #endif
|
||||
|
||||
let submit = {
|
||||
client,
|
||||
way: this.routerVal.way,
|
||||
remark: this.remarkVal,
|
||||
parentOrderSn: "",
|
||||
};
|
||||
// 如果是拼团并且当前用户不是团长
|
||||
this.routerVal.parentOrder && this.routerVal.parentOrder.orderSn
|
||||
? (submit.parentOrderSn = this.routerVal.parentOrder.orderSn)
|
||||
: delete submit.parentOrderSn;
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
*/
|
||||
API_Trade.createTrade(submit).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "创建订单成功!",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 微信小程序中点击创建订单直接开始支付
|
||||
this.pay(res.data.result.sn);
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.navigateTo(
|
||||
`/pages/cart/payment/payOrder?trade_sn=${res.data.result.sn}`
|
||||
);
|
||||
// #endif
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "创建订单有误!请稍后重试",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 创建订单
|
||||
createTradeFun() {
|
||||
// 防抖
|
||||
this.$u.debounce(this.submit(), 3000);
|
||||
this.$u.throttle(() => {
|
||||
if (!this.address.id) {
|
||||
uni.showToast({
|
||||
title: "请选择地址",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// 创建订单
|
||||
let client;
|
||||
// #ifdef H5
|
||||
client = "H5";
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
client = "WECHAT_MP";
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
client = "APP";
|
||||
// #endif
|
||||
|
||||
let submit = {
|
||||
client,
|
||||
way: this.routerVal.way,
|
||||
remark: this.remarkVal,
|
||||
parentOrderSn: "",
|
||||
};
|
||||
// 如果是拼团并且当前用户不是团长
|
||||
this.routerVal.parentOrder && this.routerVal.parentOrder.orderSn
|
||||
? (submit.parentOrderSn = this.routerVal.parentOrder.orderSn)
|
||||
: delete submit.parentOrderSn;
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
*/
|
||||
API_Trade.createTrade(submit).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "创建订单成功!",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
// 如果当前价格为0跳转到订单列表
|
||||
if (this.orderMessage.priceDetailDTO.billPrice == 0) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/order/myOrder?status=0",
|
||||
});
|
||||
} else {
|
||||
// #ifdef MP-WEIXIN
|
||||
// 微信小程序中点击创建订单直接开始支付
|
||||
this.pay(res.data.result.sn);
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.navigateTo(
|
||||
`/pages/cart/payment/payOrder?trade_sn=${res.data.result.sn}`
|
||||
);
|
||||
// #endif
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "创建订单有误!请稍后重试",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
|
||||
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData(tabIndex)">
|
||||
<!-- 空白页 -->
|
||||
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
||||
<u-empty text="暂无订单" mode="list" v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></u-empty>
|
||||
<!-- 订单列表 -->
|
||||
<view class="seller-view" :key="oderIndex" v-for="(order, oderIndex) in tabItem.orderList">
|
||||
<!-- 店铺名称 -->
|
||||
@@ -57,20 +57,17 @@
|
||||
<u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
|
||||
确认收货
|
||||
</u-button>
|
||||
<u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="
|
||||
<!-- TODO 后续完善 -->
|
||||
<!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="
|
||||
order.orderStatus === 'CANCELLED' ||
|
||||
order.orderStatus === 'COMPLETE'
|
||||
" @click="reBuy(order)">
|
||||
再次购买
|
||||
</u-button>
|
||||
</u-button> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nodata" v-if="tabItem.loadStatus === 'noMore'">
|
||||
|
||||
</view>
|
||||
|
||||
<uni-load-more :status="tabItem.loadStatus"></uni-load-more>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@@ -100,14 +97,12 @@
|
||||
|
||||
<script>
|
||||
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
|
||||
import empty from "@/components/empty";
|
||||
import { getOrderList, cancelOrder, confirmReceipt } from "@/api/order.js";
|
||||
import { getClearReason } from "@/api/after-sale.js";
|
||||
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
|
||||
export default {
|
||||
components: {
|
||||
uniLoadMore,
|
||||
empty,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -463,10 +458,12 @@ export default {
|
||||
* 重新购买
|
||||
*/
|
||||
reBuy(order) {
|
||||
console.log(order)
|
||||
return
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/product/goods?id=" +
|
||||
order.groupSkuId +
|
||||
order.id +
|
||||
"&goodsId=" +
|
||||
order.goodsId,
|
||||
});
|
||||
@@ -677,14 +674,4 @@ page,
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.nodata {
|
||||
// padding-top: 300rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
width: 346rpx;
|
||||
height: 304rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,8 +20,11 @@
|
||||
</view>
|
||||
|
||||
<view class="logi-List" v-else>
|
||||
<view class="logi-List-title">
|
||||
暂无物流信息
|
||||
<view class="verificationCode" v-if="order.verificationCode ">
|
||||
券码: {{order.verificationCode}}
|
||||
</view>
|
||||
<view v-else class="logi-List-title">
|
||||
{{'暂无物流信息'}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -101,7 +104,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 客户服务, 售后,取消订单,查看物流,投诉等 -->
|
||||
<view class="info-view" v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderType =='PINTUAN'">
|
||||
<view class="info-view"
|
||||
v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderType =='PINTUAN'">
|
||||
<view style="width: 100%">
|
||||
<view class="order-info-view">
|
||||
<view class="title">服务</view>
|
||||
@@ -212,7 +216,7 @@
|
||||
import { getExpress } from "@/api/trade.js";
|
||||
import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js";
|
||||
|
||||
import {h5Copy} from "@/js_sdk/h5-copy/h5-copy.js";
|
||||
import { h5Copy } from "@/js_sdk/h5-copy/h5-copy.js";
|
||||
import shares from "@/components/m-share/index"; //分享
|
||||
|
||||
import { getClearReason } from "@/api/after-sale.js";
|
||||
@@ -252,7 +256,7 @@ export default {
|
||||
value: "订单已完成,祝您生活愉快",
|
||||
},
|
||||
TAKE: {
|
||||
title: "带核验",
|
||||
title: "待核验",
|
||||
},
|
||||
},
|
||||
order: {},
|
||||
@@ -359,7 +363,6 @@ export default {
|
||||
* 投诉
|
||||
*/
|
||||
complaint(sku) {
|
||||
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/order/complain/complain?sn=" +
|
||||
@@ -378,7 +381,6 @@ export default {
|
||||
},
|
||||
// 去支付
|
||||
toPay(val) {
|
||||
|
||||
val.sn
|
||||
? uni.navigateTo({
|
||||
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
|
||||
@@ -411,7 +413,7 @@ export default {
|
||||
this.cancelShow = true;
|
||||
},
|
||||
|
||||
//提交取消订单(未付款)
|
||||
//提交取消订单(未付款)
|
||||
submitCancel() {
|
||||
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
|
||||
if (res.data.success) {
|
||||
@@ -612,7 +614,7 @@ page,
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
margin: 10rpx 0rpx;
|
||||
|
||||
|
||||
.title {
|
||||
color: #666;
|
||||
width: 140rpx;
|
||||
@@ -651,7 +653,10 @@ page,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.verificationCode{
|
||||
font-weight: bold;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.bottom_view {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
|
||||
@@ -90,19 +90,23 @@ export default {
|
||||
uni.showLoading({
|
||||
title: "正在获取验证码",
|
||||
});
|
||||
sendMobile(this.codeForm.mobile).then((res) => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
if (res.data.success) {
|
||||
sendMobile(this.codeForm.mobile)
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
if (res.data.success) {
|
||||
this.$refs.uCode.start();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$refs.uCode.start();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$u.toast("请倒计时结束后再发送");
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<!-- 循环出当前可使用的第三方登录模式 -->
|
||||
<div class="login-item" v-for="(item,index) in loginList" :key="index">
|
||||
<u-icon :color="item.color" size="80" :name="item.icon" @click="navigateLogin(item)"></u-icon>
|
||||
<div>{{item.title}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<view class="text-tips cell" @click="clickCodeLogin">账号密码登录</view>
|
||||
@@ -14,10 +13,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { webConnect, openIdLogin } from "@/api/connect.js";
|
||||
import { openIdLogin } from "@/api/connect.js";
|
||||
import { whetherNavigate } from "@/utils/Foundation"; //登录跳转
|
||||
import { getUserInfo } from "@/api/members";
|
||||
import storage from "@/utils/storage.js";
|
||||
import api from "@/config/api.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -117,23 +117,23 @@ export default {
|
||||
methods: {
|
||||
/** 根据参数显示登录模块 */
|
||||
methodFilter(code) {
|
||||
let way = [];
|
||||
this.loginList.forEach((item) => {
|
||||
if (code.length != 0) {
|
||||
code.forEach((val) => {
|
||||
if (item.code == val) {
|
||||
way.push(item);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '配置有误请联系管理员',
|
||||
duration: 2000,
|
||||
icon:"none"
|
||||
});
|
||||
}
|
||||
});
|
||||
this.loginList = way;
|
||||
// let way = [];
|
||||
// this.loginList.forEach((item) => {
|
||||
// if (code.length != 0) {
|
||||
// code.forEach((val) => {
|
||||
// if (item.code == val) {
|
||||
// way.push(item);
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: '配置有误请联系管理员',
|
||||
// duration: 2000,
|
||||
// icon:"none"
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// this.loginList = way;
|
||||
},
|
||||
/**跳转到登录页面 */
|
||||
navigateLogin(connectLogin) {
|
||||
@@ -148,12 +148,8 @@ export default {
|
||||
|
||||
// #ifdef H5
|
||||
let code = connectLogin.code;
|
||||
webConnect(code).then((res) => {
|
||||
let data = res.data;
|
||||
if (data.success) {
|
||||
window.location = data.result;
|
||||
}
|
||||
});
|
||||
let buyer = api.buyer;
|
||||
window.open(buyer+`/connect/login/web/`+code, "_self");
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.nonH5OpenId(connectLogin);
|
||||
|
||||
@@ -1,234 +1,244 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-modal v-model="phoneAuthPopup" :title="projectName+'商城'" :show-confirm-button="false">
|
||||
<div class="tips">
|
||||
为了更好地用户体验,需要您授权手机号
|
||||
</div>
|
||||
<button class="register" type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
去授权
|
||||
</button>
|
||||
</u-modal>
|
||||
<view class="wx-auth-container">
|
||||
<div class="box">
|
||||
<view class="logo-info">
|
||||
<text class="title">欢迎进入{{ projectName }}商城</text>
|
||||
</view>
|
||||
<view class="small-tips">
|
||||
<view>为您提供优质服务,{{ projectName }}需要获取以下信息</view>
|
||||
<view>您的公开信息(昵称、头像)</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="primary" bindtap="getUserProfile" @click="getUserProfile()"
|
||||
class="btn-auth">确认微信授权</button>
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
<view class="container">
|
||||
<u-navbar :custom-back="back" title="小程序登录"></u-navbar>
|
||||
<u-modal v-model="phoneAuthPopup" :mask-close-able="true" :title="projectName+'商城'" :show-confirm-button="false">
|
||||
<div class="tips">
|
||||
为了更好地用户体验,需要您授权手机号
|
||||
</div>
|
||||
<button class="register" type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
去授权
|
||||
</button>
|
||||
</u-modal>
|
||||
<view class="wx-auth-container">
|
||||
<div class="box">
|
||||
<view class="logo-info">
|
||||
<text class="title">欢迎进入{{ projectName }}商城</text>
|
||||
</view>
|
||||
<view class="small-tips">
|
||||
<view>为您提供优质服务,{{ projectName }}需要获取以下信息</view>
|
||||
<view>您的公开信息(昵称、头像)</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="primary" bindtap="getUserProfile" @click="getUserProfile()" class="btn-auth">确认微信授权</button>
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mpAutoLogin
|
||||
} from "@/api/connect.js";
|
||||
import { mpAutoLogin } from "@/api/connect.js";
|
||||
|
||||
import {
|
||||
getUserInfo
|
||||
} from "@/api/members";
|
||||
import storage from "@/utils/storage.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 是否展示手机号码授权弹窗,默认第一步不展示,要先获取用户基础信息
|
||||
phoneAuthPopup: false,
|
||||
// 授权信息展示,商城名称
|
||||
projectName: "LiLi",
|
||||
//微信返回信息,用于揭秘信息,获取sessionkey
|
||||
code: '',
|
||||
//微信昵称
|
||||
nickName: '',
|
||||
//微信头像
|
||||
image: '',
|
||||
};
|
||||
},
|
||||
//微信小程序进入页面,先获取code,否则几率出现code和后续交互数据不对应情况
|
||||
mounted() {
|
||||
let that = this;
|
||||
//获取code
|
||||
uni.login({
|
||||
success: (res) => {
|
||||
that.code = res.code;
|
||||
},
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//获取用户信息
|
||||
getUserProfile(e) {
|
||||
let that = this;
|
||||
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
|
||||
uni.getUserProfile({
|
||||
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
||||
success: (res) => {
|
||||
that.nickName = res.userInfo.nickName;
|
||||
that.image = res.userInfo.avatarUrl;
|
||||
//展示手机号获取授权
|
||||
this.phoneAuthPopup = true;
|
||||
},
|
||||
fail: (res) => {
|
||||
that.nickName = "微信用户";
|
||||
that.image =
|
||||
"https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132";
|
||||
//展示手机号获取授权
|
||||
this.phoneAuthPopup = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取手机号授权
|
||||
getPhoneNumber(e) {
|
||||
import { whetherNavigate } from "@/utils/Foundation"; //登录跳转
|
||||
import { getUserInfo } from "@/api/members";
|
||||
import storage from "@/utils/storage.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 是否展示手机号码授权弹窗,默认第一步不展示,要先获取用户基础信息
|
||||
phoneAuthPopup: false,
|
||||
// 授权信息展示,商城名称
|
||||
projectName: "LiLi",
|
||||
//微信返回信息,用于揭秘信息,获取sessionkey
|
||||
code: "",
|
||||
//微信昵称
|
||||
nickName: "",
|
||||
//微信头像
|
||||
image: "",
|
||||
};
|
||||
},
|
||||
|
||||
let that = this;
|
||||
let iv = e.detail.iv;
|
||||
let encryptedData = e.detail.encryptedData;
|
||||
if (!e.detail.encryptedData) {
|
||||
uni.showToast({
|
||||
title: "请授予手机号码权限,手机号码会和会员系统用户绑定!",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
//微信小程序进入页面,先获取code,否则几率出现code和后续交互数据不对应情况
|
||||
mounted() {
|
||||
|
||||
let code = this.code;
|
||||
let image = this.image;
|
||||
let nickName = this.nickName;
|
||||
mpAutoLogin({
|
||||
encryptedData,
|
||||
iv,
|
||||
code,
|
||||
image,
|
||||
nickName,
|
||||
}).then((res) => {
|
||||
storage.setAccessToken(res.data.result.accessToken);
|
||||
storage.setRefreshToken(res.data.result.refreshToken);
|
||||
// 登录成功
|
||||
uni.showToast({
|
||||
title: "登录成功!",
|
||||
icon: "none",
|
||||
});
|
||||
//获取用户信息
|
||||
getUserInfo().then((user) => {
|
||||
storage.setUserInfo(user.data.result);
|
||||
storage.setHasLogin(true);
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({ withShareTicket: true });
|
||||
|
||||
});
|
||||
let that = this;
|
||||
//获取code
|
||||
uni.login({
|
||||
success: (res) => {
|
||||
that.code = res.code;
|
||||
},
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* TODO 此方法不一定是最优解,如果有更好的办法请在 https://gitee.com/beijing_hongye_huicheng/lilishop/issues 中提出
|
||||
* 小程序返回bug
|
||||
* 1.介于微信登录是在login.vue的基础上作为判断跳转来
|
||||
* 所以在页面栈中会自动记录回退路径,所以导致每次微信小程序点击回退就会自动返回login页面
|
||||
* 当然login页面的判断就是 没有登录就会跳转到微信小程序页面 导致了无法回退到之前页面
|
||||
* 2.解决方法: 尝试在回退的时候判断地址,让回退多一级这样就避免了
|
||||
*/
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
back() {
|
||||
whetherNavigate('wx');
|
||||
},
|
||||
//获取用户信息
|
||||
getUserProfile(e) {
|
||||
let that = this;
|
||||
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
|
||||
uni.getUserProfile({
|
||||
desc: "用于完善会员资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
||||
success: (res) => {
|
||||
that.nickName = res.userInfo.nickName;
|
||||
that.image = res.userInfo.avatarUrl;
|
||||
//展示手机号获取授权
|
||||
this.phoneAuthPopup = true;
|
||||
},
|
||||
fail: (res) => {
|
||||
that.nickName = "微信用户";
|
||||
that.image =
|
||||
"https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132";
|
||||
//展示手机号获取授权
|
||||
this.phoneAuthPopup = true;
|
||||
},
|
||||
});
|
||||
},
|
||||
//获取手机号授权
|
||||
getPhoneNumber(e) {
|
||||
let iv = e.detail.iv;
|
||||
let encryptedData = e.detail.encryptedData;
|
||||
if (!e.detail.encryptedData) {
|
||||
uni.showToast({
|
||||
title: "请授予手机号码权限,手机号码会和会员系统用户绑定!",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let code = this.code;
|
||||
let image = this.image;
|
||||
let nickName = this.nickName;
|
||||
mpAutoLogin({
|
||||
encryptedData,
|
||||
iv,
|
||||
code,
|
||||
image,
|
||||
nickName,
|
||||
}).then((res) => {
|
||||
storage.setAccessToken(res.data.result.accessToken);
|
||||
storage.setRefreshToken(res.data.result.refreshToken);
|
||||
// 登录成功
|
||||
uni.showToast({
|
||||
title: "登录成功!",
|
||||
icon: "none",
|
||||
});
|
||||
//获取用户信息
|
||||
getUserInfo().then((user) => {
|
||||
storage.setUserInfo(user.data.result);
|
||||
storage.setHasLogin(true);
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
/*微信授权*/
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
/*微信授权*/
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.wx-auth-container {
|
||||
width: 100%;
|
||||
margin-top: 20%;
|
||||
}
|
||||
.wx-auth-container {
|
||||
width: 100%;
|
||||
margin-top: 20%;
|
||||
}
|
||||
|
||||
.logo-info {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
padding: 20rpx;
|
||||
.logo-info {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
padding: 20rpx;
|
||||
|
||||
flex-direction: column;
|
||||
font-weight: bold;
|
||||
}
|
||||
flex-direction: column;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
-webkit-transform: scale(2.5);
|
||||
transform: scale(2.5);
|
||||
}
|
||||
image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
-webkit-transform: scale(2.5);
|
||||
transform: scale(2.5);
|
||||
}
|
||||
|
||||
.logo-info-img {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
}
|
||||
.logo-info-img {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
text.title,
|
||||
text.shop {
|
||||
display: inline-block;
|
||||
font-size: 60rpx;
|
||||
color: #333;
|
||||
}
|
||||
text.title,
|
||||
text.shop {
|
||||
display: inline-block;
|
||||
font-size: 60rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
text.shop {
|
||||
display: inline-block;
|
||||
font-size: 55rpx;
|
||||
color: #333;
|
||||
}
|
||||
text.shop {
|
||||
display: inline-block;
|
||||
font-size: 55rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.box {
|
||||
margin: 0 32rpx;
|
||||
}
|
||||
.box {
|
||||
margin: 0 32rpx;
|
||||
}
|
||||
|
||||
/* 文字提示*/
|
||||
.small-tips {
|
||||
width: 94%;
|
||||
padding: 20rpx;
|
||||
font-size: 24rpx;
|
||||
margin: 0 0 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
/* 文字提示*/
|
||||
.small-tips {
|
||||
width: 94%;
|
||||
padding: 20rpx;
|
||||
font-size: 24rpx;
|
||||
margin: 0 0 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.auth-button {
|
||||
padding: 10px 20px;
|
||||
width: calc(100% - 20 * 4rpx);
|
||||
}
|
||||
.auth-button {
|
||||
padding: 10px 20px;
|
||||
width: calc(100% - 20 * 4rpx);
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 80%;
|
||||
text-align: left;
|
||||
margin: 6% 10%;
|
||||
margin-top: 48rpx;
|
||||
line-height: 1.75;
|
||||
}
|
||||
.tips {
|
||||
width: 80%;
|
||||
text-align: left;
|
||||
margin: 6% 10%;
|
||||
margin-top: 48rpx;
|
||||
line-height: 1.75;
|
||||
}
|
||||
|
||||
.register {
|
||||
color: #00a327 !important;
|
||||
border: none !important;
|
||||
background: #fff !important;
|
||||
}
|
||||
.register {
|
||||
color: #00a327 !important;
|
||||
border: none !important;
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.btn {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-auth {
|
||||
width: 92%;
|
||||
margin: 0 auto 100rpx;
|
||||
.btn-auth {
|
||||
width: 92%;
|
||||
margin: 0 auto 100rpx;
|
||||
|
||||
border-radius: 100px;
|
||||
}
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
.btns {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -359,26 +359,7 @@ page {
|
||||
color: $font-color-light;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.good {
|
||||
color: #333;
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: url(/static/search/delete.png);
|
||||
background-size: 100%;
|
||||
position: absolute;
|
||||
left: -50rpx;
|
||||
top: -6rpx;
|
||||
}
|
||||
|
||||
&.cur:before {
|
||||
background: url(/static/global/selected.png);
|
||||
background-size: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
79
pages/product/customerservice/index.vue
Normal file
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<view>
|
||||
<chat></chat>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
var chat = requirePlugin('myPlugin')
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
onLoad (e) {
|
||||
const params = JSON.parse((decodeURIComponent(e.params)))
|
||||
chat.init({
|
||||
sign: params.mpSign, //必传,公司渠道唯一标识,腾讯云智服后台系统创建「小程序插件」渠道后,在「渠道管理」获取
|
||||
token: params.token, //非必填
|
||||
uid: params.uuid, //用户唯一标识,如果没有则不填写,默认为空
|
||||
title: params.storageName, //非必填,如果未填写,默认获取配置标题
|
||||
isRMB: '', //商品是否显示人民币¥,默认显示,false不显示
|
||||
data: { //参数c1,c2,c3,c4,c5用于传递用户信息,参数d1,d2,d3,d4,d5,d6用于传递商品信息,默认为空
|
||||
c1: '',
|
||||
c2: '',
|
||||
c3: '',
|
||||
c4: '',
|
||||
c5: '',
|
||||
d1: params.goodsName, //商品描述
|
||||
d2: params.price, //价格
|
||||
d3: '', //原价格
|
||||
d4: params.goodsImg, //展示商品图片链接
|
||||
d5: '', //商品跳转链接
|
||||
d6: params.goodsId, //商品id
|
||||
data: ''//加密串,非必填
|
||||
},
|
||||
viewUrl(res){ //需要跳转外部链接,则需要配置一个web-view
|
||||
if (res) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/webview/index?href=' + res
|
||||
})
|
||||
}
|
||||
},
|
||||
setTitle(res){ //设置标题
|
||||
if (res) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: res
|
||||
})
|
||||
}
|
||||
},
|
||||
setBarColor(res) { //设置导航栏背景色
|
||||
if (res) {
|
||||
wx.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: res
|
||||
})
|
||||
}
|
||||
},
|
||||
success(res){ //初始化成功时调用
|
||||
if (res.data == 'success') {
|
||||
console.log('success');
|
||||
}
|
||||
},
|
||||
fail(res){ //初始化失败时调用
|
||||
if (res.data == 'initError') {
|
||||
console.log(res.message);
|
||||
}
|
||||
},
|
||||
leave(res){ //离开会话页面
|
||||
if (res) {
|
||||
console.log(res);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -9,42 +9,40 @@
|
||||
<!-- 分享 -->
|
||||
<shares v-if="shareFlage && goodsDetail.id" :skuId="this.routerVal.id" :goodsId="this.routerVal.goodsId" :link="'/pages/product/goods?id='+this.routerVal.id+'&goodsId='+this.routerVal.goodsId"
|
||||
:thumbnail="goodsDetail.thumbnail" :goodsName="goodsDetail.goodsName" type="goods" @close="shareFlage = false" />
|
||||
<popups v-model="popupsSwitch" @tapPopup="handleNavbarList" :popData="navbarListData" :x="navbarListX" :y="navbarListY" placement="top-start" />
|
||||
<view class="index">
|
||||
<u-navbar :background="navbar" :is-back="false" :class="headerFlag ? 'header' : 'header bg-none scoll-hide'">
|
||||
|
||||
<!-- topBar -->
|
||||
<u-navbar :background="navbar" :is-back="false" :class="headerFlag ? 'header' : 'header bg-none scroll-hide'">
|
||||
<div class="headerRow">
|
||||
<div class="backs" @click="back()">
|
||||
<u-icon name="arrow-left" color="#8e8e8e"></u-icon>
|
||||
<div class="backs">
|
||||
<u-icon @click="back()" name="arrow-left" class="icon-back"></u-icon>
|
||||
|
||||
<u-icon name="list" @click="popupsSwitch = !popupsSwitch" class="icon-list"></u-icon>
|
||||
</div>
|
||||
<div class="headerList" :class="headerFlag ? 'tab-bar' : 'tab-bar scoll-hide'">
|
||||
<div class="headerList" :class="headerFlag ? 'tab-bar' : 'tab-bar scroll-hide'">
|
||||
<div class="headerRow">
|
||||
<div style="text-align: center" :span="3" v-for="header in headerList" :key="header.id" :class="{ cur: scrollId === header.id }" @click="headerTab(header.id)">
|
||||
<div class="nav-item" v-for="header in headerList" :key="header.id" :class="{ cur: scrollId === header.id }" @click="headerTab(header.id)">
|
||||
{{ header.text }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="share" @click="shareChange()">
|
||||
<image class="shareImg" src="/static/share.png" alt=""></image>
|
||||
</div>
|
||||
</div>
|
||||
</u-navbar>
|
||||
|
||||
<view class="showBack" v-show="!headerFlag">
|
||||
<u-row>
|
||||
<u-col :span="2" @click="back()">
|
||||
<div class="iconBag" style="text-align: center">
|
||||
<image class="headerImg" src="/static/bagBack.png" alt=""></image>
|
||||
</div>
|
||||
</u-col>
|
||||
<u-col :span="8"></u-col>
|
||||
<u-navbar :border-bottom="false" v-show="!headerFlag" class="header-only-back" :background="navbarOnlyBack" :is-back="false">
|
||||
<div>
|
||||
<div class="bg-back">
|
||||
<u-icon size="40" @click="back()" name="arrow-left" class="icon-back"></u-icon>
|
||||
<u-icon size="40" @click="popupsSwitch = !popupsSwitch" name="list" class="icon-list"></u-icon>
|
||||
|
||||
<u-col :span="2" class="share" style="text-align: center" @click="shareChange()">
|
||||
<image class="headerImg" src="/static/bagShare.png" alt=""></image>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</div>
|
||||
</div>
|
||||
</u-navbar>
|
||||
</view>
|
||||
|
||||
<view class="product-container" :style="{ height: productRefHeight }" ref="productRef" id="productRef">
|
||||
<scroll-view scroll-anchoring enableBackToTop="true" scroll-with-animation scroll-y class="scoll-page" :scroll-top="tabScrollTop" @scroll="pageScroll">
|
||||
<scroll-view scroll-anchoring enableBackToTop="true" scroll-with-animation scroll-y class="scroll-page" :scroll-top="tabScrollTop" @scroll="pageScroll">
|
||||
<view>
|
||||
<!-- 轮播图 -->
|
||||
<GoodsSwiper id="main1" :res="imgList" />
|
||||
@@ -54,9 +52,9 @@
|
||||
|
||||
<view class="card-box top-radius-0" id="main2">
|
||||
<!-- 活动不显示价钱 -->
|
||||
<view v-if="!is_promotion" class="desc-blod -goods-msg">
|
||||
<view v-if="!isPromotion" class="desc-bold -goods-msg">
|
||||
<view class="-goods-flex">
|
||||
<view class="desc-blod">
|
||||
<view class="desc-bold">
|
||||
{{ goodsDetail.goodsName || "" }}
|
||||
</view>
|
||||
<view class="favorite" @click="clickFavorite(goodsDetail.id)">
|
||||
@@ -84,12 +82,17 @@
|
||||
}} </span>
|
||||
</view>
|
||||
<view class="-goods-price" v-else> ¥<span class="price">0 </span>.00 </view>
|
||||
<view class="favorite" @click="clickFavorite(goodsDetail.id)">
|
||||
|
||||
<view class="icons share" @click="shareChange()">
|
||||
<u-icon size="30" name="share-fill"></u-icon>
|
||||
<view>分享</view>
|
||||
</view>
|
||||
<view class="icons" @click="clickFavorite(goodsDetail.id)">
|
||||
<u-icon size="30" :color="favorite ? '#f2270c' : '#262626'" :name="favorite ? 'heart-fill' : 'heart'"></u-icon>
|
||||
<view :style="{ color: favorite ? '#f2270c' : '#262626' }">{{ favorite ? "已收藏" : "收藏" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="-goods-name desc-blod">
|
||||
<view class="-goods-name desc-bold">
|
||||
{{ goodsDetail.goodsName || "" }}
|
||||
</view>
|
||||
<view class="-goods-desc">
|
||||
@@ -115,7 +118,8 @@
|
||||
<!-- 拼团用户列表 -->
|
||||
<PromotionAssembleListLayout v-if="isGroup" @to-assemble-buy-now="toAssembleBuyNow" :res="PromotionList" />
|
||||
|
||||
<view class="card-box">
|
||||
<!-- 配置地址 如果是虚拟产品的时候不展示 -->
|
||||
<view class="card-box" v-if="goodsDetail.goodsType !='VIRTUAL_GOODS'">
|
||||
<view class="card-flex" @click="shutMask(4)">
|
||||
<view class="card-title"> 已选 </view>
|
||||
<view class="card-content">
|
||||
@@ -143,7 +147,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 评价 -->
|
||||
<Evaluation id="main5" :goodsDetail="goodsDetail" v-if="goodsDetail.id" />
|
||||
<Evaluation id="main5" :goodsDetail="goodsDetail" />
|
||||
|
||||
<!-- 店铺推荐 -->
|
||||
<storeLayout id="main7" :storeDetail="storeDetail" :goodsDetail="goodsDetail" :res="recommendList" />
|
||||
@@ -162,10 +166,10 @@
|
||||
<u-icon size="34" class="red" name="home-fill"></u-icon>
|
||||
<view class="red icon-btn-name">店铺</view>
|
||||
</view>
|
||||
<!-- <view class="icon-btn-item" @click="linkMsgDetail()">
|
||||
<view class="icon-btn-item" @click="linkMsgDetail()">
|
||||
<u-icon size="34" name="kefu-ermai"></u-icon>
|
||||
<view class="icon-btn-name">客服</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="icon-btn-item" @click="reluchToCart()">
|
||||
<u-icon size="34" name="storeping-cart"></u-icon>
|
||||
<view class="icon-btn-name">购物车</view>
|
||||
@@ -174,7 +178,7 @@
|
||||
</view>
|
||||
<!-- 正常结算页面 -->
|
||||
<view class="detail-btn" v-if="!isGroup">
|
||||
<view class="to-store-car to-store-btn" @click="shutMask(4)">加入购物车</view>
|
||||
<view class="to-store-car to-store-btn" v-if="goodsDetail.goodsType!='VIRTUAL_GOODS'" @click="shutMask(4)">加入购物车</view>
|
||||
<view class="to-buy to-store-btn" @click="shutMask(4, 'buy')">立即购买</view>
|
||||
<view class="to-store-car to-store-btn" v-if="startTimer">暂未开始</view>
|
||||
</view>
|
||||
@@ -232,7 +236,7 @@ import {
|
||||
import * as API_trade from "@/api/trade.js";
|
||||
import * as API_Members from "@/api/members.js";
|
||||
import * as API_store from "@/api/store.js";
|
||||
|
||||
import { modelNavigateTo } from "@/pages/tabbar/home/template/tpl.js";
|
||||
/************请求存储***************/
|
||||
import storage from "@/utils/storage.js";
|
||||
|
||||
@@ -250,8 +254,10 @@ import GoodsSwiper from "./product/goods/-goods-swiper"; //轮播图组件
|
||||
import popupGoods from "./product/popup/goods"; //购物车商品的模块
|
||||
import popupAddress from "./product/popup/address"; //地址选择模块
|
||||
import shares from "@/components/m-share/index"; //分享
|
||||
import popups from "@/components/popups/popups"; //气泡框
|
||||
export default {
|
||||
components: {
|
||||
popups,
|
||||
shares,
|
||||
PromotionLayout,
|
||||
PromotionDetailsLayout,
|
||||
@@ -268,13 +274,51 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// #ifdef H5
|
||||
navbarListX: 110, //导航栏列表栏x轴
|
||||
navbarListY: 80, //导航栏列表栏y轴
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
navbarListX: 100, //导航栏列表栏x轴
|
||||
navbarListY: 140, //导航栏列表栏y轴
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
navbarListX: 120, //导航栏列表栏x轴
|
||||
navbarListY: 170, //导航栏列表栏y轴
|
||||
// #endif
|
||||
navbarListData: [
|
||||
//导航栏列表栏数据
|
||||
{
|
||||
title: "首页",
|
||||
icon: "home-fill",
|
||||
___type: "other",
|
||||
},
|
||||
{
|
||||
title: "购物车",
|
||||
icon: "bag-fill",
|
||||
___type: "other",
|
||||
},
|
||||
{
|
||||
title: "搜索",
|
||||
icon: "search",
|
||||
___type: "category",
|
||||
},
|
||||
{
|
||||
title: "个人中心",
|
||||
icon: "account-fill",
|
||||
___type: "other",
|
||||
},
|
||||
],
|
||||
popupsSwitch: false, //导航栏列表栏开关
|
||||
shareFlage: false,
|
||||
selectedGoods: "", //选择的商品规格昵称
|
||||
is_promotion: true, //判断显示拼团活动文字
|
||||
isPromotion: true, //判断显示拼团活动文字
|
||||
isGroup: false, // 是否是拼团活动
|
||||
pointDetail: "", // 是否是积分商品
|
||||
assemble: "", //拼团的sku
|
||||
scroll_mask_height: 0, //促销活动的高度
|
||||
navbarOnlyBack: {
|
||||
background: "transparent",
|
||||
},
|
||||
navbar: {
|
||||
background: "#fff",
|
||||
},
|
||||
@@ -286,7 +330,7 @@ export default {
|
||||
},
|
||||
headerFlag: false, //顶部导航显示与否
|
||||
headerList: [
|
||||
//顶部导航文字
|
||||
//顶部导航文字按照规则来 详情全局搜索
|
||||
{
|
||||
text: "商品",
|
||||
id: "1",
|
||||
@@ -350,18 +394,28 @@ export default {
|
||||
routerVal: "",
|
||||
};
|
||||
},
|
||||
// #ifdef MP-WEIXNI
|
||||
shareAppMessage() {
|
||||
return {
|
||||
title: this.goodsDetail.goodsName,
|
||||
type: 0,
|
||||
query:`id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`,
|
||||
path: `/pages/product/goods`,
|
||||
imageUrl:this.goodsDetail.goodsGalleryList[0],
|
||||
};
|
||||
},
|
||||
// #endif
|
||||
watch: {
|
||||
isGroup(val) {
|
||||
if (val) {
|
||||
let timer = setInterval(() => {
|
||||
this.$refs.popupGoods.buyType = "PINTUAN";
|
||||
|
||||
clearInterval(timer);
|
||||
}, 100);
|
||||
|
||||
this.is_promotion = false;
|
||||
this.isPromotion = false;
|
||||
} else {
|
||||
this.is_promotion = true;
|
||||
this.isPromotion = true;
|
||||
this.$refs.popupGoods.buyType = "";
|
||||
}
|
||||
},
|
||||
@@ -398,6 +452,13 @@ export default {
|
||||
},
|
||||
async onLoad(options) {
|
||||
this.routerVal = options;
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({
|
||||
withShareTicket: true,
|
||||
menus: ["shareAppMessage", "shareTimeline"],
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
async onShow() {
|
||||
this.goodsDetail = {};
|
||||
@@ -419,7 +480,16 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 循环出当前促销是否为空
|
||||
/**
|
||||
* 导航栏列表栏
|
||||
*/
|
||||
handleNavbarList(val) {
|
||||
modelNavigateTo({ url: val });
|
||||
},
|
||||
|
||||
/**
|
||||
* 循环出当前促销是否为空
|
||||
*/
|
||||
emptyPromotion() {
|
||||
if (
|
||||
this.PromotionList == "" ||
|
||||
@@ -429,7 +499,10 @@ export default {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
/**初始化信息 */
|
||||
|
||||
/**
|
||||
* 初始化信息
|
||||
*/
|
||||
async init(id, goodsId, distributionId) {
|
||||
this.isGroup = false; //初始化拼团
|
||||
this.productId = id; // skuId
|
||||
@@ -440,6 +513,10 @@ export default {
|
||||
});
|
||||
|
||||
let response = await getGoods(id, goodsId);
|
||||
if (!response.data.success) {
|
||||
uni.navigateBack();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 这里是绑定分销员
|
||||
if (distributionId || this.$store.state.distributionId) {
|
||||
@@ -486,7 +563,37 @@ export default {
|
||||
this.getGoodsCollectionFun(this.goodsDetail.id);
|
||||
}
|
||||
},
|
||||
linkMsgDetail() {
|
||||
// 客服
|
||||
// #ifdef MP-WEIXIN
|
||||
|
||||
const params = {
|
||||
storeName: this.storeDetail.storeName,
|
||||
goodsName: this.goodsDetail.goodsName,
|
||||
goodsId: this.goodsDetail.goodsId,
|
||||
goodsImg: this.goodsDetail.thumbnail,
|
||||
price: this.goodsDetail.promotionPrice || this.goodsDetail.price,
|
||||
// originalPrice: this.goodsDetail.original || this.goodsDetail.price,
|
||||
uuid: storage.getUuid(),
|
||||
token: storage.getAccessToken(),
|
||||
sign: this.storeDetail.yzfSign,
|
||||
mpSign: this.storeDetail.yzfMpSign,
|
||||
};
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/product/customerservice/index?params=" +
|
||||
encodeURIComponent(JSON.stringify(params)),
|
||||
});
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
const sign = this.storeDetail.yzfSign;
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
|
||||
sign,
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 格式化金钱 1999 --> [1999,00]
|
||||
formatPrice(val) {
|
||||
if (typeof val == "undefined") {
|
||||
@@ -523,7 +630,6 @@ export default {
|
||||
toAssembleBuyNow(order) {
|
||||
this.shutMask(4, "PINTUAN", order);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看购物车
|
||||
*/
|
||||
@@ -624,6 +730,7 @@ export default {
|
||||
keyword: this.goodsDetail.name,
|
||||
}).then((res) => {
|
||||
this.likeGoodsList = res.data.result.content;
|
||||
console.warn(this.likeGoodsList);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<view class="evaluate-title">评价</view>
|
||||
<text class="evaluate-num">{{ commDetail.total || '0' }}+</text>
|
||||
<text class="tip">好评率 {{ goodsDetail.grade || '100' }}%</text>
|
||||
<text class="tip">好评率 {{ grade || '100' }}%</text>
|
||||
</view>
|
||||
<div v-if="commDetail && commDetail.records && commDetail.records.length > 0">
|
||||
<view class="eva-box" v-for="(commItem,commIndex) in commDetail.records.slice(0,2)" :key="commIndex">
|
||||
@@ -51,6 +51,7 @@ export default {
|
||||
lightColor: this.$lightColor,
|
||||
// 评论集合
|
||||
commDetail: [],
|
||||
grade: "",
|
||||
// 评论分页提交数据
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
@@ -59,9 +60,25 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
props: ["goodsDetail"],
|
||||
props: {
|
||||
goodsDetail: {
|
||||
default: {},
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
goodsDetail: {
|
||||
handler(val) {
|
||||
this.grade = val.grade;
|
||||
this.getGoodsComments();
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getGoodsComments();
|
||||
// this.getGoodsComments();
|
||||
},
|
||||
methods: {
|
||||
parseLoaded() {
|
||||
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
// #ifdef MP-WEIXIN
|
||||
margin-top: var(--status-bar-height);
|
||||
margin-top: 44px;
|
||||
// #endif
|
||||
width: 750rpx;
|
||||
height: 750rpx;
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
<!-- 有活动商品价格 -->
|
||||
<view class="goods-price " v-if="goodsDetail.promotionPrice">
|
||||
<span v-if="goodsDetail.promotionPrice && !pointDetail">
|
||||
<span v-if="goodsDetail.promotionPrice && !pointDetail">
|
||||
¥
|
||||
<span class="goods-price-promotionShow goods-price-bigshow" >{{ formatPrice(goodsDetail.promotionPrice)[0] }}</span>
|
||||
<span class="goods-price-promotionShow goods-price-bigshow">{{ formatPrice(goodsDetail.promotionPrice)[0] }}</span>
|
||||
.{{ formatPrice(goodsDetail.promotionPrice)[1] }}
|
||||
</span>
|
||||
<span v-if="pointDetail.points">
|
||||
<span v-if="pointDetail.points">
|
||||
|
||||
<span class="goods-price-promotionShow goods-price-bigshow" >{{ pointDetail.points }}</span>
|
||||
<span class="goods-price-promotionShow goods-price-bigshow">{{ pointDetail.points }}</span>
|
||||
积分
|
||||
</span>
|
||||
<div class="promotion-box">
|
||||
@@ -27,18 +27,18 @@
|
||||
formatPrice(goodsDetail.price)[0]
|
||||
}}</span>
|
||||
.{{ formatPrice(goodsDetail.price)[1] }}
|
||||
|
||||
|
||||
</div>
|
||||
</view>
|
||||
<!-- 正常商品的价格 -->
|
||||
<view class="goods-price" v-else>
|
||||
<span>
|
||||
¥
|
||||
<span class="goods-price-bigshow">{{
|
||||
¥
|
||||
<span class="goods-price-bigshow">{{
|
||||
formatPrice(goodsDetail.price)[0]
|
||||
}}</span>
|
||||
.{{ formatPrice(goodsDetail.price)[1] }}
|
||||
|
||||
.{{ formatPrice(goodsDetail.price)[1] }}
|
||||
|
||||
</span>
|
||||
</view>
|
||||
<view class="goods-check-skus">
|
||||
@@ -69,7 +69,8 @@
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="btns">
|
||||
<view class="box-btn card" v-if="buyType !='PINTUAN'" @click="addToCartOrBuy('cart')">加入购物车</view>
|
||||
|
||||
<view class="box-btn card" v-if="buyType != 'PINTUAN' && goodsDetail.goodsType!='VIRTUAL_GOODS'" @click="addToCartOrBuy('cart')">加入购物车</view>
|
||||
<view class="box-btn buy" @click="addToCartOrBuy('buy')">立即购买</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -100,8 +101,8 @@ export default {
|
||||
formatList: [],
|
||||
currentSelceted: [],
|
||||
skuList: "",
|
||||
isMask:false, //是否显示遮罩层
|
||||
isClose:false, //是否可以点击遮罩关闭
|
||||
isMask: false, //是否显示遮罩层
|
||||
isClose: false, //是否可以点击遮罩关闭
|
||||
};
|
||||
},
|
||||
props: [
|
||||
@@ -110,7 +111,7 @@ export default {
|
||||
"selectedSku",
|
||||
"goodsSpec",
|
||||
"addr",
|
||||
"pointDetail" // 积分详情
|
||||
"pointDetail", // 积分详情
|
||||
],
|
||||
watch: {
|
||||
buyType: {
|
||||
@@ -128,6 +129,8 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
// 格式化金钱 1999 --> [1999,00]
|
||||
formatPrice(val) {
|
||||
if (typeof val == "undefined") {
|
||||
@@ -143,11 +146,9 @@ export default {
|
||||
/**点击规格 */
|
||||
handleClickSpec(val, index, specValue) {
|
||||
this.$set(this.currentSelceted, index, specValue.id);
|
||||
|
||||
let selectedSkuId = this.goodsSpec.find((i) => {
|
||||
let matched = true;
|
||||
let specValues = i.specValues.filter((j) => j.specName !== "images");
|
||||
|
||||
for (let n = 0; n < specValues.length; n++) {
|
||||
if (specValues[n].specValueId !== this.currentSelceted[n]) {
|
||||
matched = false;
|
||||
@@ -168,7 +169,7 @@ export default {
|
||||
};
|
||||
this.selectName = specValue.value;
|
||||
|
||||
this.$emit("handleClickSku", selectedSkuId.skuId,this.goodsDetail.id);
|
||||
this.$emit("handleClickSku", selectedSkuId.skuId, this.goodsDetail.id);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -197,42 +198,30 @@ export default {
|
||||
|
||||
this.$emit("queryCart");
|
||||
this.closeMask();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 判断是否拼团商品
|
||||
if (this.buyType) {
|
||||
data.cartType = "PINTUAN";
|
||||
} else {
|
||||
}
|
||||
else if(this.goodsDetail.goodsType == 'VIRTUAL_GOODS'){
|
||||
data.cartType = "VIRTUAL";
|
||||
}
|
||||
else {
|
||||
data.cartType = "BUY_NOW";
|
||||
}
|
||||
|
||||
|
||||
|
||||
API_trade.addToCart(data).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/fillorder?way=${data.cartType}&addr=${
|
||||
this.addr.id || ''
|
||||
this.addr.id || ""
|
||||
}&parentOrder=${encodeURIComponent(
|
||||
JSON.stringify(this.parentOrder)
|
||||
)}`,
|
||||
});
|
||||
}
|
||||
else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -301,8 +290,9 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
this.formatSku(this.goodsSpec);
|
||||
|
||||
console.log(this.goodsDetail);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
<template>
|
||||
<view v-if="storeDetail">
|
||||
<!-- 商店信息 -->
|
||||
<view class="store-info" >
|
||||
<view class="store-info">
|
||||
<view class="logo">
|
||||
<u-image width="120rpx" mode="aspectFit" height="120rpx" :src="storeDetail.storeLogo"></u-image>
|
||||
</view>
|
||||
<view class="name-star star-con">
|
||||
<text class="name">{{ storeDetail.storeName }}</text>
|
||||
<view>
|
||||
<text :class="{ star: storeDetail.store_service_credit > 0 }"></text>
|
||||
<text :class="{ star: storeDetail.store_service_credit > 1 }"></text>
|
||||
<text :class="{ star: storeDetail.store_service_credit > 2 }"></text>
|
||||
<text :class="{ star: storeDetail.store_service_credit > 3 }"></text>
|
||||
<text :class="{ star: storeDetail.store_service_credit > 4 }"></text>
|
||||
</view>
|
||||
<div class="name">
|
||||
{{ storeDetail.storeName }}
|
||||
<span v-if="storeDetail.selfOperated == 1" class="shopTag">自营</span>
|
||||
</div>
|
||||
<div class="store-row">
|
||||
<div class="collectionNum">{{ storeDetail.collectionNum || 0 }}人关注</div>
|
||||
<div class="goodsNum">{{ storeDetail.goodsNum || 0 }}件商品</div>
|
||||
</div>
|
||||
</view>
|
||||
<view class="to-store-btn" @click="tostorePage(goodsDetail)">
|
||||
<view>进店逛逛</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="store-recommend" >
|
||||
<view class="store-recommend">
|
||||
<view class="store-recommend-title">商品推荐</view>
|
||||
<view class="recommend-list">
|
||||
<view class="recommend-item" @click="clickGoods(item)" v-for="(item, index) in res" :key="index">
|
||||
@@ -57,10 +57,9 @@ export default {
|
||||
},
|
||||
// 点击商品
|
||||
clickGoods(val) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/product/goods?id=${val.id}&goodsId=${val.goodsId}`
|
||||
uni.navigateTo({
|
||||
url: `/pages/product/goods?id=${val.id}&goodsId=${val.goodsId}`,
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
tostorePage(val) {
|
||||
@@ -73,7 +72,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import "../product.scss";
|
||||
.recommend-item-name {
|
||||
height: 70rpx;
|
||||
@@ -108,6 +106,16 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.shopTag{
|
||||
background: $main-color;
|
||||
font-size: 24rpx;
|
||||
padding: 0 12rpx;
|
||||
margin-left: 10rpx;
|
||||
font-weight: normal;
|
||||
border-radius: 10rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.recommend-list-view {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -135,15 +143,26 @@ export default {
|
||||
font-size: 30rpx;
|
||||
|
||||
.name {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
font-weight: 700;
|
||||
font-size: 28rpx;
|
||||
line-height: 24px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.desc {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-left: 10px;
|
||||
text{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.to-store-btn {
|
||||
padding: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
> view {
|
||||
font-size: 24rpx;
|
||||
@@ -164,7 +183,6 @@ export default {
|
||||
flex-direction: column;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -215,4 +233,16 @@ export default {
|
||||
|
||||
margin: 20rpx 0 0 0;
|
||||
}
|
||||
.goodsNum,
|
||||
.collectionNum {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
.store-row {
|
||||
display: flex;
|
||||
margin: 10rpx 0;
|
||||
> div {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.red {
|
||||
color: $jd-color;
|
||||
}
|
||||
page{
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
.num-icon {
|
||||
@@ -48,7 +48,7 @@ page{
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
.desc-blod {
|
||||
.desc-bold {
|
||||
flex: 8;
|
||||
font-weight: 700;
|
||||
color: #262626;
|
||||
@@ -72,7 +72,7 @@ page{
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.favorite {
|
||||
.icons,.favorite {
|
||||
flex: 1;
|
||||
font-size: 22rpx;
|
||||
color: #262626;
|
||||
@@ -127,45 +127,81 @@ page{
|
||||
}
|
||||
|
||||
.headerRow {
|
||||
height: 44px; //默认uni navbar就是44px
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
background: #fff !important;
|
||||
> div {
|
||||
flex: 1;
|
||||
}
|
||||
// background: #fff !important;
|
||||
|
||||
> .headerList {
|
||||
flex: 8;
|
||||
}
|
||||
// > div:nth-child(2) {
|
||||
// flex: 1;
|
||||
// .headerList{
|
||||
// display: flex;
|
||||
// div{
|
||||
// flex: 1;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// > div:nth-child(3) {
|
||||
// width: 100rpx;
|
||||
// }
|
||||
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.scoll-hide {
|
||||
.scroll-hide {
|
||||
opacity: 0;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
.cur {
|
||||
color: #333;
|
||||
|
||||
border-bottom: 6rpx solid $main-color;
|
||||
color: $main-color;
|
||||
}
|
||||
.header {
|
||||
.cur::after {
|
||||
content: "";
|
||||
height: 6rpx;
|
||||
|
||||
background: $main-color;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.header-only-back {
|
||||
background: transparent;
|
||||
}
|
||||
.header,
|
||||
.header-only-back {
|
||||
padding-left: 10rpx;
|
||||
position: fixed;
|
||||
top: var(--status-bar-height);
|
||||
width: 100%;
|
||||
|
||||
z-index: 8;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
/deep/ .u-navbar {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
.nav-item {
|
||||
flex: 2;
|
||||
position: relative;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.header {
|
||||
color: #666666;
|
||||
background-color: #fff;
|
||||
|
||||
.tab-bar {
|
||||
width: 100%;
|
||||
color: #666;
|
||||
font-weight: 400;
|
||||
|
||||
view {
|
||||
padding: 0 3px;
|
||||
}
|
||||
@@ -214,14 +250,32 @@ page{
|
||||
}
|
||||
|
||||
.main-page {
|
||||
height: calc(100% - var(--status-bar-height)) ;
|
||||
height: calc(100% - var(--status-bar-height));
|
||||
overflow: hidden;
|
||||
}
|
||||
.icon-back {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
.icon-list {
|
||||
border-left: 2rpx solid rgb(194, 194, 194);
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
.backs,
|
||||
.bg-back {
|
||||
width: 150rpx;
|
||||
border: 2rpx solid #e8e8e8;
|
||||
border-radius: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 8rpx 0;
|
||||
}
|
||||
.bg-back {
|
||||
background: rgba($color: #fff, $alpha: 0.8);
|
||||
}
|
||||
.backs {
|
||||
// width: 150rpx;
|
||||
text-align: center;
|
||||
font-size: 42rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.headerImg {
|
||||
@@ -253,8 +307,6 @@ page {
|
||||
}
|
||||
|
||||
.product-container {
|
||||
// background: #f0f0f0;
|
||||
|
||||
.header-line {
|
||||
height: 1px;
|
||||
background: #f2f2f2;
|
||||
@@ -265,12 +317,12 @@ page {
|
||||
z-index: 999;
|
||||
transition: all 0.5s;
|
||||
|
||||
&.scoll-hide {
|
||||
&.scroll-hide {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
.scoll-page {
|
||||
.scroll-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -328,7 +380,7 @@ page {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
position: fixed;
|
||||
margin-top: calc( 10px);
|
||||
margin-top: calc(10px);
|
||||
z-index: 8;
|
||||
width: 100%;
|
||||
|
||||
@@ -337,12 +389,6 @@ page {
|
||||
}
|
||||
}
|
||||
|
||||
.u-mode-light-error {
|
||||
background: #ffebec !important;
|
||||
padding: 8rpx 16rpx;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.showBox {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
@@ -363,7 +409,7 @@ page {
|
||||
}
|
||||
}
|
||||
|
||||
.status_bar{
|
||||
.status_bar {
|
||||
background: #fff;
|
||||
height: var(--status-bar-height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,12 @@ export default {
|
||||
this.storeId = options.id;
|
||||
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({ withShareTicket: true });
|
||||
// #endif
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 点击分享
|
||||
|
||||
@@ -221,36 +221,6 @@ export default {
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
z-index: 9999;
|
||||
|
||||
.back {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
background: url(/static/global/select.png) center no-repeat;
|
||||
background-size: 50%;
|
||||
}
|
||||
|
||||
.input-wrap {
|
||||
width: 600rpx;
|
||||
height: 58rpx;
|
||||
padding: 10rpx 30rpx 10rpx 100rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 50rpx;
|
||||
position: relative;
|
||||
border: 1px solid #29bb9c;
|
||||
background: url(/static/global/select.png) center left no-repeat;
|
||||
background-position: 40rpx;
|
||||
input {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.share {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
background: url(/static/global/select.png) center no-repeat;
|
||||
background-size: 50%;
|
||||
}
|
||||
}
|
||||
.tab-header {
|
||||
position: fixed;
|
||||
|
||||
370
pages/promotion/lives.vue
Normal file
@@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<u-navbar class="navbar">
|
||||
<view class="slot-wrap">
|
||||
<u-search placeholder="搜索直播间" @custom="searchLive" @clear="clear" @search="searchLive" v-model="keyword"></u-search>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<!-- 轮播图 -->
|
||||
<u-swiper @click="clickSwiper" class="swiper" :effect3d="true" :list="swiperImg">
|
||||
|
||||
</u-swiper>
|
||||
<u-tabs :is-scroll="false" @change="changeTabs" :current="current" :active-color="activeColor" inactive-color="#606266" ref="tabs" :list="tabs"></u-tabs>
|
||||
|
||||
<div class="wrapper">
|
||||
<!-- 直播中 全部 直播回放 -->
|
||||
<div class="live-item" :class="{'invalid':item.status == 'END'}" v-for="(item,index) in liveList" :key="index" @click="handleLivePlayer(item)">
|
||||
<div class="live-cover-img">
|
||||
<div class="tips">
|
||||
<div class="live-box">
|
||||
<image class="live-gif" src="./static/live.gif"></image>
|
||||
</div>
|
||||
<span>{{item.status == 'END' ? '已结束' : item.status =='NEW' ? '未开始' : '直播中'}}</span>
|
||||
</div>
|
||||
<div class="bg"></div>
|
||||
<u-image width="326" height="354" :src="item.shareImg" />
|
||||
</div>
|
||||
<div class="live-goods">
|
||||
<div class="live-goods-name">
|
||||
{{item.name}}
|
||||
</div>
|
||||
<div class="live-store">
|
||||
<span class="wes">lilishop</span>
|
||||
</div>
|
||||
<div class="live-goods-list">
|
||||
<div class="live-goods-item">
|
||||
<u-image border-radius="20" :src="item.roomGoodsList ? item.roomGoodsList[0] : ''" height="140"></u-image>
|
||||
</div>
|
||||
<div class="live-goods-item">
|
||||
<u-image border-radius="20" :src="item.roomGoodsList ? item.roomGoodsList[1] : ''" height="140"></u-image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<u-loadmore v-if="liveList.length > 10" bg-color="#f8f8f8" :status="status" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLiveList } from "@/api/promotions.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
status: "loadmore",
|
||||
activeColor: this.$lightColor,
|
||||
current: 0, // 当前tabs索引
|
||||
keyword: "", //搜索直播间
|
||||
// 标签栏
|
||||
tabs: [
|
||||
{
|
||||
name: "直播中",
|
||||
},
|
||||
{
|
||||
name: "全部",
|
||||
},
|
||||
],
|
||||
// 导航栏的配置
|
||||
background: {
|
||||
background: "#ff9f28",
|
||||
},
|
||||
// 直播间params
|
||||
params: [
|
||||
{
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
status: "START",
|
||||
},
|
||||
{
|
||||
pageNumber: 1,
|
||||
pageSize: 4,
|
||||
},
|
||||
],
|
||||
// 推荐直播间Params
|
||||
recommendParams: {
|
||||
pageNumber: 1,
|
||||
pageSize: 3,
|
||||
recommend: 0,
|
||||
},
|
||||
// 直播间列表
|
||||
liveList: [],
|
||||
// 推荐直播间列表
|
||||
recommendLiveList: [],
|
||||
|
||||
//轮播图滚动的图片
|
||||
swiperImg: [
|
||||
{
|
||||
image:
|
||||
"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/48d789cb9c864b7b87c1c0f70996c3e8.jpeg",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.params[this.current].pageNumber = 1;
|
||||
this.liveList = [];
|
||||
this.getLives();
|
||||
|
||||
this.getRecommendLives();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.params[this.current].pageNumber++;
|
||||
this.getLives();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击标签栏切换
|
||||
*/
|
||||
changeTabs(index) {
|
||||
this.current = index;
|
||||
this.init();
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化直播间
|
||||
*/
|
||||
init() {
|
||||
this.liveList = [];
|
||||
this.status = "loadmore";
|
||||
this.getLives();
|
||||
},
|
||||
|
||||
/**
|
||||
* 清除搜索内容
|
||||
*/
|
||||
clear() {
|
||||
delete this.params[this.current].name;
|
||||
this.init();
|
||||
},
|
||||
/**
|
||||
* 点击顶部推荐直播间
|
||||
*/
|
||||
clickSwiper(val) {
|
||||
console.log(this.swiperImg[val]);
|
||||
this.handleLivePlayer(this.swiperImg[val]);
|
||||
},
|
||||
|
||||
/**
|
||||
* 搜索直播间
|
||||
*/
|
||||
searchLive(val) {
|
||||
this.params[this.current].pageNumber = 1;
|
||||
this.params[this.current].name = val;
|
||||
this.init();
|
||||
},
|
||||
/**
|
||||
* 获取推荐直播间
|
||||
*/
|
||||
async getRecommendLives() {
|
||||
this.status = "loading";
|
||||
let recommendLives = await getLiveList(this.recommendParams);
|
||||
if (recommendLives.data.success) {
|
||||
// 推荐直播间
|
||||
if (recommendLives.data.result.records.length != 0) {
|
||||
this.status = "loadmore";
|
||||
this.recommendLives = recommendLives.data.result.records;
|
||||
} else {
|
||||
this.status = "noMore";
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果推荐直播间没有的情况下
|
||||
* 1.获取直播间第一个图片
|
||||
* 2.如果没有直播间设置一个默认图片
|
||||
*/
|
||||
|
||||
if (this.recommendLives.length == 0) {
|
||||
if (this.liveList[0].shareImg) {
|
||||
this.$set(this, "swiperImg", [
|
||||
{
|
||||
image: this.liveList[0].shareImg,
|
||||
roomId: this.liveList[0].roomId,
|
||||
},
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
this.recommendLives.forEach((item) => {
|
||||
this.$set(this, "swiperImg", [
|
||||
{ image: item.shareImg, roomId: item.roomId },
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取直播间
|
||||
*/
|
||||
async getLives() {
|
||||
this.status = "loading";
|
||||
let res = await getLiveList(this.params[this.current]);
|
||||
// 直播间
|
||||
if (res.data.success) {
|
||||
if (res.data.result.records.length != 0) {
|
||||
this.status = "loadmore";
|
||||
this.liveList.push(...res.data.result.records);
|
||||
} else {
|
||||
this.status = "noMore";
|
||||
}
|
||||
res.data.result.total >
|
||||
this.params[this.current].pageNumber *
|
||||
this.params[this.current].pageSize
|
||||
? (this.status = "loadmore")
|
||||
: (this.status = "noMore");
|
||||
|
||||
console.log(this.status);
|
||||
this.liveList.forEach((item) => {
|
||||
if (item.roomGoodsList) {
|
||||
item.roomGoodsList = JSON.parse(item.roomGoodsList);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 进入直播间
|
||||
*/
|
||||
handleLivePlayer(val) {
|
||||
let roomId = val.roomId; // 填写具体的房间号,可通过下面【获取直播房间列表】 API 获取
|
||||
let customParams = encodeURIComponent(
|
||||
JSON.stringify({ path: "pages/index/index", pid: 1 })
|
||||
); // 开发者在直播间页面路径上携带自定义参数,后续可以在分享卡片链接和跳转至商详页时获取,详见【获取自定义参数】、【直播间到商详页面携带参数】章节(上限600个字符,超过部分会被截断)
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=" +
|
||||
roomId +
|
||||
"&custom_params=" +
|
||||
customParams,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.slot-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* 如果您想让slot内容占满整个导航栏的宽度 */
|
||||
flex: 1;
|
||||
/* 如果您想让slot内容与导航栏左右有空隙 */
|
||||
/* padding: 0 30rpx; */
|
||||
}
|
||||
.invalid {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
.wrapper {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
.live-item {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
border-radius: 20rpx;
|
||||
flex-wrap: wrap;
|
||||
background: #fff;
|
||||
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
.live-cover-img {
|
||||
position: relative;
|
||||
}
|
||||
.swiper {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.live-goods {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
padding: 16rpx 24rpx 24rpx;
|
||||
}
|
||||
.live-goods-name {
|
||||
height: 84rpx;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
.live-store {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 20rpx 0;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 50rpx);
|
||||
}
|
||||
.live-gif {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.live-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
width: 40rpx;
|
||||
margin-right: 10rpx;
|
||||
height: 40rpx;
|
||||
background: linear-gradient(90deg, #ff6b35, #ff9f28, #ffcc03);
|
||||
}
|
||||
.live-goods-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
> .live-goods-item {
|
||||
flex: 1;
|
||||
}
|
||||
> .live-goods-item:nth-of-type(1) {
|
||||
padding-right: 38rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.live-icon,
|
||||
.zan {
|
||||
position: absolute;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
.tips {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
|
||||
align-items: center;
|
||||
top: 20rpx;
|
||||
right: 0;
|
||||
padding: 4rpx 12rpx 4rpx 0;
|
||||
font-size: 24rpx;
|
||||
border-radius: 100px;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.46);
|
||||
}
|
||||
.live-icon {
|
||||
right: 0;
|
||||
top: 104rpx;
|
||||
}
|
||||
|
||||
.zan {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
.bg {
|
||||
position: absolute;
|
||||
bottom: 4rpx;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
z-index: 8;
|
||||
background-image: -webkit-gradient(
|
||||
linear,
|
||||
left bottom,
|
||||
left top,
|
||||
from(rgba(0, 0, 0, 0.25)),
|
||||
color-stop(82%, transparent)
|
||||
);
|
||||
background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent 82%);
|
||||
border-bottom-left-radius: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -69,22 +69,7 @@
|
||||
this.goods = response.data;
|
||||
},
|
||||
onBackPress() {
|
||||
// uni.preloadPage({
|
||||
// url: '/pages/tabbar/home/index',
|
||||
// success: function(res) {
|
||||
// // 通过eventChannel向被打开页面传送数据
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
// //莫名其妙的,无法后退,尝试追加参数解决缓存问题
|
||||
// uni.switchTab({
|
||||
// url: '/pages/tabbar/home/index?' + new Date().getTime(),
|
||||
// success: function(res) {
|
||||
// // 通过eventChannel向被打开页面传送数据
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 跳转
|
||||
|
||||
BIN
pages/promotion/static/live.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
pages/promotion/static/live.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
pages/promotion/static/zan.gif
Normal file
|
After Width: | Height: | Size: 18 KiB |
@@ -3,7 +3,7 @@
|
||||
<u-navbar :isBack="false" title="购物车"></u-navbar>
|
||||
<!-- 空白页-->
|
||||
<view v-if="cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail" class="empty">
|
||||
<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
|
||||
<image src="/static/emptyCart.png" mode="aspectFit"></image>
|
||||
<view class="empty-tips">
|
||||
空空如也
|
||||
<navigator class="navigator" url="/pages/tabbar/home/index" open-type="switchTab">随便逛逛></navigator>
|
||||
@@ -164,7 +164,7 @@ import * as API_Trade from "@/api/trade";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lightColor:this.$lightColor,
|
||||
lightColor: this.$lightColor,
|
||||
discountDetailsFlag: false, //优惠明细开关
|
||||
// 商品栏右侧滑动按钮
|
||||
options: [
|
||||
@@ -192,6 +192,12 @@ export default {
|
||||
WEIXIN_num: "", //购物车兼容微信步进器
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({ withShareTicket: true });
|
||||
// #endif
|
||||
},
|
||||
/**
|
||||
* 初始化信息
|
||||
*/
|
||||
@@ -473,7 +479,7 @@ export default {
|
||||
getCardData() {
|
||||
if (this.$options.filters.isLogin("auth")) {
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: "加载中",
|
||||
});
|
||||
API_Trade.getCarts()
|
||||
.then((result) => {
|
||||
@@ -498,19 +504,10 @@ export default {
|
||||
});
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: result.data.message,
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
uni.hideLoading();
|
||||
});
|
||||
.catch((err) => {});
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<u-search class="nav-search" disabled @click.native="search" placeholder="搜索商品" :show-action="false"></u-search>
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<scroll-view scroll-y scroll-with-animation class="left-aside">
|
||||
<scroll-view scroll-y scroll-with-animation class="left-aside">
|
||||
<view v-for="(item, index) in tabList" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }" @click="tabtap(item, index)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
@@ -47,6 +47,10 @@ export default {
|
||||
},
|
||||
onLoad() {
|
||||
this.loadData();
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({ withShareTicket: true });
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -112,8 +116,8 @@ uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
/* #endif */
|
||||
.s-list{
|
||||
box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05);
|
||||
.s-list {
|
||||
box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.nav-search {
|
||||
padding-left: 30rpx !important;
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
</template>
|
||||
<script>
|
||||
import tpl from "@/pages/tabbar/home/views.vue";
|
||||
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
background: {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** 配置楼层模块的跳转 */
|
||||
export function modelNavigateTo(item) {
|
||||
|
||||
let val = item.url;
|
||||
switch (val.___type) {
|
||||
case "goods":
|
||||
@@ -9,9 +8,15 @@ export function modelNavigateTo(item) {
|
||||
});
|
||||
break;
|
||||
case "category":
|
||||
uni.navigateTo({
|
||||
url: `/pages/navigation/search/searchPage?category=${val.id}`,
|
||||
});
|
||||
if (val.id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/navigation/search/searchPage?category=${val.id}`,
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/navigation/search/searchPage`,
|
||||
});
|
||||
}
|
||||
break;
|
||||
case "stores":
|
||||
uni.navigateTo({
|
||||
@@ -33,7 +38,7 @@ export function modelNavigateTo(item) {
|
||||
switch (val.title) {
|
||||
case "首页":
|
||||
uni.switchTab({
|
||||
url: `/`,
|
||||
url: `/pages/tabbar/home/index`,
|
||||
});
|
||||
break;
|
||||
case "购物车":
|
||||
@@ -76,6 +81,11 @@ export function modelNavigateTo(item) {
|
||||
url: `/pages/promotion/joinGroup`,
|
||||
});
|
||||
break;
|
||||
case "小程序直播":
|
||||
uni.navigateTo({
|
||||
url: `/pages/promotion/lives`,
|
||||
});
|
||||
break;
|
||||
case "积分商城":
|
||||
uni.switchTab({
|
||||
url: `/pages/navigation/point/point-mall`,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.image-mode {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
padding: 2rpx;
|
||||
}
|
||||
@@ -18,10 +18,10 @@
|
||||
width: 100%;
|
||||
}
|
||||
.view-height-75 {
|
||||
height: 150rpx;
|
||||
// height: 150rpx;
|
||||
}
|
||||
.view-height-150 {
|
||||
height: 300rpx;
|
||||
// height: 300rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -29,3 +29,4 @@
|
||||
height: 170rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<template>
|
||||
<div class="layout">
|
||||
<u-image width="140rpx" height="140rpx" @click="modelNavigateTo(item)" class="image-mode" v-for="(item,index) in res.list" :key="index" :src="item.img" alt="">
|
||||
<u-image width="140rpx" mode="aspectFit" height="140rpx" @click="modelNavigateTo(item)" class="image-mode" v-for="(item,index) in res.list" :key="index" :src="item.img" alt="">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<template>
|
||||
<div class="layout">
|
||||
<u-image height="175rpx" width="175rpx" @click="modelNavigateTo(item)" class="image-mode" :src="item.img" v-for="(item,index) in res.list" :key="index">
|
||||
<u-image height="175rpx" mode="aspectFit" width="175rpx" @click="modelNavigateTo(item)" class="image-mode" :src="item.img" v-for="(item,index) in res.list" :key="index">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@import "./tpl.scss";
|
||||
.layout {
|
||||
height: 84px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="flex-one" @click="modelNavigateTo(res.list[0])">
|
||||
<u-image width="100%" height="280rpx" :src="res.list[0].img" alt=""></u-image>
|
||||
<u-image width="100%" mode="aspectFit" height="280rpx" :src="res.list[0].img" alt=""></u-image>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -9,7 +9,7 @@
|
||||
import { modelNavigateTo } from "./tpl";
|
||||
|
||||
export default {
|
||||
title:"单行图片模块",
|
||||
title: "单行图片模块",
|
||||
data() {
|
||||
return {
|
||||
modelNavigateTo,
|
||||
|
||||
@@ -26,7 +26,8 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@import "./tpl.scss";
|
||||
.layout {
|
||||
height: 110px;
|
||||
padding: 0;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<div class="layout">
|
||||
<div class="flex-two">
|
||||
<div class="flex-item" @click="modelNavigateTo(res.list[0])">
|
||||
<u-image height="325rpx" width="100%" mode="scaleToFill" :src="res.list[0].img" alt>
|
||||
<u-image height="250rpx" width="100%" mode="scaleToFill" :src="res.list[0].img" alt>
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="flex-item" @click="modelNavigateTo(res.list[1])">
|
||||
<u-image height="325rpx" width="100%" mode="scaleToFill" :src="res.list[1].img" alt>
|
||||
<u-image height="250rpx" width="100%" mode="scaleToFill" :src="res.list[1].img" alt>
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
|
||||
@@ -2,37 +2,36 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="view-height-150" @click="modelNavigateTo(res.list[0])">
|
||||
<u-image width="100%" height="300rpx" class="image-mode" :src="res.list[0].img" >
|
||||
<u-loading slot="loading"></u-loading>
|
||||
<u-image width="100%" height="340rpx" class="image-mode" :src="res.list[0].img">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="view-height-150">
|
||||
<div class="view-height-75" @click="modelNavigateTo(res.list[1])">
|
||||
<u-image width="100%" height="150rpx" class="image-mode" :src="res.list[1].img" alt >
|
||||
<u-loading slot="loading"></u-loading>
|
||||
<u-image width="100%" height="170rpx" class="image-mode" :src="res.list[1].img" alt>
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="view-height-75" @click="modelNavigateTo(res.list[2])">
|
||||
<u-image width="100%" height="150rpx" class="image-mode" :src="res.list[2].img" alt >
|
||||
<u-loading slot="loading"></u-loading>
|
||||
<u-image width="100%" height="170rpx" class="image-mode" :src="res.list[2].img" alt>
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {modelNavigateTo} from './tpl'
|
||||
|
||||
import { modelNavigateTo } from "./tpl";
|
||||
export default {
|
||||
title: "左一右二",
|
||||
props: ["res"],
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
modelNavigateTo,
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
mounted() {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -44,5 +43,4 @@ export default {
|
||||
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -3,10 +3,10 @@
|
||||
<div class="layout ">
|
||||
<div class="view-height-150">
|
||||
<div class="view-height-75" @click="modelNavigateTo(res.list[0])">
|
||||
<u-image class="image-mode" width="100%" height="150rpx" :src="res.list[0].img" ></u-image>
|
||||
<u-image class="image-mode" width="100%" height="150rpx" :src="res.list[0].img" ></u-image>
|
||||
</div>
|
||||
<div class="view-height-75" @click="modelNavigateTo(res.list[1])">
|
||||
<u-image class="image-mode" width="100%" height="150rpx" :src="res.list[1].img" ></u-image>
|
||||
<u-image class="image-mode" width="100%" height="150rpx" :src="res.list[1].img" ></u-image>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view-height-150" @click="modelNavigateTo(res.list[2])">
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@import "./tpl.scss";
|
||||
.layout {
|
||||
height: 167px;
|
||||
height: 300rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -57,7 +57,7 @@ import tpl_goods from "@/pages/tabbar/home/template/tpl_goods"; //商品分类
|
||||
// 结束引用组件
|
||||
import { getFloorData } from "@/api/home"; //获取楼层装修接口
|
||||
import permision from "@/js_sdk/wa-permission/permission.js"; //权限工具类
|
||||
|
||||
import config from "@/config/config";
|
||||
// TODO 后续开发
|
||||
// import tpl_join_group from "@/pages/tabbar/home/template/tpl_join_group";
|
||||
// import tpl_integral from "@/pages/tabbar/home/template/tpl_integral";
|
||||
@@ -66,6 +66,7 @@ import permision from "@/js_sdk/wa-permission/permission.js"; //权限工具类
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
pageData: "", //楼层页面数据
|
||||
};
|
||||
},
|
||||
@@ -93,7 +94,12 @@ export default {
|
||||
|
||||
mounted() {
|
||||
this.init();
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({ withShareTicket: true, });
|
||||
// #endif
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 实例化首页数据楼层
|
||||
@@ -106,36 +112,97 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* TODO 扫码功能后续还会后续增加
|
||||
* 应该实现的功能目前计划有:
|
||||
* 扫描商品跳转商品页面
|
||||
* 扫描活动跳转活动页面
|
||||
* 扫描二维码登录
|
||||
* 扫描其他站信息 弹出提示,返回首页。
|
||||
*/
|
||||
seacnCode() {
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
let path = encodeURIComponent(res.result);
|
||||
config.scanAuthNavigation.forEach((src) => {
|
||||
if (res.result.indexOf(src) != -1) {
|
||||
uni.navigateTo({
|
||||
url: `/${res.result.substring(src.length)}`,
|
||||
});
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/tabbar/home/web-view?src=" + path,
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
|
||||
// let
|
||||
// 扫码成功后跳转到webview页面
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 提示获取权限
|
||||
*/
|
||||
tipsGetSettings() {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您已经关闭相机权限,去设置",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
let isIos = plus.os.name == "iOS";
|
||||
|
||||
if (isIos) {
|
||||
plus.runtime.openURL("app-settings:");
|
||||
} else {
|
||||
permision.gotoAppPermissionSetting();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 唤醒客户端扫码
|
||||
* 没权限去申请权限,有权限获取扫码功能
|
||||
*/
|
||||
scan() {
|
||||
if (permision.judgeIosPermission("camera")) {
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
let path = encodeURIComponent(res.result);
|
||||
// TODO 扫码功能后续还会后续增加
|
||||
// 扫码成功后跳转到webview页面
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/tabbar/home/web-view?src=" + path,
|
||||
});
|
||||
}, 100);
|
||||
},
|
||||
});
|
||||
async scan() {
|
||||
// #ifdef APP-PLUS
|
||||
let isIos = plus.os.name == "iOS";
|
||||
// 判断是否是Ios
|
||||
if (isIos) {
|
||||
if (permision.judgeIosPermission("camera")) {
|
||||
this.seacnCode();
|
||||
} else {
|
||||
// 没有权限提醒是否去申请权限
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您已经关闭相机权限,去设置",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
plus.runtime.openURL("app-settings:");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 没有权限提醒是否去申请权限
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您已经关闭相机权限,去设置",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
plus.runtime.openURL("app-settings:");
|
||||
}
|
||||
},
|
||||
});
|
||||
// 安卓
|
||||
const result = await permision.requestAndroidPermission("CAMERA");
|
||||
if (result == 1 || result == 0) {
|
||||
this.seacnCode();
|
||||
} else {
|
||||
this.tipsGetSettings();
|
||||
}
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.seacnCode();
|
||||
// #endif
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<!-- 积分,优惠券,关注, -->
|
||||
<div class="pointBox">
|
||||
<u-row text-align="center" gutter="16" class="point">
|
||||
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/deposit/index')">
|
||||
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/deposit/operation')">
|
||||
<view>预存款</view>
|
||||
<view class="money">{{ walletNum | unitPrice}}</view>
|
||||
</u-col>
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
# APP版本更新、强制更新、漂亮的更新界面、IOS更新(跳转IOS store)、wgt更新
|
||||
|
||||
### QQ交流群(学习干货多多) 607391225
|
||||

|
||||
|
||||

|
||||
|
||||
# [点击跳转-插件示例](https://ext.dcloud.net.cn/plugin?id=2009)
|
||||
# [点击跳转-5年的web前端开源的uni-app快速开发模板-下载看文档](https://ext.dcloud.net.cn/plugin?id=2009)
|
||||
|
||||
### 常见问题
|
||||
1.安卓apk下载完成后没有更新APP?
|
||||
|
||||
答:问题是因为没有添加APP安装应用的权限,解决方法在`manifest.json`文件里面`APP模块权限配置`的`Android打包权限配置`勾选以下权限
|
||||
```
|
||||
# [点击跳转-5年的web前端开源的uni-app快速开发模板-下载看文档](https://ext.dcloud.net.cn/plugin?id=2009)
|
||||
|
||||
### 常见问题
|
||||
1.安卓apk下载完成后没有更新APP?
|
||||
|
||||
答:问题是因为没有添加APP安装应用的权限,解决方法在`manifest.json`文件里面`APP模块权限配置`的`Android打包权限配置`勾选以下权限
|
||||
```
|
||||
<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>
|
||||
<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>
|
||||
```
|
||||
若还有问题请看[安装apk无法执行的解决方案](https://ask.dcloud.net.cn/article/35703 "安装apk无法执行的解决方案")
|
||||
|
||||
2.APP更新后版本号没变,还是之前的版本号?
|
||||
|
||||
答:可能是更新的安装包没有升级版本号,`manifest.json`文件里面基本设置`应用版本号`和`应用版本名称`需要升高
|
||||
|
||||
3.APP更新后没有覆盖之前的APP?
|
||||
|
||||
答:可能是更新的安装包`包名`和APP的`包名`不一样
|
||||
<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>
|
||||
```
|
||||
若还有问题请看[安装apk无法执行的解决方案](https://ask.dcloud.net.cn/article/35703 "安装apk无法执行的解决方案")
|
||||
|
||||
2.APP更新后版本号没变,还是之前的版本号?
|
||||
|
||||
答:可能是更新的安装包没有升级版本号,`manifest.json`文件里面基本设置`应用版本号`和`应用版本名称`需要升高
|
||||
|
||||
3.APP更新后没有覆盖之前的APP?
|
||||
|
||||
答:可能是更新的安装包`包名`和APP的`包名`不一样
|
||||
|
||||
### 第一步配置APP更新接口
|
||||
在`APPUpdate.js`里面`getServerNo`函数方法配置更新接口
|
||||
@@ -38,7 +38,7 @@ if (platform == "android") {
|
||||
/* 接口入参说明
|
||||
* version: 应用当前版本号(已自动获取)
|
||||
* type:平台(1101是安卓,1102是IOS)
|
||||
*/
|
||||
*/
|
||||
// 可以用自己项目的请求方法
|
||||
$http.get("api/kemean/aid/app_version", httpData).then(res => {
|
||||
/*接口出参说明 (res数据说明)
|
||||
@@ -49,15 +49,15 @@ $http.get("api/kemean/aid/app_version", httpData).then(res => {
|
||||
* | versionInfo | y | String | 版本信息 \n 换行(例如:1.修改了bug1 \n 2.修改了bug2 \n 3.修改了bug3) |
|
||||
* | forceUpdate | y | boolean | 是否强制更新 |
|
||||
* | downloadUrl | y | String | 版本下载链接 `IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接` |
|
||||
*/
|
||||
// 只要callback上面的数据就ok(返回数据就表示接口允许更新)
|
||||
// 示例返回数据
|
||||
callback && callback({
|
||||
versionCode: 101,
|
||||
versionName: "1.0.1",
|
||||
versionInfo: "1.修改了bug1 \n 2.修改了bug2 \n 3.修改了bug3",
|
||||
forceUpdate: false,
|
||||
downloadUrl: "http://www.xxx.com/download/123",
|
||||
*/
|
||||
// 只要callback上面的数据就ok(返回数据就表示接口允许更新)
|
||||
// 示例返回数据
|
||||
callback && callback({
|
||||
versionCode: 101,
|
||||
versionName: "1.0.1",
|
||||
versionInfo: "1.修改了bug1 \n 2.修改了bug2 \n 3.修改了bug3",
|
||||
forceUpdate: false,
|
||||
downloadUrl: "http://www.xxx.com/download/123",
|
||||
});
|
||||
});
|
||||
```
|
||||
@@ -75,13 +75,13 @@ onLaunch: function(e) {
|
||||
APPUpdate();
|
||||
// #endif
|
||||
}
|
||||
```
|
||||
|
||||
### 第三步 添加APP安装应用的权限
|
||||
在`manifest.json`文件里面`APP模块权限配置`的`Android打包权限配置`勾选以下权限
|
||||
```
|
||||
```
|
||||
|
||||
### 第三步 添加APP安装应用的权限
|
||||
在`manifest.json`文件里面`APP模块权限配置`的`Android打包权限配置`勾选以下权限
|
||||
```
|
||||
<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>
|
||||
<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>
|
||||
<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>
|
||||
```
|
||||
|
||||
### 修改弹窗的主题色或弹窗图标
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1493289309071" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20064" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M282.692267 1002.530133c-4.369067 0-8.738133-1.672533-12.0832-4.983467-6.656-6.656-6.656-17.476267 0-24.132267l446.532267-446.532267L270.6432 80.349867c-6.656-6.656-6.656-17.476267 0-24.132267s17.476267-6.656 24.132267 0l458.615467 458.581333c3.208533 3.208533 4.983467 7.543467 4.983467 12.0832s-1.809067 8.874667-4.983467 12.0832L294.775467 997.546667C291.4304 1000.8576 287.061333 1002.530133 282.692267 1002.530133z" p-id="20065" fill="#ffffff"></path></svg>
|
||||
|
Before Width: | Height: | Size: 847 B |
|
Before Width: | Height: | Size: 634 B |
|
Before Width: | Height: | Size: 885 B |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
BIN
static/emptyCart.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 447 B |
|
Before Width: | Height: | Size: 2.0 KiB |
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="2px" height="18px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -88 -104 )">
|
||||
<path d="M 88.5 104 L 88.5 121 " stroke-width="1" stroke="#cccccc" fill="none" stroke-opacity="0.8" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 447 B |
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="18px" height="18px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -104 -5 )">
|
||||
<path d="M 15.4947272727273 5.72727272727275 L 16.3636363636364 5.72727272727275 C 17.2673750451777 5.72727272727275 18 6.45989768209506 18 7.36363636363637 L 18 10.6363636363636 C 18 11.5401023179049 17.2673750451777 12.2727272727273 16.3636363636364 12.2727272727273 L 15.4947272727273 12.2727272727273 C 15.0820297544559 15.5455034452874 12.2986941528626 17.9999440110663 9 18 L 9 16.3636363636364 C 11.7112160446239 16.3636363636364 13.9090909090909 14.1657614991693 13.9090909090909 11.4545454545454 L 13.9090909090909 6.54545454545456 C 13.9090909090909 3.83423850083062 11.7112160446239 1.63636363636363 9 1.63636363636363 C 6.28878395537612 1.63636363636363 4.09090909090907 3.83423850083062 4.09090909090907 6.54545454545456 L 4.09090909090907 12.2727272727273 L 1.63636363636363 12.2727272727273 C 0.732624954822313 12.2727272727273 0 11.5401023179049 0 10.6363636363636 L 0 7.36363636363637 C 0 6.45989768209506 0.732624954822313 5.72727272727275 1.63636363636363 5.72727272727275 L 2.50527272727271 5.72727272727275 C 2.91837695904485 2.45484602032326 5.70160165251917 0.000880645415691106 9 0.000880645415691106 C 12.2983983474808 0.000880645415691106 15.0816230409552 2.45484602032326 15.4947272727273 5.72727272727275 Z M 9 13.0909090909091 C 7.77310230180365 13.0927942900379 6.57060567607476 12.7482109409199 5.53090909090906 12.0968181818182 L 6.3981818181818 10.7091818181818 C 7.17797122151256 11.1976647141763 8.0798452064314 11.4560317582835 9 11.4545454545454 C 9.9201547935686 11.4560317582835 10.8220287784874 11.1976647141763 11.6018181818182 10.7091818181818 L 12.4690909090909 12.0968181818182 C 11.4293943239252 12.7482109409199 10.2268976981964 13.0927942900379 9 13.0909090909091 Z " fill-rule="nonzero" fill="#cccccc" stroke="none" transform="matrix(1 0 0 1 104 5 )" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 619 B |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 965 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 940 B |
|
Before Width: | Height: | Size: 1.9 KiB |