51 Commits
v4.3 ... v4.4

Author SHA1 Message Date
Yer11214
9195bcdeb5 update README.md.
Signed-off-by: Yer11214 <17633066053@163.com>
2024-07-19 02:14:48 +00:00
Yer11214
7778a62d6a fix: 🐛 修改bug在购买商品中规格为0不可编辑、购买、新增库存为0判断 2024-07-15 15:24:22 +08:00
RyanRan
31c341148f fix: 🐛 1:修改微信订阅,更改为每次支付成功之后请求订阅信息。2:修改微信支付在真机中支付成功跳转问题 2024-07-02 11:58:06 +08:00
lele0521
0b601e4f3e feat: 更新用户注销功能 2024-05-15 19:09:19 +08:00
lele0521
1d93d9103d Merge remote-tracking branch 'origin/master' 2024-05-15 18:55:48 +08:00
lele0521
5bc5152e49 feat: 更新用户注销功能 2024-05-15 18:55:41 +08:00
RyanRan
e9d1a81612 fix: 🐛 修改商品详情控制台报错bug 2024-04-29 16:29:58 +08:00
lele0521
7d3d06e8af fix: 修复虚拟订单核验码显示 2024-04-29 16:25:30 +08:00
lele0521
55bb6ab51a fix: 修复虚拟订单核验码显示 2024-04-29 16:11:56 +08:00
Yer
70c2e68bff fix: 🐛 修改砍价列表展示的Bug 2024-04-17 13:01:29 +08:00
Yer
17287df293 fix: 🐛 修改AppQQ登录appid 以及优化登录页面可能存在的bug 2024-03-15 12:02:39 +08:00
chc
a8d321c66d Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp 2024-03-11 15:55:56 +08:00
chc
fad004aed5 多货物订单无售后按钮 2024-03-11 15:55:48 +08:00
15386982806
fe9060073f 修改订单详情退款状态展示 2024-01-30 17:25:55 +08:00
15386982806
393c60200f 修改订单详情退款状态展示 2024-01-30 17:24:37 +08:00
Yer
e61222928e fix: 🐛 修复退出登录后haslogin没清空bug 2024-01-29 17:32:22 +08:00
misworga831
b51caa9135 fix: 新用户优化下单时,无地址无法下单问题 2024-01-27 10:50:42 +08:00
misworga831
992bb76072 fix: 修复已读信息接口不正确 2024-01-26 10:12:23 +08:00
misworga831
863315eaed fix: 优化虚拟商品订单不显示收货地址 2024-01-25 10:15:11 +08:00
misworga831
52bf47e358 fix: 兼容旧版本图片格式 2024-01-22 15:36:07 +08:00
Yer
8f49dce8f0 style: 解决分类搜索框页面h5不能点击问题 2024-01-17 15:46:13 +08:00
15386982806
4490a4119e 支持多包裹快递展示物流信息 2024-01-10 19:16:47 +08:00
15386982806
2d0b78af52 支持多包裹快递展示物流信息 2024-01-10 18:56:18 +08:00
15386982806
7148b32c43 订单货物展示退款状态与实际退款金额 2024-01-05 14:17:16 +08:00
lele0521
20b2ca04f0 feat: 新增会员绑定手机号功能 2023-12-04 17:19:07 +08:00
Chopper711
25677ced97 默认注释直播插件 2023-11-08 14:47:49 +08:00
Lele
4517c9562a fix: 修改优惠券类别显示 2023-10-27 18:11:02 +08:00
misworga831
2634017fb3 fix: 优化售后搜索 2023-10-16 18:33:52 +08:00
misworga831
b69c7d5a05 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp 2023-10-16 17:09:23 +08:00
misworga831
098bee9bb4 fix: 修复商品评论筛选 2023-10-16 17:09:18 +08:00
Yer
2d369ad729 fix: 🐛 解决在手机上拼团活动以及现实抢购系统栏看不到问题 2023-10-12 18:30:47 +08:00
Yer
3bf0be98cb feat: 我的足迹新增批量删除功能 2023-10-07 16:12:04 +08:00
Yer
1046a1052e feat: 个人中心优化tool方法 2023-09-28 17:22:19 +08:00
Yer
1cc6cc4ac7 修改反馈信息,回滚修改goods的代码 2023-09-26 19:22:58 +08:00
Yer
dae3e74a60 fix: 🐛 修改在部分手机分辨率下首页文字有误bug 2023-09-26 13:13:57 +08:00
Yer
fddceb5f36 fix: 🐛 修复在h5 搜索页面中点击刷新再点击回退不生效bug 2023-09-25 15:21:46 +08:00
Yer
2aed3b9305 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp 2023-09-19 17:18:46 +08:00
Yer
101aa279d8 fix: 🐛 修改了几个已知的bug 2023-09-19 17:18:44 +08:00
misworga831
abbadfbab1 fix: 完善订单投诉对话 2023-09-19 14:26:27 +08:00
Yer
8ad76a5278 fix: 🐛 修复昨天提交写错的问题 2023-09-15 17:14:13 +08:00
Yer
726a85e76c fix: 🐛 解决几个h5中会出现的Bug 2023-09-14 17:13:11 +08:00
Yer
2d69967f51 perf: 优化部分流程 2023-09-14 13:31:20 +08:00
Yer
4aeaa115dc fix: 🐛 修复部分bug 2023-09-13 15:52:08 +08:00
Yer
2d251faff1 feat: 优化个人信息页面,新增购物车删除功能 2023-09-13 09:36:37 +08:00
Yer
231936c91d feat: 新增微信小程序登录页面勾选协议功能 2023-09-07 11:41:07 +08:00
Yer
37b8e17cba feat: 微信小程序登录页面新增用户协议、隐私协议 2023-09-06 17:50:58 +08:00
Yer
7d928e3df9 fix: 🐛 修复店铺单个展示商品样式错bug 2023-09-05 11:53:02 +08:00
Yer
bb4435fab4 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp 2023-09-04 10:27:12 +08:00
Yer
1e0580ba15 fix: 🐛 修复店铺入驻bug 2023-09-04 10:27:10 +08:00
misworga831
f5716c901d Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp 2023-08-25 13:59:08 +08:00
misworga831
2c4c0ea4f0 fix: 优化小程序登录 2023-08-25 13:58:56 +08:00
45 changed files with 1174 additions and 301 deletions

26
App.vue
View File

@@ -2,15 +2,15 @@
/** /**
* vuex管理登录状态具体可以参考官方登录模板示例 * vuex管理登录状态具体可以参考官方登录模板示例
*/ */
import {
mapMutations
} from "vuex";
import APPUpdate from "@/plugins/APPUpdate";
import {
getClipboardData
} from "@/js_sdk/h5-copy/h5-copy.js";
import config from "@/config/config"; import config from "@/config/config";
import storage from "@/utils/storage"; import {
getClipboardData
} from "@/js_sdk/h5-copy/h5-copy.js";
import APPUpdate from "@/plugins/APPUpdate";
import storage from "@/utils/storage";
import {
mapMutations
} from "vuex";
@@ -20,14 +20,7 @@
* */ * */
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
wx.onAppRoute((res) => { wx.onAppRoute((res) => {
const pages = getCurrentPages();
console.log("pages:" + pages.length,pages);
if (pages.length > 3) {
delete getCurrentPages()[2]
}
console.log('路由监听', {
res
})
}) })
// #endif // #endif
@@ -43,6 +36,7 @@
* 监听返回 * 监听返回
*/ */
onBackPress(e) { onBackPress(e) {
console.log("onBackPress-APP", e);
if (e.from == "backbutton") { if (e.from == "backbutton") {
let routes = getCurrentPages(); let routes = getCurrentPages();
let curRoute = routes[routes.length - 1].options; let curRoute = routes[routes.length - 1].options;

View File

@@ -12,6 +12,12 @@
![image-20210511171611793](https://static.pickmall.cn/images/h5-qrcode.png) ![image-20210511171611793](https://static.pickmall.cn/images/h5-qrcode.png)
## lilishop-uniapp如何在本地h5和微信小程序中运行
https://www.bilibili.com/video/BV17K8EemEh2/
## lilishop-uniapp如何打包h5到服务器
https://www.bilibili.com/video/BV1CX87exE64/
### 快速开始 ### 快速开始
#### 阅读文档 #### 阅读文档

View File

@@ -218,3 +218,13 @@ export function fillShipInfo(afterSaleSn, params) {
data: params, data: params,
}); });
} }
// 添加交易投诉对话
export function communication(params) {
return http.request({
url: `/order/complain/communication`,
method: Method.POST,
needToken: true,
params
});
}

View File

@@ -14,6 +14,17 @@ export function resetByMobile(params) {
}); });
} }
/**
* 绑定手机号码
* @param mobile
*/
export function bindMobile(params) {
return http.request({
url: `/passport/member/bindMobile`,
method: "POST",
params,
});
}
//获取自动发券 //获取自动发券
export function getAutoCoup(){ export function getAutoCoup(){
@@ -119,3 +130,12 @@ export function scannerCodeLoginConfirm(params){
needToken: true, needToken: true,
}); });
} }
// 注销用户
export function logoffConfirm() {
return http.request({
url: '/passport/member/cancellation',
method: "PUT",
needToken: true,
})
}

View File

@@ -42,7 +42,7 @@ export function getMessages(params) {
*/ */
export function messageMarkAsRead(ids) { export function messageMarkAsRead(ids) {
return http.request({ return http.request({
url: `members/member-nocice-logs/${ids}/read`, url: `/message/member/${ids}`,
method: Method.PUT, method: Method.PUT,
needToken: true, needToken: true,
}); });

View File

@@ -319,3 +319,12 @@ export function reBuy(sn) {
params, params,
}); });
} }
// 查看包裹列表
export function getPackage(orderSn) {
return http.request({
url: `/order/order/getPackage/${orderSn}`,
method: Method.GET,
needToken: true,
});
}

View File

@@ -93,14 +93,17 @@
</view> </view>
</view> </view>
</view> </view>
<div class="soldout" v-if="goodsDetail.quantity === 0">
<u-alert-tips type="warning" title="商品已售罄" description="当前商品库存为0"></u-alert-tips>
</div>
<!-- 数量 --> <!-- 数量 -->
<view class="goods-skus-number flex flex-a-c flex-j-sb"> <view v-if="goodsDetail.quantity !== 0" class="goods-skus-number flex flex-a-c flex-j-sb">
<view class="view-class-title">数量</view> <view class="view-class-title">数量</view>
<uni-number-box class="uNumber" :min="1" :max="999" v-model="num"></uni-number-box> <uni-number-box class="uNumber" :min="1" :max="999" :disabled="goodsDetail.quantity === 0" v-model="num"></uni-number-box>
</view> </view>
</scroll-view> </scroll-view>
<!-- 按钮 --> <!-- 按钮 -->
<view class="btns"> <view class="btns" v-if="goodsDetail.quantity !== 0">
<view class="box-btn card" v-if="buyType != 'PINTUAN' && goodsDetail.goodsType != 'VIRTUAL_GOODS'" @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 class="box-btn buy" @click="addToCartOrBuy('buy')">立即购买</view>
</view> </view>
@@ -209,6 +212,18 @@ export default {
this.$emit('changed', val); this.$emit('changed', val);
}, },
deep: true deep: true
},
'goodsDetail.quantity': {
handler(val) {
if (val == 0) {
uni.showToast({
title: '商品已售罄',
duration: 2000,
icon: 'none'
})
this.num = 1;
}
}
} }
}, },
@@ -400,6 +415,8 @@ export default {
mounted() { mounted() {
this.formatSku(this.goodsSpec); this.formatSku(this.goodsSpec);
console.log("goodsDetail",this.goodsDetail)
} }
}; };
</script> </script>
@@ -460,6 +477,9 @@ export default {
// #endif // #endif
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.soldout{
margin: 20rpx 0;
}
.goods-skus-view { .goods-skus-view {
overflow: hidden; overflow: hidden;

View File

@@ -180,6 +180,7 @@ export default {
if (this.tabbars[index].id != item.id) { if (this.tabbars[index].id != item.id) {
this.tabbars[index].localName = item.name; this.tabbars[index].localName = item.name;
this.tabbars[index].id = item.id; this.tabbars[index].id = item.id;
this.tabbars[index].center = item.center
if (index < this.tabbars.length - 1) { if (index < this.tabbars.length - 1) {
this.tabbars.splice(index + 1, this.tabbars.length - index - 1); this.tabbars.splice(index + 1, this.tabbars.length - index - 1);
} }
@@ -195,6 +196,7 @@ export default {
localName: "请选择", localName: "请选择",
id: "", id: "",
children: data.data.result, children: data.data.result,
}; };
this.tabbars.push(current); this.tabbars.push(current);
this.tabCurrentIndex++; this.tabCurrentIndex++;

View File

@@ -25,7 +25,7 @@
}} }}
</div> </div>
<!-- 兜底策略如果金额是0 --> <!-- 兜底策略如果金额是0 -->
<div class="price" v-if="!item.price"> <div class="price" v-if="!item.price && !type">
¥<span>0 </span>.00 ¥<span>0 </span>.00
</div> </div>
</view> </view>

View File

@@ -121,7 +121,15 @@ export default {
* 回退到上一级 * 回退到上一级
*/ */
onClickLeft() { onClickLeft() {
const paths = getCurrentPages();
console.log(paths)
if(paths.length > 1){
uni.navigateBack(); uni.navigateBack();
}else{
uni.switchTab({
url:"/pages/tabbar/home/index"
})
}
}, },
/** /**

View File

@@ -7,8 +7,8 @@
* @param {sn,price} * @param {sn,price}
*/ */
import { initiatePay } from "@/api/trade";
import { getWeChatMpMessage } from "@/api/message.js"; import { getWeChatMpMessage } from "@/api/message.js";
import { initiatePay } from "@/api/trade";
class LiLiWXPay { class LiLiWXPay {
constructor(...payList) { constructor(...payList) {
this.data = payList[0]; this.data = payList[0];
@@ -65,8 +65,8 @@ class LiLiWXPay {
} }
function sendMessage(price) { function sendMessage(price) {
//判断用户是否已经进行了订阅
if (!uni.getStorageSync("acceptSubscribeMessage")) {
//订阅消息 //订阅消息
getWeChatMpMessage().then((res) => { getWeChatMpMessage().then((res) => {
var message = res.data.result; var message = res.data.result;
@@ -74,20 +74,18 @@ function sendMessage(price) {
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: templateid, tmplIds: templateid,
success: (res) => { success: (res) => {
for (let key in res) {
// 表示用户拒绝订阅该信息
if (res[key] == "reject") {
this.checked = false;
} else {
uni.setStorageSync("acceptSubscribeMessage", res);
}
}
}, },
fail: (res) => { fail: (res) => {
uni.removeStorageSync("acceptSubscribeMessage"); console.log('fail', res)
this.checked = false; uni.showToast({
icon: "none",
title: "订阅消息失败",
})
}, },
complete: () => { complete: (res) => {
console.log('complete', res)
/** /**
* 已经支付成功 * 已经支付成功
*/ */
@@ -100,17 +98,7 @@ function sendMessage(price) {
}, },
}); });
}); });
} else {
/**
* 已经支付成功
*/
uni.redirectTo({
url:
"/pages/cart/payment/success?paymentMethod=WECHAT" +
"&payPrice=" +
price,
});
}
} }
export default LiLiWXPay; export default LiLiWXPay;

View File

@@ -116,7 +116,7 @@
}, },
"apple" : {}, "apple" : {},
"qq" : { "qq" : {
"appid" : "101918501" "appid" : "101918503"
} }
}, },
"geolocation" : { "geolocation" : {
@@ -206,12 +206,12 @@
"desc" : "位置信息将用于高德地图的效果展示" "desc" : "位置信息将用于高德地图的效果展示"
} }
}, },
"plugins" : { "plugins" : {},
"live-player-plugin" : { // 直播插件注释
"version" : "1.3.0", // "live-player-plugin" : {
"provider" : "wx2b03c6e691cd7370" // "version" : "1.3.0",
} // "provider" : "wx2b03c6e691cd7370"
}, // }
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ] "requiredPrivateInfos" : [ "chooseLocation", "getLocation" ]
}, },
"h5" : { "h5" : {

View File

@@ -36,6 +36,7 @@
"path": "pages/tabbar/cart/cartList", "path": "pages/tabbar/cart/cartList",
"style": { "style": {
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh":true //实现下拉刷新样式 "enablePullDownRefresh":true //实现下拉刷新样式
@@ -275,6 +276,16 @@
} }
}, },
{
"path": "set/securityCenter/bindMobile",
"style": {
"navigationBarTitleText": "绑定手机号",
"app-plus": {
}
}
},
{ {
"path": "im/list", "path": "im/list",
"style": { "style": {
@@ -531,7 +542,7 @@
"style": { "style": {
"navigationBarTitleText": "限时抢购", "navigationBarTitleText": "限时抢购",
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarTextStyle": "white" , "navigationBarTextStyle": "black" ,
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"homeButton":true "homeButton":true
@@ -545,7 +556,7 @@
"style": { "style": {
"navigationBarTitleText": "拼团活动", "navigationBarTitleText": "拼团活动",
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarTextStyle": "white" , "navigationBarTextStyle": "black" ,
"app-plus": { "app-plus": {
// 将回弹属性关掉 // 将回弹属性关掉
"bounce": "none" "bounce": "none"
@@ -707,6 +718,12 @@
"navigationBarTitleText": "订单详情" "navigationBarTitleText": "订单详情"
} }
}, },
{
"path": "deliverDetail",
"style": {
"navigationBarTitleText": "物流详情"
}
},
{ {
"path": "evaluate/evaluateDetail", "path": "evaluate/evaluateDetail",
"style": { "style": {

View File

@@ -17,8 +17,10 @@
<view class="text"> 使用范围{{ <view class="text"> 使用范围{{
coupon.scopeType == 'ALL' && coupon.storeId == '0' coupon.scopeType == 'ALL' && coupon.storeId == '0'
? "全平台" ? "全平台"
: coupon.scopeType == "PORTION_CATEGORY" : coupon.scopeType == "PORTION_GOODS"
? "仅限品类" ? "部分商品"
: coupon.scopeType == "PORTION_GOODS_CATEGORY"
? "部分分类商品"
: coupon.storeName == 'platform' ? '全平台' :coupon.storeName+'' : coupon.storeName == 'platform' ? '全平台' :coupon.storeName+''
}}使用</view> }}使用</view>
<view class="text"> 有效期至{{coupon.endTime}}</view> <view class="text"> 有效期至{{coupon.endTime}}</view>

View File

@@ -53,7 +53,7 @@
<text>立即</text><br /> <text>立即</text><br />
<text>使用</text> <text>使用</text>
</view> </view>
<view class="used" v-else @click="clickWay(item)"> <view class="used" v-if="current == 0 && routerVal.selectedCoupon.includes(item.id)" @click="clickWay(item)">
<text>取消</text><br /> <text>取消</text><br />
<text>使用</text> <text>使用</text>
</view> </view>

View File

@@ -70,8 +70,10 @@
>使用范围{{ >使用范围{{
coupon.scopeType == "ALL" && coupon.storeId == "0" coupon.scopeType == "ALL" && coupon.storeId == "0"
? "全平台" ? "全平台"
: coupon.scopeType == "PORTION_CATEGORY" : coupon.scopeType == "PORTION_GOODS"
? "仅限品类" ? "部分商品"
: coupon.scopeType == "PORTION_GOODS_CATEGORY"
? "部分分类商品"
: coupon.storeName == "platform" : coupon.storeName == "platform"
? "全平台" ? "全平台"
: coupon.storeName + "" : coupon.storeName + ""

View File

@@ -5,7 +5,7 @@
{{ Number(payPrice) | unitPrice }} {{ Number(payPrice) | unitPrice }}
</div> </div>
<div class="pay-btns"> <div class="pay-btns">
<div v-show="!from" @click="checkOrder">查看{{this.orderType == "RECHARGE" ? '余额' : '订单'}}</div> <div v-show="!from" @click="checkOrder">查看{{ this.orderType == "RECHARGE" ? '余额' : '订单' }}</div>
<div @click="navigateTo('/pages/tabbar/home/index', 'switch')">回到首页</div> <div @click="navigateTo('/pages/tabbar/home/index', 'switch')">回到首页</div>
</div> </div>
</div> </div>
@@ -16,7 +16,7 @@
<div> <div>
支付方式 支付方式
</div> </div>
<div>{{paymentMethod | paymentTypeFilter}}</div> <div>{{ paymentMethod | paymentTypeFilter }}</div>
</div> </div>
</div> </div>
</div> </div>
@@ -60,7 +60,7 @@ export default {
this.from = options.from || ""; this.from = options.from || "";
this.payPrice = options.payPrice || 0; this.payPrice = options.payPrice || 0;
this.orderType = options.orderType; this.orderType = options.orderType;
// this.sendMessage()
}, },
methods: { methods: {
checkOrder() { checkOrder() {
@@ -77,11 +77,6 @@ export default {
this.navigateTo("/pages/order/myOrder?status=0"); this.navigateTo("/pages/order/myOrder?status=0");
} }
}, },
changeStatus(val) {
if (val) {
this.sendMessage();
}
},
navigateTo(url, type) { navigateTo(url, type) {
if (type === "switch") { if (type === "switch") {
@@ -105,6 +100,7 @@ export default {
padding: 0 20rpx 20rpx; padding: 0 20rpx 20rpx;
width: 80%; width: 80%;
} }
.pay-btns { .pay-btns {
display: flex; display: flex;
width: 50%; width: 50%;
@@ -112,7 +108,7 @@ export default {
margin: 0 auto; margin: 0 auto;
color: #fff; color: #fff;
> div { >div {
padding: 6px 12px; padding: 6px 12px;
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 100px; border-radius: 100px;
@@ -146,7 +142,7 @@ export default {
border-radius: 20rpx; border-radius: 20rpx;
background: rgba($color: $main-color, $alpha: 0.2); background: rgba($color: $main-color, $alpha: 0.2);
> h2 { >h2 {
margin-top: 20rpx; margin-top: 20rpx;
font-size: 40rpx; font-size: 40rpx;
color: $main-color; color: $main-color;

View File

@@ -15,7 +15,9 @@
<u-input v-model="form.mobile" type="number" maxlength="11" placeholder="请输入收货人手机号码" /> <u-input v-model="form.mobile" type="number" maxlength="11" placeholder="请输入收货人手机号码" />
</u-form-item> </u-form-item>
<u-form-item label="所在区域" label-width="130" prop="___path"> <u-form-item label="所在区域" label-width="130" prop="___path">
<u-input v-model="form.___path" type="select" @click="showPicker" placeholder="请选择所在地区" /> <div @click="showPicker" >
{{ form.___path || '请选择所在地区' }}
</div>
</u-form-item> </u-form-item>
<u-form-item class="detailAddress" label="详细地址" label-width="130" prop="detail"> <u-form-item class="detailAddress" label="详细地址" label-width="130" prop="detail">
<u-input type="textarea" v-model="form.detail" maxlength="100" height="150" placeholder="街道楼牌号等" /> <u-input type="textarea" v-model="form.detail" maxlength="100" height="150" placeholder="街道楼牌号等" />

View File

@@ -1,22 +1,25 @@
<template> <template>
<view class="myTracks"> <view class="myTracks">
<u-navbar title="我的足迹"> <u-navbar title="我的足迹">
<div slot="right">
<div class="light-color edit" @click="isEdit = !isEdit">{{ !isEdit ? '编辑' : '完成'}}</div>
</div>
</u-navbar> </u-navbar>
<u-notice-bar mode="vertical" :list="['右划删除浏览记录']"></u-notice-bar>
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty> <u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
<div v-else> <div v-else>
<view v-if="item" v-for="(item, index) in trackList" :key="index"> <view v-for="(item, index) in trackList" :key="index">
<view class="myTracks-title" @click="navigateToStore(item)" v-if="item.storeName">{{item.storeName}}</view> <view class="myTracks-title" @click="navigateToStore(item)">{{item.storeName}}</view>
<view class="myTracks-items"> <view class="myTracks-items">
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id" <u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
@click="delTracks" @open="open" :options="options"> @click="delTracks" @open="open" :options="options">
<!-- 已失效商品 -->
<div class="myTracks-item lose-goods" v-if="!item.storeName && !item.goodsName && !item.price"> <view class="myTracks-item">
已失效商品 <u-checkbox-group v-if="isEdit" class="store-line-check">
</div> <u-checkbox shape="circle" :active-color="lightColor" v-model="item.checked"
<!-- 正常有效商品 --> @change="checkboxChangeDP(item)"></u-checkbox>
<view v-else class="myTracks-item"> </u-checkbox-group>
<view class="myTracks-item-img" @click.stop="navigateToDetail(item)"> <view class="myTracks-item-img" @click.stop="navigateToDetail(item)">
<image :src="item.thumbnail"></image> <image :src="item.thumbnail"></image>
</view> </view>
@@ -36,7 +39,9 @@
<view class="myTracks-divider"></view> <view class="myTracks-divider"></view>
</view> </view>
<div @click="handleClickDeleteSelected" v-if="isEdit" class="submit">
删除所选
</div>
</div> </div>
</view> </view>
@@ -51,7 +56,7 @@
export default { export default {
data() { data() {
return { return {
isEdit:false,
whetherEmpty: false, //是否数据为空 whetherEmpty: false, //是否数据为空
params: { params: {
pageNumber: 1, pageNumber: 1,
@@ -59,6 +64,7 @@
order: "desc", order: "desc",
sort: "updateTime", sort: "updateTime",
}, },
lightColor:this.$lightColor,
options: [{ options: [{
text: '删除', text: '删除',
style: { style: {
@@ -86,6 +92,21 @@
this.getList(); this.getList();
}, },
methods: { methods: {
checkboxChangeDP(val){
console.log(val)
},
// 删除所选的数据
handleClickDeleteSelected(val){
const ids = this.trackList.filter(item=>item.checked).map(item=>item.goodsId);
if(!ids.length){
uni.showToast({
title:"请选择删除数据",
icon:"none"
})
}else{
this.delTracks(0,ids)
}
},
/** /**
* 导航到店铺 * 导航到店铺
*/ */
@@ -120,11 +141,12 @@
}); });
myTrackList(this.params).then((res) => { myTrackList(this.params).then((res) => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if (this.$store.state.isShowToast){ uni.hideLoading() }; uni.hideLoading();
if (res.statusCode == 200) { if (res.statusCode == 200) {
res.data.result.records.length && res.data.result.records.length &&
res.data.result.records.forEach((item) => { res.data.result.records.forEach((item) => {
item.show = false; item.show = false;
item.checked = false
}); });
let data = res.data.result.records; let data = res.data.result.records;
@@ -141,10 +163,11 @@
/** /**
* 删除足迹 * 删除足迹
*/ */
delTracks(index) { delTracks(index,ids) {
deleteHistoryListId(this.trackList[index].goodsId).then((res) => { deleteHistoryListId(ids || this.trackList[index].goodsId).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.trackList = []; this.trackList = [];
this.params.pageNumber = 1
this.getList(); this.getList();
} else { } else {
uni.showToast({ uni.showToast({
@@ -160,9 +183,18 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.lose-goods{ .submit{
color: $main-color; position: fixed;
padding-left: 50rpx !important; bottom: 20rpx;
left: 10%;
width: 80%;
height: 80rpx;
color: #fff;
border-radius: 100px;
display: flex;
align-items: center;
justify-content: center;
background: $light-color;
} }
.myTracks { .myTracks {
width: 100%; width: 100%;
@@ -234,10 +266,39 @@
padding: 10rpx 0 0 0; padding: 10rpx 0 0 0;
} }
.myTracks-action {
display: flex;
justify-content: space-between;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #fff;
height: 75rpx;
align-items: center;
padding: 0 32rpx;
}
.myTracks-action-btn {
width: 130rpx;
height: 60rpx;
line-height: 60rpx;
}
.myTracks-divider { .myTracks-divider {
width: 100%; width: 100%;
height: 20rpx; height: 20rpx;
} }
.myTracks-action-check {
align-items: center;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.edit{
padding-right: 32rpx;
}
</style> </style>

View File

@@ -84,7 +84,7 @@ export default {
} }
if (!this.feedBack.context) { if (!this.feedBack.context) {
uni.showToast({ uni.showToast({
title: "请填写反馈类型", title: "请填写反馈信息",
duration: 2000, duration: 2000,
icon: "none", icon: "none",
}); });

View File

@@ -16,21 +16,32 @@
</u-form-item> </u-form-item>
<u-form-item label="生日" label-width="150" right-icon="arrow-right"> <u-form-item label="生日" label-width="150" right-icon="arrow-right">
<u-input v-model="birthday" disabled placeholder="请选择出生日期" @click="showBirthday = true" /> <div style="width: 100%;" @click="showBirthday = true">{{ birthday || '请选择出生日期' }}</div>
<u-picker v-model="showBirthday" mode="time" :confirm-color="lightColor" @confirm="selectTime"></u-picker> <u-picker v-model="showBirthday" mode="time" :confirm-color="lightColor" @confirm="selectTime"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="城市" label-width="150" placeholder="请选择城市" right-icon="arrow-right"> <u-form-item label="城市" label-width="150" placeholder="请选择城市" right-icon="arrow-right">
<u-input v-model="form.___path" disabled @click="clickRegion" /> <div style="width: 100%;" @click="clickRegion">{{ form.___path || '请选择城市' }}</div>
</u-form-item> </u-form-item>
<view class="submit" @click="submit">保存</view>
<view class="submit" @click="quiteLoginOut">退出登录</view>
</u-form>
<u-form-item label="手机号" label-width="150">
<view v-if="form.mobile">
{{form.mobile}}
</view>
<view v-else>
<view class="submit" @click="navigateTo(form.username)">绑定手机号码</view>
</view>
</u-form-item>
</u-form>
<div class="bottom">
<view class="submit" @click="submit">保存</view>
<view class="submit light" @click="quiteLoginOut">退出登录</view>
</div>
<m-city :provinceData="region" headTitle="区域选择" ref="cityPicker" @funcValue="getPickerParentValue" pickerSize="4"></m-city> <m-city :provinceData="region" headTitle="区域选择" ref="cityPicker" @funcValue="getPickerParentValue" pickerSize="4"></m-city>
</view> </view>
</template> </template>
<script> <script>
import { saveUserInfo } from "@/api/members.js"; import { saveUserInfo, getUserInfo } from "@/api/members.js";
import { upload } from "@/api/common.js"; import { upload } from "@/api/common.js";
import storage from "@/utils/storage.js"; import storage from "@/utils/storage.js";
import uFormItem from "@/uview-ui/components/u-form-item/u-form-item.vue"; import uFormItem from "@/uview-ui/components/u-form-item/u-form-item.vue";
@@ -48,6 +59,8 @@ export default {
region: storage.getUserInfo().region || [], //地址 region: storage.getUserInfo().region || [], //地址
sex: storage.getUserInfo().sex, //性别 sex: storage.getUserInfo().sex, //性别
___path: storage.getUserInfo().region, ___path: storage.getUserInfo().region,
mobile: storage.getUserInfo().mobile,
username: storage.getUserInfo().username,
}, },
birthday: storage.getUserInfo().birthday || "", //生日 birthday: storage.getUserInfo().birthday || "", //生日
photo: [ photo: [
@@ -158,6 +171,12 @@ export default {
this.form.birthday = `${time.year}-${time.month}-${time.day}`; this.form.birthday = `${time.year}-${time.month}-${time.day}`;
this.birthday = `${time.year} - ${time.month} - ${time.day}`; this.birthday = `${time.year} - ${time.month} - ${time.day}`;
}, },
navigateTo(username) {
uni.navigateTo({
url: '/pages/mine/set/securityCenter/bindMobile' + '?username=' + username,
});
},
}, },
/** /**
@@ -166,7 +185,11 @@ export default {
onLoad() {}, onLoad() {},
}; };
</script> </script>
<style>
page{
background: #fff;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.submit { .submit {
height: 90rpx; height: 90rpx;
@@ -207,4 +230,21 @@ export default {
.form { .form {
background-color: #ffffff; background-color: #ffffff;
} }
.bottom{
position: fixed;
bottom: 40px;
display: flex;
align-items: center;
width: 100%;
>.submit{
background: $light-color;
color: #fff;
width: 40%;
}
}
.light{
background: rgba($color: $light-color, $alpha: 0.2) !important;
color: $light-color !important;
}
</style> </style>

View File

@@ -0,0 +1,218 @@
<template>
<view class="box">
<view class="box-tips">
<h2 class='h2'>
绑定手机号码
</h2>
<view class="verification"></view>
</view>
<view class="form">
<u-form :model="codeForm" ref="validateCodeForm">
<view v-if="!validateFlage">
<u-form-item label-width="120" label="手机号" prop="mobile">
<u-input maxlength="11" v-model="codeForm.mobile" placeholder="请输入您的手机号" />
</u-form-item>
<u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
<u-input v-model="codeForm.code" placeholder="请输入验证码" />
<u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
ref="uCode" @change="codeChange"></u-verification-code>
<view @tap="getCode" class="text-tips">{{ tips }}</view>
</u-form-item>
<view class="submit" @click="validatePhone">绑定</view>
<myVerification keep-running @send="verification" class="verification" ref="verification"
business="BIND_MOBILE" />
</view>
</u-form>
</view>
</view>
</template>
<script>
import {
sendMobile,
bindMobile
} from "@/api/login";
import myVerification from "@/components/verification/verification.vue"; //验证
import uuid from "@/utils/uuid.modified.js";
export default {
components: {
myVerification,
},
data() {
return {
uuid,
validateFlage: false, //是否进行了手机号验证
step: 0, //当前验证步骤
flage: false, //是否验证码验证
codeForm: {
mobile: "", //手机号
code: "", //验证码
username: "", //用户名
},
tips: "", //提示
seconds: 69, // 60s等待时间
// 验证码登录校验
codeRules: {
mobile: [{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: "手机号码不正确",
trigger: ["blur"],
}, ],
code: [{
min: 4,
max: 6,
required: true,
message: "请输入验证码",
trigger: ["blur"],
}, ],
},
};
},
onLoad(options) {
this.codeForm.username = options.username;
},
onReady() {
// 必须要在onReady生命周期因为onLoad生命周期组件可能尚未创建完毕
this.$refs.validateCodeForm.setRules(this.codeRules);
},
watch: {
flage(val) {
if (val) {
if (this.$refs.uCode.canGetCode) {
uni.showLoading({
title: "正在获取验证码",
});
sendMobile(this.codeForm.mobile, "BIND_MOBILE").then((res) => {
if (this.$store.state.isShowToast){ uni.hideLoading() };
// 这里此提示会被this.start()方法中的提示覆盖
if (res.data.success) {
this.$refs.uCode.start();
} else {
uni.showToast({
title: res.data.message,
duration: 2000,
icon: "none",
});
this.flage = false;
this.$refs.verification.getCode();
}
})
} else {
this.$u.toast("请倒计时结束后再发送");
}
}
},
},
methods: {
// 验证码验证
verification(val) {
this.flage = val == this.$store.state.verificationKey ? true : false;
},
// 验证手机号
validatePhone() {
this.$refs.validateCodeForm.validate((valid) => {
if (valid) {
bindMobile(this.codeForm).then((res) => {
if (res.data.success) {
this.validateFlage = !this.validateFlage;
// 登录成功
uni.showToast({
title: "绑定成功!",
duration: 2000,
icon: "none",
});
setTimeout(() => {
uni.navigateBack({
delta: 1,
});
}, 1000);
}
});
}
});
},
codeChange(text) {
this.tips = text;
},
end() {
this.flage = false;
this.$refs.verification.getCode()
},
/**获取验证码 */
getCode() {
if (this.tips == "重新获取") {
this.$refs.verification.error(); //发送
}
if (!this.$u.test.mobile(this.codeForm.mobile)) {
uni.showToast({
title: "请输入正确手机号",
icon: "none",
});
return false;
}
if (!this.flage) {
this.$refs.verification.error(); //发送
return false;
}
},
start() {
this.$u.toast("验证码已发送");
this.flage = true;
this.$refs.verification.hide();
},
},
};
</script>
<style lang="scss" scoped>
@import url("@/pages/passport/login.scss");
/deep/ .u-form-item {
margin: 40rpx 0;
}
.sendCode {
/deep/ .u-form-item--right__content__slot {
display: flex;
}
}
.h2 {
font-size: 40rpx;
font-weight: bold;
}
page {
background: #fff;
}
.box {
padding: 80rpx 0;
border-radius: 20rpx;
}
.submit {
background: $light-color;
}
.box-tips {
margin: 0 72rpx;
}
.verification {
font-size: 24rpx;
color: #999;
margin-top: 10rpx;
}
</style>

View File

@@ -18,6 +18,7 @@
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<u-cell-item title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell-item> <u-cell-item title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell-item>
<!-- #endif --> <!-- #endif -->
<u-cell-item title="用户注销" v-if="userInfo.id" @click="logoff"></u-cell-item>
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item> <u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<!-- #endif --> <!-- #endif -->
@@ -56,7 +57,12 @@ export default {
this.$options.filters.quiteLoginOut(); this.$options.filters.quiteLoginOut();
}, },
/**
* 用户注销
*/
logoff(){
this.$options.filters.logoff();
},
/** /**
* 读取当前缓存 * 读取当前缓存

View File

@@ -12,11 +12,11 @@
</view> </view>
<div class="u-tabs-search"> <div class="u-tabs-search">
<u-search <u-search
placeholder="请输入订单编号" placeholder="请输入订单编号/商品名称/售后单号"
@search="submitSearchOrderList(current)" @search="submitSearchOrderList(current)"
@clear="submitSearchOrderList(current)" @clear="clear(current)"
@custom="submitSearchOrderList(current)" @custom="submitSearchOrderList(current)"
v-model="orderSn" v-model="keywords"
> >
</u-search> </u-search>
</div> </div>
@@ -239,13 +239,13 @@ export default {
pageSize: 10, pageSize: 10,
}, },
status: "loadmore", status: "loadmore",
orderSn: "", // 搜索订单sn keywords: "", // 搜索订单sn
}; };
}, },
onLoad(options) { onLoad(options) {
this.orderList = []; this.orderList = [];
this.params.pageNumber = 1; this.params.pageNumber = 1;
if (options.orderSn) this.params.orderSn = options.orderSn; if (options.orderSn) this.params.keywords = options.orderSn;
this.searchOrderList(this.current); this.searchOrderList(this.current);
}, },
onPullDownRefresh() { onPullDownRefresh() {
@@ -261,6 +261,14 @@ export default {
this.orderList = []; this.orderList = [];
this.searchOrderList(current); this.searchOrderList(current);
}, },
// 清空
clear(current){
this.params.pageNumber = 1;
this.logParams.pageNumber = 1;
this.params.keywords = ''
this.orderList = [];
this.searchOrderList(current);
},
/** /**
* 切换tab页时初始化数据 * 切换tab页时初始化数据
*/ */
@@ -282,7 +290,7 @@ export default {
*/ */
searchOrderList(index) { searchOrderList(index) {
if (index == 0) { if (index == 0) {
this.orderSn ? (this.params.orderSn = this.orderSn) : ""; this.keywords ? (this.params.keywords = this.keywords) : "";
this.getOrderList(); this.getOrderList();
} else { } else {
this.logParams = { this.logParams = {
@@ -294,7 +302,7 @@ export default {
if (index === 1) { if (index === 1) {
this.logParams.serviceStatus = "APPLY"; this.logParams.serviceStatus = "APPLY";
} }
this.orderSn ? (this.logParams.orderSn = this.orderSn) : ""; this.keywords ? (this.logParams.keywords = this.keywords) : "";
this.orderList = []; this.orderList = [];
this.getAfterSaleLogList(); this.getAfterSaleLogList();
} }

View File

@@ -37,9 +37,8 @@
<view class="body-view"> <view class="body-view">
<!-- 退款原因 --> <!-- 退款原因 -->
<view class="opt-view"> <view class="opt-view">
<u-form-item label="申请原因" :label-width="150"> <u-form-item label="申请原因" :label-width="150" >
<u-input v-model="form.reason" type="select" input-align="right" :select-open="reasonSelectShow" <div style="width: 100%; text-align: right;" @click="reasonSelectShow = true">{{ form.reason || '请选择申请原因' }}</div>
@click="reasonSelectShow = true" placeholder="请选择申请原因" />
</u-form-item> </u-form-item>
<u-form-item label="申请说明" :label-width="150"> <u-form-item label="申请说明" :label-width="150">
<u-input input-align="right" type="textarea" v-model="form.problemDesc" placeholder="请描述申请售后的说明" /> <u-input input-align="right" type="textarea" v-model="form.problemDesc" placeholder="请描述申请售后的说明" />

View File

@@ -30,16 +30,16 @@
<view class="opt-view"> <view class="opt-view">
<view class="img-title" style="font-size: 30rpx">填写物流信息</view> <view class="img-title" style="font-size: 30rpx">填写物流信息</view>
<u-form-item label="返回方式" :label-width="150"> <u-form-item label="返回方式" :label-width="150">
<u-input type="text" input-align="right" value="快递至第三方卖家" /> <div style="width: 100%; text-align: right;">快递至第三方卖家</div>
</u-form-item> </u-form-item>
<u-form-item label="快递公司" :label-width="150"> <u-form-item label="快递公司" :label-width="150">
<u-input v-model="form.courierCompany" type="select" input-align="right" :select-open="companySelectShow" @click="companySelectShow = true" placeholder="请选择快递公司" /> <div style="width: 100%; text-align: right;" @click="companySelectShow = true" >{{ form.courierCompany || '请选择快递公司' }}</div>
</u-form-item> </u-form-item>
<u-form-item label="快递单号" :label-width="150"> <u-form-item label="快递单号" :label-width="150">
<u-input input-align="right" v-model="form.logisticsNo" placeholder="请输入快递单号" /> <u-input input-align="right" v-model="form.logisticsNo" placeholder="请输入快递单号" />
</u-form-item> </u-form-item>
<u-form-item label="发货时间" :label-width="150"> <u-form-item label="发货时间" :label-width="150">
<u-input input-align="right" type="selects" disabled v-model="form.mDeliverTime" @click="timeshow = true" placeholder="请选择发货时间" /> <div style="width: 100%; text-align: right;" @click="timeshow = true" >{{ form.mDeliverTime || '请选择发货时间' }}</div>
</u-form-item> </u-form-item>
</view> </view>
</scroll-view> </scroll-view>

View File

@@ -35,6 +35,13 @@
</view> </view>
</view> </view>
<view class="speak-way" v-else>暂无对话</view> <view class="speak-way" v-else>暂无对话</view>
<view class="tips">回复对话</view>
<view class="cell-item complain-content">
<view class="cell-view content">
<u-input type="textarea" height="70rpx" auto-height v-model="complainValue" />
</view>
</view>
<view class="submit-btn" @click="handleSubmit">回复</view>
<view class="tips">平台仲裁</view> <view class="tips">平台仲裁</view>
<u-cell-group> <u-cell-group>
<u-cell-item :arrow="false" title="仲裁意见" :value="complainDetail.arbitrationResult || '暂无'"></u-cell-item> <u-cell-item :arrow="false" title="仲裁意见" :value="complainDetail.arbitrationResult || '暂无'"></u-cell-item>
@@ -43,10 +50,12 @@
</template> </template>
<script> <script>
import { getComplainDetail } from "@/api/after-sale"; import { getComplainDetail, communication } from "@/api/after-sale";
export default { export default {
data() { data() {
return { return {
complainId: "",
complainValue: "", //回复内容
complainDetail: "", //投诉详情 complainDetail: "", //投诉详情
statusData: { statusData: {
NEW: "新投诉", NEW: "新投诉",
@@ -61,6 +70,7 @@ export default {
}, },
onLoad(option) { onLoad(option) {
this.complainId = option.id;
this.init(option.id); this.init(option.id);
}, },
methods: { methods: {
@@ -78,6 +88,38 @@ export default {
}, },
}); });
}, },
handleSubmit() {
if (!this.complainValue) {
uni.showToast({
title: "请输入回复内容",
duration: 2000,
icon: "none",
});
return;
}
let params = {
content: this.complainValue,
complainId: this.complainId,
};
communication(params).then((res) => {
if (res.data.success) {
uni.showToast({
title: "回复成功",
duration: 2000,
icon: "none",
});
this.complainValue = '';
this.init(this.complainId);
} else {
uni.showToast({
title: res.data.message,
duration: 2000,
icon: "none",
});
}
});
},
/** /**
* 初始化投诉详情 * 初始化投诉详情
*/ */
@@ -126,4 +168,32 @@ export default {
.tips { .tips {
margin: 40rpx 32rpx; margin: 40rpx 32rpx;
} }
.cell {
width: 100%;
background: #fff;
padding: 26rpx;
}
.complain-content {
margin: 40rpx 32rpx;
display: flex;
align-items: center;
.content {
width: 100%;
}
.title {
width: 140rpx;
}
}
.submit-btn {
width: 70%;
margin: 0 auto;
height: 80rpx;
line-height: 80rpx;
color: #fff;
text-align: center;
background: $light-color;
margin-top: 20px;
border-radius: 200px;
}
</style> </style>

View File

@@ -0,0 +1,248 @@
<template>
<div>
<view class="logistics-detail">
<view class="card">
<div v-if="logisticsList && logisticsList.length>0">
<ul class="express-log" v-for="(packageItem, packageIndex) in logisticsList" :key="packageIndex" v-if="packageItem">
<div class="layui-layer-wrap">
<dl>
<dt>物流公司</dt>
<dd><div class="text-box">{{ packageItem.logisticsName }}</div></dd>
</dl>
<dl>
<dt>快递单号</dt>
<dd>
<div nctype="ordersSn" class="text-box">
<a class="item" :href='"https://www.baidu.com/s?wd="+packageItem.logisticsNo' target="_blank">{{ packageItem.logisticsNo }}</a>
</div>
</dd>
</dl>
<div class="div-express-log">
<ul class="express-log express-log-name">
<li v-for="(item, index) in packageItem.orderPackageItemList" :key="index">
<p class="time" style="width: 50%;"><span>商品名称</span><span>{{ item.goodsName }}</span></p>
<p class="time" style="width: 30%;"><span>发货时间</span><span>{{ item.logisticsTime }}</span></p>
<p class="time" style="width: 20%;"><span>发货数量</span><span>{{ item.deliverNumber }}</span></p>
</li>
</ul>
</div>
<div class="div-express-log">
<ul class="express-log" v-if="packageItem.traces && packageItem.traces.traces">
<li v-for="(item, index) in packageItem.traces.traces" :key="index">
<span class="time">{{ item.AcceptTime || item.acceptTime }}</span>
<span class="detail">{{ item.AcceptStation || item.remark }}</span>
</li>
</ul>
<ul class="express-log" v-else>
<li>暂无物流信息</li>
</ul>
</div>
</div>
</ul>
</div>
</view>
</view>
</div>
</template>
<script>
import { getPackage } from "@/api/trade.js";
export default {
data() {
return {
order: {},
logisticsList: [],
}
},
components: {
},
computed: {
},
onLoad(option) {
let sn = option.order_sn;
this.tracesList(sn);
},
mounted() {
},
methods: {
tracesList(sn) {
getPackage(sn).then((res) => {
if(res.data.success){
this.logisticsList = res.data.result;
}
});
},
},
}
</script>
<style >
page {
background: #fff;
}
</style>
<style lang="scss" scoped>
// @import url('./goods.scss');
.goods-item-view {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 10rpx 30rpx;
.goods-img {
flex: 1;
}
.goods-info {
padding-left: 30rpx;
flex: 3;
.goods-title {
margin-bottom: 10rpx;
color: $font-color-dark;
}
.goods-specs {
font-size: 24rpx;
margin-bottom: 10rpx;
color: #cccccc;
}
.goods-price {
font-size: 28rpx;
margin-bottom: 10rpx;
color: #ff5a10;
}
}
.goods-num {
>.good-complaint {
margin-top: 10rpx;
}
text-align: center;
flex: 1;
width: 60rpx;
color: $main-color;
}
}
.goods-info {
flex: 2;
}
.card-title {
background: #f2f2f2;
}
.logistics-detail {
margin-top: 20rpx;
padding: 0 16rpx;
}
.card {
background: #fff;
border-radius: 20rpx;
width: 100%;
> .card-title {
font-size: 24rpx;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
padding: 16rpx;
}
> .time-line {
padding: 16rpx 32rpx;
}
}
.u-order-title {
font-weight: bold;
}
.u-order-desc {
font-size: 26rpx;
color: #666;
margin: 10rpx 0;
}
.u-order-time {
font-size: 24rpx;
color: #999;
}
.empty {
padding: 40rpx 0;
}
.express-log {
/*margin: 5px -10px 5px 5px;*/
padding: 20rpx;
list-style-type: none;
li {
display: flex;
margin-top: 18rpx;
}
li:nth-of-type(1) {
margin-top: 0;
}
.time {
width: 140rpx;
display: flex;
// float: left;
flex-direction: column;
font-size: 24rpx;
line-height: 40rpx;
span:nth-of-type(1) {
margin-bottom: 16rpx;
}
}
.detail {
width: 100%;
flex: 1;
margin-left: 30rpx;
display: inline-block;
font-size: 24rpx;
line-height: 40rpx;
}
li {
line-height: 60rpx;
}
}
.layui-layer-wrap {
dl {
border-top: solid 1px #f5f5f5;
margin-top: -2rpx;
overflow: hidden;
dt {
font-size: 26rpx;
line-height: 40rpx;
display: inline-block;
padding: 16rpx 1% 16rpx 0;
color: #999;
}
dd {
font-size: 26rpx;
line-height: 40rpx;
display: inline-block;
padding: 16rpx 0 16rpx 16rpx;
border-left: solid 2rpx #f5f5f5;
.text-box {
line-height: 40rpx;
color: #333;
word-break: break-all;
}
}
}
}
.div-express-log {
// max-height: 600rpx;
border: solid 2rpx #e7e7e7;
background: #fafafa;
border-radius: 10rpx;
margin-bottom: 6rpx;
// overflow-y: auto;
// overflow-x: auto;
}
</style>

View File

@@ -115,7 +115,8 @@ export default {
onShow() { onShow() {
this.orderList = []; this.orderList = [];
this.params.pageNumber = 1; this.params.pageNumber = 1;
this.current == 0 ? this.loadData() : this.loadComments(); this.current = 0
this.loadData()
}, },
watch: { watch: {
/** /**

View File

@@ -386,13 +386,13 @@
</div> </div>
</template> </template>
<script> <script>
import * as API_Trade from "@/api/trade";
import * as API_Address from "@/api/address"; import * as API_Address from "@/api/address";
import * as API_Order from "@/api/order"; import * as API_Order from "@/api/order";
import * as API_Trade from "@/api/trade";
import configs from "@/config/config";
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
import invoices from "@/pages/order/invoice/setInvoice"; import invoices from "@/pages/order/invoice/setInvoice";
import { mapState } from "vuex"; import { mapState } from "vuex";
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
import configs from "@/config/config";
export default { export default {
onLoad: function (val) { onLoad: function (val) {
this.routerVal = val; this.routerVal = val;
@@ -445,6 +445,8 @@ export default {
notSupportFreight: [], //不支持运费 notSupportFreight: [], //不支持运费
notSupportFreightGoodsList: ["以下商品超出配送范围:"], notSupportFreightGoodsList: ["以下商品超出配送范围:"],
storeAddress: "", storeAddress: "",
originOrderData:"", // 原始订单数据
}; };
}, },
watch: { watch: {
@@ -482,6 +484,7 @@ export default {
* 监听返回 * 监听返回
*/ */
onBackPress(e) { onBackPress(e) {
console.log("onBackPress", e);
if (e.from == "backbutton") { if (e.from == "backbutton") {
let routes = getCurrentPages(); let routes = getCurrentPages();
let curRoute = routes[routes.length - 1].options; let curRoute = routes[routes.length - 1].options;
@@ -495,7 +498,7 @@ export default {
}); });
} }
}); });
console.log("curRoute.addId",curRoute.addId)
if (curRoute.addId) { if (curRoute.addId) {
uni.reLaunch({ uni.reLaunch({
url: "/pages/tabbar/cart/cartList", url: "/pages/tabbar/cart/cartList",
@@ -651,7 +654,7 @@ export default {
}); });
return false; return false;
} }
} else if (this.shippingText === "LOGISTICS" && this.orderMessage.cartTypeEnum != 'VIRTUAL') { } else if (this.shippingText === "LOGISTICS" && this.orderMessage.cartTypeEnum !== 'VIRTUAL') {
if (!this.address.id) { if (!this.address.id) {
uni.showToast({ uni.showToast({
title: "请选择地址", title: "请选择地址",
@@ -785,20 +788,31 @@ export default {
this.notSupportFreight = []; this.notSupportFreight = [];
// 获取结算参数 // 获取结算参数
API_Trade.getCheckoutParams(this.routerVal.way).then((res) => { API_Trade.getCheckoutParams(this.routerVal.way).then((res) => {
// 获取结算参数 进行首次判断
this.originOrderData = this.orderMessage ? JSON.parse(JSON.stringify(this.orderMessage)) : ""
if ( if (
!res.data.result.checkedSkuList || !res.data.result.checkedSkuList ||
res.data.result.checkedSkuList.length === 0 res.data.result.checkedSkuList.length === 0
) { ) {
if(!this.originOrderData.checkedSkuList.length){
uni.switchTab({ uni.switchTab({
url: "/pages/tabbar/cart/cartList", url: "/pages/tabbar/cart/cartList",
}); });
} }
}
if (res.data.result.skuList.length <= 0) { if (res.data.result.skuList.length <= 0) {
if(!this.originOrderData.skuList.length){
uni.navigateTo({ uni.navigateTo({
url: "/pages/order/myOrder?status=0", url: "/pages/order/myOrder?status=0",
}); });
} }
}
let repeatData; let repeatData;
res.data.result.cartList.forEach((item, index) => { res.data.result.cartList.forEach((item, index) => {
// 如果已经写过备注信息的话赋值 // 如果已经写过备注信息的话赋值

View File

@@ -138,7 +138,7 @@
shape="circle" shape="circle"
class="cancel-btn" class="cancel-btn"
size="mini" size="mini"
v-if="order.groupAfterSaleStatus && (order.groupAfterSaleStatus==='NOT_APPLIED'|| order.groupAfterSaleStatus==='PART_AFTER_SALE' )" v-if="order.groupAfterSaleStatus && ( order.groupAfterSaleStatus.includes('NOT_APPLIED') || order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))"
@click="applyService(order)" @click="applyService(order)"
> >
退款/售后 退款/售后

View File

@@ -10,7 +10,7 @@
</div> </div>
<!-- 物流信息 --> <!-- 物流信息 -->
<view class="info-view logistics-view"> <view class="info-view logistics-view">
<view class="logistics-List" v-if="logisticsList && logisticsList.traces.length != 0 "> <view class="logistics-List" v-if="logisticsList && logisticsList.traces && logisticsList.traces.length != 0 ">
<view class="logistics-List-title"> <view class="logistics-List-title">
{{ logisticsList.traces[logisticsList.traces.length - 1].AcceptStation }} {{ logisticsList.traces[logisticsList.traces.length - 1].AcceptStation }}
</view> </view>
@@ -23,6 +23,14 @@
<view class="verificationCode" v-if="order.verificationCode"> <view class="verificationCode" v-if="order.verificationCode">
券码 {{ order.orderStatus == 'CANCELLED' ? '已失效' : order.verificationCode }} 券码 {{ order.orderStatus == 'CANCELLED' ? '已失效' : order.verificationCode }}
</view> </view>
<view @click="handleClickDeliver()" class="info-view logi-view" v-else-if="orderPackage && orderPackage.length">
<view class="verificationCode">
当前订单有 {{ orderPackage.length }} 个包裹快递
</view>
<div>
点击此处查看
</div>
</view>
<view v-else class="logistics-List-title"> <view v-else class="logistics-List-title">
{{ '暂无物流信息' }} {{ '暂无物流信息' }}
</view> </view>
@@ -30,7 +38,7 @@
</view> </view>
<!-- 地址 --> <!-- 地址 -->
<view class="info-view" v-if="order.deliveryMethod == 'LOGISTICS'"> <view class="info-view" v-if="order.deliveryMethod === 'LOGISTICS' && order.orderType !== 'VIRTUAL'">
<view class="address-view"> <view class="address-view">
<view> <view>
<view class="address-title"> <view class="address-title">
@@ -44,7 +52,7 @@
</view> </view>
<!-- 提货地址 --> <!-- 提货地址 -->
<view class="info-view" v-if="order.deliveryMethod == 'SELF_PICK_UP'"> <view class="info-view" v-if="order.deliveryMethod === 'SELF_PICK_UP'">
<view class="address-view"> <view class="address-view">
<view> <view>
<view class="order-info-view"> <view class="order-info-view">
@@ -83,6 +91,9 @@
<view class="goods-price"> <view class="goods-price">
{{ sku.goodsPrice | unitPrice }} {{ sku.goodsPrice | unitPrice }}
<!-- <span v-if="sku.point">+{{ sku.point }}积分</span> --> <!-- <span v-if="sku.point">+{{ sku.point }}积分</span> -->
<span style="font-size: 24rpx;margin-left: 14rpx;color: #ff9900;" v-if="sku.isRefund && sku.isRefund !== 'NO_REFUND'">
{{refundPriceList(sku.isRefund)}} ({{ sku.refundPrice | unitPrice("") }})
</span>
</view> </view>
</view> </view>
<view class="goods-num"> <view class="goods-num">
@@ -105,11 +116,11 @@
<view class="title">商品总价</view> <view class="title">商品总价</view>
<view class="value">{{ order.goodsPrice | unitPrice }}</view> <view class="value">{{ order.goodsPrice | unitPrice }}</view>
</view> </view>
<view class="order-info-view"> <view class="order-info-view" v-if="order.freightPrice">
<view class="title">运费</view> <view class="title">运费</view>
<view class="value">{{ order.freightPrice | unitPrice }}</view> <view class="value">{{ order.freightPrice | unitPrice }}</view>
</view> </view>
<view class="order-info-view"> <view class="order-info-view" v-if="order.priceDetailDTO">
<view class="title">优惠券</view> <view class="title">优惠券</view>
<view class="value main-color">-{{ order.priceDetailDTO.couponPrice | unitPrice }}</view> <view class="value main-color">-{{ order.priceDetailDTO.couponPrice | unitPrice }}</view>
</view> </view>
@@ -159,7 +170,7 @@
<view class="order-info-view"> <view class="order-info-view">
<view class="title">订单备注</view> <view class="title">订单备注</view>
<view class="value">{{ <view class="value">{{
order.remark order.remark || '暂无备注'
}}</view> }}</view>
</view> </view>
<view class="order-info-view"> <view class="order-info-view">
@@ -249,7 +260,7 @@
</template> </template>
<script> <script>
import { getExpress } from "@/api/trade.js"; import { getExpress, getPackage } from "@/api/trade.js";
import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js"; import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js";
import shares from "@/components/m-share/index"; //分享 import shares from "@/components/m-share/index"; //分享
@@ -307,6 +318,7 @@ export default {
cancelList: "", cancelList: "",
rogShow: false, rogShow: false,
reason: "", reason: "",
orderPackage:"",
}; };
}, },
onLoad(options) { onLoad(options) {
@@ -314,6 +326,34 @@ export default {
this.sn = options.sn; this.sn = options.sn;
}, },
methods: { methods: {
//获取包裹
async getOrderPackage() {
getPackage(this.order.sn).then(res => {
if (res.data.success) {
this.orderPackage = res.data.result
}
})
},
handleClickDeliver(){
uni.navigateTo({
url: `/pages/order/deliverDetail?order_sn=${this.order.sn}`,
});
},
// 退款状态枚举
refundPriceList(status) {
switch (status) {
case 'ALL_REFUND':
return "全部退款";
case 'PART_REFUND':
return "部分退款";
case 'NO_REFUND':
return "未退款";
case 'REFUNDING':
return "退款中";
default:
return "";
}
},
callPhone(){ callPhone(){
this.$options.filters.callPhone(this.order.storeAddressMobile ) this.$options.filters.callPhone(this.order.storeAddressMobile )
}, },
@@ -359,7 +399,8 @@ export default {
this.orderGoodsList = order.orderItems; this.orderGoodsList = order.orderItems;
this.orderDetail = res.data.result; this.orderDetail = res.data.result;
if (this.order.deliveryMethod === 'LOGISTICS') { if (this.order.deliveryMethod === 'LOGISTICS') {
this.loadLogistics(sn) this.loadLogistics(sn);
this.getOrderPackage();
} }
if (this.$store.state.isShowToast){ uni.hideLoading() }; if (this.$store.state.isShowToast){ uni.hideLoading() };
}); });

View File

@@ -17,12 +17,12 @@
:border-bottom="false" :border-bottom="false"
prop="companyAddressPath" prop="companyAddressPath"
label="公司所在地" label="公司所在地"
><u-input >
type="select" <div @click="showPicker()" style="margin-right: 30rpx;">选择</div>
<u-input
disabled
:custom-style="defaultInputStyle" :custom-style="defaultInputStyle"
v-model="form.companyAddressPath" v-model="form.companyAddressPath"
disabled
@click="showPicker()"
/></u-form-item> /></u-form-item>
<u-form-item <u-form-item
required required
@@ -338,6 +338,7 @@ export default {
}, },
// 显示三级地址联动 // 显示三级地址联动
showPicker() { showPicker() {
console.log(this.$refs)
this.$refs.cityPicker.show(); this.$refs.cityPicker.show();
}, },
validatorStep1Form() { validatorStep1Form() {

View File

@@ -33,7 +33,10 @@
:border-bottom="false" :border-bottom="false"
prop="goodsManagementCategory" prop="goodsManagementCategory"
label="店铺经营类目" label="店铺经营类目"
><u-input >
<div @click="showCategory()" style="margin-right: 30rpx;">选择</div>
<u-input
:custom-style="defaultInputStyle" :custom-style="defaultInputStyle"
v-model="goodsManagementCategory" v-model="goodsManagementCategory"
disabled disabled
@@ -46,15 +49,17 @@
prop="storeAddressPath" prop="storeAddressPath"
label="店铺所在地" label="店铺所在地"
> >
<div @click="showPicker()" style="margin-right: 30rpx;">选择</div>
<u-input <u-input
:custom-style="defaultInputStyle" :custom-style="defaultInputStyle"
v-model="form.storeAddressPath" v-model="form.storeAddressPath"
disabled disabled
@click="showPicker()"
/> />
</u-form-item> </u-form-item>
<u-form-item <!-- <u-form-item
required required
:border-bottom="false" :border-bottom="false"
prop="storeAddressPath" prop="storeAddressPath"
@@ -62,7 +67,7 @@
> >
<div class="get-center" @click="clickUniMap()">开始定位</div> <div class="get-center" @click="clickUniMap()">开始定位</div>
<div class="tips-success" v-if="form.storeCenter">已成功定位</div> <div class="tips-success" v-if="form.storeCenter">已成功定位</div>
</u-form-item> </u-form-item> -->
<u-form-item <u-form-item
required required
@@ -287,7 +292,7 @@ export default {
}, },
getPickerParentValue(e) { getPickerParentValue(e) {
this.form.storeAddressIdPath = []; this.form.storeAddressIdPath = [];
console.log(e)
let name = ""; let name = "";
e.forEach((item, index) => { e.forEach((item, index) => {
if (item.id) { if (item.id) {
@@ -298,9 +303,11 @@ export default {
} else { } else {
name += item.localName + ","; name += item.localName + ",";
} }
this.form.storeAddressPath = name; this.$set(this.form,'storeAddressPath',name)
} }
}); });
this.form.storeCenter = e[e.length-1].center
}, },
// 显示三级地址联动 // 显示三级地址联动
showPicker() { showPicker() {

View File

@@ -428,7 +428,7 @@
//写入用户信息 //写入用户信息
uni.setStorageSync("nickname", infoRes.userInfo.nickName); uni.setStorageSync("nickname", infoRes.userInfo.nickName);
uni.setStorageSync("avatar", infoRes.userInfo.avatarUrl); uni.setStorageSync("avatar", infoRes.userInfo.avatarUrl);
uni.setStorageSync("unionId", infoRes.userInfo.unionId); uni.setStorageSync("unionId", infoRes.userInfo.unionId || infoRes.userInfo.unionid);
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
//微信小程序获取openid 需要特殊处理 如需获取openid请参考uni-id: https://uniapp.dcloud.net.cn/uniCloud/uni-id //微信小程序获取openid 需要特殊处理 如需获取openid请参考uni-id: https://uniapp.dcloud.net.cn/uniCloud/uni-id

View File

@@ -20,10 +20,18 @@
<view>您的公开信息昵称头像</view> <view>您的公开信息昵称头像</view>
</view> </view>
<view class="btns"> <view class="btns">
<button type="primary" bindtap="getUserProfile" @click="getUserProfile()" <button type="primary" :disabled="logingFlag" bindtap="getUserProfile" @click="getUserProfile()"
class="btn-auth">登录</button> class="btn-auth">登录</button>
<div @click="backToHome" class="btn-callback">暂不登录</div> <div @click="backToHome" class="btn-callback">暂不登录</div>
</view> </view>
<div class="privacy">
<u-checkbox shape="circle" v-model="checked" :active-color="lightColor">
<div class="flex">
阅读并同意<navigator class="light-color" url="/pages/mine/help/tips?type=PRIVACY_POLICY">隐私协议</navigator>
<navigator class="light-color" url="/pages/mine/help/tips?type=USER_AGREEMENT">用户协议</navigator>
</div>
</u-checkbox>
</div>
</div> </div>
</view> </view>
</view> </view>
@@ -45,6 +53,8 @@
export default { export default {
data() { data() {
return { return {
lightColor:this.$lightColor,
checked:false,
configs:config, configs:config,
// 是否展示手机号码授权弹窗,默认第一步不展示,要先获取用户基础信息 // 是否展示手机号码授权弹窗,默认第一步不展示,要先获取用户基础信息
phoneAuthPopup: false, phoneAuthPopup: false,
@@ -54,6 +64,7 @@
code: "", code: "",
//微信昵称 //微信昵称
nickName: "", nickName: "",
logingFlag: false,
//微信头像 //微信头像
image: "", image: "",
}; };
@@ -66,7 +77,19 @@
withShareTicket: true withShareTicket: true
}); });
let that = this;
//获取code
uni.login({
success: (res) => {
if(res.errMsg === "login:ok") {
this.code = res.code
} else {
uni.showToast({
title: "系统异常,请联系管理员!"
})
}
},
});
}, },
methods: { methods: {
@@ -93,27 +116,23 @@
//获取用户信息 //获取用户信息
getUserProfile(e) { getUserProfile(e) {
let that = this; if(!this.checked){
//获取code
uni.login({
success: (res) => {
if(res.errMsg === "login:ok") {
that.code = res.code
} else {
uni.showToast({ uni.showToast({
title: "系统异常,请联系管理员!" title:"请勾选协议",
icon:'none'
}) })
return
} }
}, this.logingFlag = true;
});
if (this.code) { if (this.code) {
// 推荐使用wx.getUserProfile获取用户信息开发者每次通过该接口获取用户个人信息均需用户确认 // 推荐使用wx.getUserProfile获取用户信息开发者每次通过该接口获取用户个人信息均需用户确认
uni.getUserProfile({ uni.getUserProfile({
desc: "用于完善会员资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 desc: "用于完善会员资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => { success: (res) => {
that.nickName = res.userInfo.nickName; console.log("success", res)
that.image = res.userInfo.avatarUrl; this.nickName = res.userInfo.nickName;
this.image = res.userInfo.avatarUrl;
/** /**
* 根据公有的配置设置登录方式 * 根据公有的配置设置登录方式
@@ -152,13 +171,15 @@
}); });
}); });
}); });
}, },
fail: (res) => { fail: (res) => {
console.log("fail", res)
}, },
}); });
}
this.logingFlag = false;
}
}, },
//获取手机号授权 //获取手机号授权
@@ -353,4 +374,10 @@
transform: scale(1.1); transform: scale(1.1);
} }
} }
.privacy{
text-align: center;
margin-top: 20rpx;
width: 100%;
}
</style> </style>

View File

@@ -155,15 +155,17 @@ export default {
* 顶部筛选条件 * 顶部筛选条件
*/ */
select(index) { select(index) {
this.params = {
pageNumber: 1,
pageSize: 10,
};
this.selectIndex = index; this.selectIndex = index;
this.params.grade = ["", "GOOD", "MODERATE", "WORSE", ""][ this.params.grade = ["", "GOOD", "MODERATE", "WORSE", ""][
this.selectIndex this.selectIndex
]; ];
this.selectIndex == 4 ? (this.params.haveImage = 1) : true; this.selectIndex === 4 ? (this.params.haveImage = 1) : true;
this.params.pageNumber = 1;
this.params.pageSize = 10;
this.commDetail = []; this.commDetail = [];
if (this.selectIndex == 0) { if (this.selectIndex === 0) {
this.params = { this.params = {
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,

View File

@@ -554,7 +554,7 @@ export default {
this.productId = id; // skuId this.productId = id; // skuId
// 这里请求获取到页面数据 解析数据 // 这里请求获取到页面数据 解析数据
let response = await getGoods(id, goodsId); let response = await getGoods(id || 'undefined', goodsId);
// 判断当前接口返回内容 // 判断当前接口返回内容
if (!response.data.success) { if (!response.data.success) {
@@ -594,7 +594,7 @@ export default {
} }
}); });
// 轮播图 // 轮播图
this.imgList = this.goodsDetail.goodsGalleryList; this.imgList = this.goodsDetail.goodsGalleryList.filter(i => i.indexOf("\"url\":") === -1 && i.indexOf("\"status\":") === -1);
// 获取店铺基本信息 // 获取店铺基本信息
this.getStoreBaseInfoFun(this.goodsDetail.storeId); this.getStoreBaseInfoFun(this.goodsDetail.storeId);

View File

@@ -67,7 +67,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../product.scss"; @import "../product.scss";
.recommend-item-name { .recommend-item-name {
height: 70rpx; height: 60rpx;
color: #333; color: #333;
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;

View File

@@ -85,7 +85,7 @@
<u-tabs :list="tabs" :active-color="mainColor" :is-scroll="false" :current="current" @change="changeTab"></u-tabs> <u-tabs :list="tabs" :active-color="mainColor" :is-scroll="false" :current="current" @change="changeTab"></u-tabs>
<div class="content" v-if="current == 0"> <div class="content" v-if="current == 0">
<u-empty style='margin-top:100rpx' v-if="goodsList.length == 0" class="empty" text='暂无商品信息'></u-empty> <u-empty style='margin-top:100rpx' v-if="goodsList.length == 0" class="empty" text='暂无商品信息'></u-empty>
<goodsTemplate v-else :res="goodsList" :storeName="false" /> <goodsTemplate style="width:100%;" v-else :res="goodsList" :storeName="false" />
</div> </div>
<!-- 全部分类 --> <!-- 全部分类 -->
<div class="category" v-if="current == 1"> <div class="category" v-if="current == 1">

View File

@@ -1,5 +1,10 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<u-navbar :is-back="false" title="购物车">
<div slot="right">
<div class="light-color edit" @click="isEdit = !isEdit">{{ !isEdit ? '编辑' : '完成'}}</div>
</div>
</u-navbar>
<!-- 空白页--> <!-- 空白页-->
<view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty"> <view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty">
<image src="/static/emptyCart.png" mode="aspectFit"></image> <image src="/static/emptyCart.png" mode="aspectFit"></image>
@@ -8,7 +13,6 @@
<navigator class="navigator" url="/pages/tabbar/home/index" open-type="switchTab">随便逛逛></navigator> <navigator class="navigator" url="/pages/tabbar/home/index" open-type="switchTab">随便逛逛></navigator>
</view> </view>
</view> </view>
<!-- 店铺商品信息 --> <!-- 店铺商品信息 -->
<div class="content"> <div class="content">
<div class="box box2" :class="{ invalid: isInvalid(item) }" v-for="(item, index) in cartDetail.cartList" <div class="box box2" :class="{ invalid: isInvalid(item) }" v-for="(item, index) in cartDetail.cartList"
@@ -73,7 +77,7 @@
{{ skuItem.goodsSku.goodsName }} {{ skuItem.goodsSku.goodsName }}
</p> </p>
<!-- 规格 --> <!-- 规格 -->
<p class="sp-type">{{skuItem.goodsSku.simpleSpecs}}</p> <p class="sp-type" style="width:300rpx">{{skuItem.goodsSku.simpleSpecs}}</p>
<p class="sp-type" v-if="skuItem.goodsSku.salesModel == 'WHOLESALE'">批发商品</p> <p class="sp-type" v-if="skuItem.goodsSku.salesModel == 'WHOLESALE'">批发商品</p>
<p class="sp-number"> <p class="sp-number">
<view class="sp-price"> <view class="sp-price">
@@ -554,6 +558,10 @@ page {
.u-image { .u-image {
box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05); box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05);
} }
.edit{
padding-right: 32rpx;
font-size: 28rpx;
}
.promotion-notice { .promotion-notice {
margin-top: 10px; margin-top: 10px;
margin-left: 68rpx; margin-left: 68rpx;

View File

@@ -2,7 +2,12 @@
<view class="category-wrap"> <view class="category-wrap">
<u-navbar class="navbar" :is-back="false"> <u-navbar class="navbar" :is-back="false">
<div class="title">商品分类</div> <div class="title">商品分类</div>
<!-- #ifdef H5 -->
<u-search class="nav-search" @click.native="search" placeholder="搜索商品" :show-action="false"></u-search>
<!-- #endif -->
<!-- #ifndef H5 -->
<u-search class="nav-search" disabled @click.native="search" placeholder="搜索商品" :show-action="false"></u-search> <u-search class="nav-search" disabled @click.native="search" placeholder="搜索商品" :show-action="false"></u-search>
<!-- #endif -->
</u-navbar> </u-navbar>
<view class="content"> <view class="content">
<scroll-view scroll-y scroll-with-animation class="left-aside"> <scroll-view scroll-y scroll-with-animation class="left-aside">

View File

@@ -123,11 +123,26 @@ export default {
}, },
methods: { methods: {
navigateTo(url) { handleNavigate(url) {
uni.navigateTo({ uni.navigateTo({
url, url,
}); });
}, },
navigateTo(url) {
const ignores = [
'/pages/mine/set/setUp',
'/pages/mine/set/editionIntro',
'/pages/mine/set/feedBack'
]
if (!ignores.includes(url)) {
if (this.$options.filters.tipsToLogin('normal')) {
this.handleNavigate(url)
}
}
else {
this.handleNavigate(url)
}
},
linkMsgDetail(){ linkMsgDetail(){
uni.navigateTo({ uni.navigateTo({

View File

@@ -1,8 +1,8 @@
import Foundation from "./Foundation.js"; import { logout, logoffConfirm } from "@/api/login";
import storage from "@/utils/storage.js";
import { logout } from "@/api/login";
import { getUserInfo } from "@/api/members"; import { getUserInfo } from "@/api/members";
import storage from "@/utils/storage.js";
import Vue from "vue"; import Vue from "vue";
import Foundation from "./Foundation.js";
/** /**
* 金钱单位置换 2999 --> 2,999.00 * 金钱单位置换 2999 --> 2,999.00
* @param val * @param val
@@ -353,6 +353,7 @@ export function quiteLoginOut () {
storage.setAccessToken(""); storage.setAccessToken("");
storage.setRefreshToken(""); storage.setRefreshToken("");
storage.setUserInfo({}); storage.setUserInfo({});
storage.setHasLogin(false)
navigateToLogin("redirectTo"); navigateToLogin("redirectTo");
await logout(); await logout();
} }
@@ -360,6 +361,28 @@ export function quiteLoginOut () {
}); });
} }
/**
* 用户注销
*
*/
export function logoff () {
uni.showModal({
title: "提示",
content: "确认注销用户么注销用户将无法再次登录并失去当前数据就。根据法规数据最长保留6个月期间可以联系客服人员进行恢复数据。",
confirmColor: Vue.prototype.$mainColor,
async success (res) {
if (res.confirm) {
await logoffConfirm();
storage.setAccessToken("");
storage.setRefreshToken("");
storage.setUserInfo({});
navigateToLogin("redirectTo");
}
},
});
}
/** /**
* 跳转im * 跳转im
*/ */
@@ -376,7 +399,7 @@ export function talkIm (storeId, goodsId, id) {
} }
} }
export function tipsToLogin () { export function tipsToLogin (type) {
if (!isLogin("auth")) { if (!isLogin("auth")) {
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
@@ -388,8 +411,11 @@ export function tipsToLogin () {
if (res.confirm) { if (res.confirm) {
navigateToLogin(); navigateToLogin();
} else if (res.cancel) { } else if (res.cancel) {
if(type !== 'normal'){
uni.navigateBack(); uni.navigateBack();
} }
}
}, },
}); });
return false; return false;

View File

@@ -1,16 +1,16 @@
import Request from "@/lib/request/index.js";
import { import {
refreshTokenFn refreshTokenFn
} from "@/api/login.js"; } from "@/api/login.js";
import storage from "@/utils/storage.js"; import api from "@/config/api.js";
import Request from "@/lib/request/index.js";
import Foundation from "@/utils/Foundation.js";
import { import {
md5 md5
} from "@/utils/md5.js"; } from "@/utils/md5.js";
import Foundation from "@/utils/Foundation.js"; import storage from "@/utils/storage.js";
import api from "@/config/api.js";
import jwt from '@/js_sdk/t-jwt/jwt.js';
import uuid from "@/utils/uuid.modified.js"; import uuid from "@/utils/uuid.modified.js";
import jwt from '@/js_sdk/t-jwt/jwt.js'
import store from "../store"; import store from "../store";
@@ -89,7 +89,7 @@ http.interceptors.request.use(
*/ */
const decodeJwt = jwt(accessToken); const decodeJwt = jwt(accessToken);
const timing = new Date().getTime() / 1000 const timing = new Date().getTime() / 1000
if(decodeJwt.exp <= timing){ if (decodeJwt.exp <= timing) {
accessToken = "" accessToken = ""
storage.setAccessToken('') storage.setAccessToken('')
} }