Commit 8ece27c90bf9114a2b5f008cffb7786c7a94bb94
1 parent
3ed5153b
1. 美导顾问
2. 超时退款后的订单的显示退款的问题
Showing
9 changed files
with
255 additions
and
10 deletions
app.json
1 | 1 | { |
2 | 2 | "pages": [ |
3 | - "pages/index/index/index", | |
3 | + | |
4 | + "pages/index/index/index", | |
4 | 5 | "pages/justTest/justTest", |
5 | 6 | "pages/goods/categoryList/categoryList", |
6 | 7 | "pages/cart/cart/cart", |
... | ... | @@ -85,7 +86,8 @@ |
85 | 86 | "pages/user/assistance/assistance", |
86 | 87 | "pages/video/index", |
87 | 88 | "pages/template/index", |
88 | - "pages/store/index" | |
89 | + "pages/store/index", | |
90 | + "pages/user/choice_guide/choice_guide" | |
89 | 91 | ], |
90 | 92 | "plugins": { |
91 | 93 | "live-player-plugin": { | ... | ... |
pages/user/choice_guide/choice_guide.js
0 → 100644
1 | +var a = getApp(), | |
2 | + os = a.globalData.setting, | |
3 | + util = require("../../../utils/util.js"), | |
4 | + ut = util; | |
5 | +Page({ | |
6 | + data: { | |
7 | + url: os.url, | |
8 | + iurl: os.imghost, | |
9 | + total: 0, //数据的总量 | |
10 | + ismore: 0,//数据是否加载完毕 | |
11 | + page:1, | |
12 | + pageSize:10, | |
13 | + isload:0, | |
14 | + show_pop:0, | |
15 | + sele_item:null, | |
16 | + | |
17 | + }, | |
18 | + //------初始化加载---------- | |
19 | + onLoad: function(t) {}, | |
20 | + | |
21 | + onShow: function() { | |
22 | + this.get_list(); | |
23 | + }, | |
24 | + | |
25 | + //--点击分享事件--- | |
26 | + onShareAppMessage: function(t) { | |
27 | + return o.share; | |
28 | + }, | |
29 | + | |
30 | + get_list: function() { | |
31 | + var th = this, e = th; | |
32 | + var r_data={ | |
33 | + storeId: os.stoid, | |
34 | + page: th.data.page, | |
35 | + pageSize: th.data.pageSize | |
36 | + }; | |
37 | + | |
38 | + if(th.data.datet!="" && th.data.datet){ | |
39 | + r_data.Sdate=th.data.datet; | |
40 | + } | |
41 | + if(th.data.dates!="" && th.data.dates){ | |
42 | + r_data.Edate=th.data.dates; | |
43 | + } | |
44 | + if(th.data.input_val!="" && th.data.input_val){ | |
45 | + r_data.MobileTel=th.data.input_val; | |
46 | + } | |
47 | + if(getApp().globalData.userInfo.pickup_id){ | |
48 | + r_data.pickupId=getApp().globalData.userInfo.pickup_id; | |
49 | + } | |
50 | + getApp().request.promiseGet("/api/weshop/users/staff/page", { | |
51 | + data:r_data | |
52 | + }).then(res => { | |
53 | + th.setData({isload:1}); | |
54 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { | |
55 | + th.data.page++;//当前页数+1 | |
56 | + var arr1 = th.data.list;//获取明细数组 | |
57 | + var arr2 = res.data.data.pageData;//获取当前查询数据 | |
58 | + if(!arr1) arr1=[]; | |
59 | + | |
60 | + var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 | |
61 | + var ismore = 0; | |
62 | + if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 | |
63 | + th.setData({ | |
64 | + list: arr3, | |
65 | + total: res.data.data.total, | |
66 | + ismore: ismore, | |
67 | + }) | |
68 | + } | |
69 | + }) | |
70 | + | |
71 | + }, | |
72 | + | |
73 | + /** | |
74 | + * 页面上拉触底事件的处理函数 | |
75 | + */ | |
76 | + onReachBottom: function() { | |
77 | + if (this.data.total <= this.data.pageSize) return; | |
78 | + if (this.data.ismore) { | |
79 | + t.my_warnning("加载完啦!", 0, this);return | |
80 | + }; | |
81 | + this.get_list(); | |
82 | + }, | |
83 | + | |
84 | + //返回 | |
85 | + back:function () { | |
86 | + wx.navigateBack({ delta: 1}) | |
87 | + }, | |
88 | + | |
89 | + pop_sele:function (e) { | |
90 | + var index=e.currentTarget.dataset.index; | |
91 | + var item=this.data.list[index]; | |
92 | + this.setData({show_pop:1,sele_item:item}); | |
93 | + }, | |
94 | + close_pop:function () { | |
95 | + this.setData({show_pop:0}); | |
96 | + }, | |
97 | + //选择了导购,就跳转到会员中心页面 | |
98 | + go_user_info:function () { | |
99 | + var item=this.data.sele_item; | |
100 | + getApp().globalData.choice_guide=item; | |
101 | + getApp().goto("/pages/user/userinfo/userinfo"); | |
102 | + }, | |
103 | + | |
104 | + | |
105 | + | |
106 | + | |
107 | + | |
108 | +}); | |
0 | 109 | \ No newline at end of file | ... | ... |
pages/user/choice_guide/choice_guide.json
0 → 100644
pages/user/choice_guide/choice_guide.wxml
0 → 100644
1 | +<!-- 搜索导购顾问 --> | |
2 | +<view> | |
3 | + <view class="flex sear_all"> | |
4 | + <view class="inp_div flex" style="position: relative"> | |
5 | + <image class="find_img" src="{{iurl}}/miniapp/images/search.png"></image> | |
6 | + <input class="fs32" placeholder="请输入关键字" /> | |
7 | + </view> | |
8 | + <view class="sear_btn" onclick="sear()">查询</view> | |
9 | + </view> | |
10 | +</view> | |
11 | + | |
12 | + | |
13 | +<view wx:if="{{list.length>0}}"> | |
14 | + <!-- 导购列表 --> | |
15 | + <view class="big_box"> | |
16 | + <view class="item flex jc_sb ai-center" wx:for="{{list}}"> | |
17 | + <!-- 左边 --> | |
18 | + <view class="flex"> | |
19 | + <view><image class="head_pic" src="{{item.PhotoUrl}}" data-err_img="list[{{index}}].head_pic" ></image></view> | |
20 | + <view style="margin-left: 30rpx; margin-top: 20rpx"> | |
21 | + <view class="fs35">{{item.StaffName}}</view> | |
22 | + <view class="fs28">{{item.Remark1}}</view> | |
23 | + </view> | |
24 | + </view> | |
25 | + <!-- 右边 --> | |
26 | + <view bindtap="pop_sele" data-index="{{index}}"> | |
27 | + <view class="choice_btn flex jc-center ai-center fs26">选择</view> | |
28 | + </view> | |
29 | + </view> | |
30 | + </view> | |
31 | +</view> | |
32 | + | |
33 | +<!-- 没有明细 --> | |
34 | +<view class="empty_order" wx:if="{{isload && list.length<=0}}"> | |
35 | + <view class="flex-level"> | |
36 | + <image src="{{url}}miniapp/images/order/empty_order.png"></image> | |
37 | + </view> | |
38 | + <view class="flex-level fs30 xc-ash">暂无顾问明细</view> | |
39 | + <view class="flex-level"> | |
40 | + <navigator bindtap="back"> | |
41 | + <view class="flex-center fs30 white">返回</view> | |
42 | + </navigator> | |
43 | + </view> | |
44 | +</view> | |
45 | + | |
46 | +<!-- 弹起来选择 --> | |
47 | +<view class="pop_sele" hidden="{{!show_pop}}" > | |
48 | + <view class="cover-layer" bindtap="close_pop"></view> | |
49 | + <view class="box"> | |
50 | + <view style="padding: 0 30rpx"> | |
51 | + <view class="flex ai-center" style="background: #f2f2f2;margin-top: 30rpx; padding: 10rpx"> | |
52 | + <image style="margin: 10rpx" class="head_pic pic2" src="{{iurl}}/miniapp/images/no-head.jpg"></image> | |
53 | + <text class="fs35" style="margin-left: 10rpx">{{sele_item.StaffName}}</text> | |
54 | + </view> | |
55 | + <view class="flex ai-center" style="min-height: 160rpx; background:#f2f2f2; margin-top: 10rpx"> | |
56 | + <view class="fs28" style="margin-left: 10rpx">工作介绍:{{sele_item.Remark1}}</view> | |
57 | + </view> | |
58 | + <view bindtap="go_user_info" class="flex jc-center ai-center" style="margin-top: 20rpx; margin-bottom: 30rpx"> | |
59 | + <view class="t_choice_btn flex jc-center ai-center">选择</view> | |
60 | + </view> | |
61 | + </view> | |
62 | + </view> | |
63 | +</view> | |
64 | +<!-- 引入提示组件 --> | |
65 | +<warn id="warn"></warn> | |
0 | 66 | \ No newline at end of file | ... | ... |
pages/user/choice_guide/choice_guide.wxss
0 → 100644
1 | +.big_box{padding: 0 20rpx } | |
2 | +.head_pic{ width: 160rpx; height: 160rpx; border-radius: 50%} | |
3 | +.pic2{ width: 100rpx; height: 100rpx; } | |
4 | + | |
5 | +.item{border-bottom: 0.01rem solid #eeeeee; padding: 20rpx 0;} | |
6 | +.choice_btn{ width: 130rpx; height: 50rpx; border-radius: 50rpx; | |
7 | + border:1rpx solid #cb3549; color: #cb3549; | |
8 | +} | |
9 | +.box{ position: fixed; z-index: 6666; bottom: 0; left: 0;background-color: #fff;width: 100%;} | |
10 | +.t_choice_btn{ width: 160rpx; height: 50rpx; background-color:#169bd5; border-radius: 10rpx; color: #fff } | |
11 | + | |
12 | +.sear_all{ width: 93%; margin: 0 auto; height: 80rpx; margin-top: 20rpx } | |
13 | +.sear_all .inp_div,.sear_all .sear_btn{ height: 80rpx; line-height: 80rpx } | |
14 | +.inp_div{ width: 80%; overflow: hidden;background-color: #f2f2f2} | |
15 | +.sear_all .inp_div input{ margin-left: 54rpx; width: 100%; height: 100%; border: 0; border-radius: 0; } | |
16 | +.sear_btn{ width: 20%;background-color: #ff6768; text-align: center;color: #fff; font-size: 32rpx} | |
17 | +.find_img{width: 44rpx; height: 44rpx; position: absolute; left: 8rpx; top: 18rpx; z-index: 10} | |
0 | 18 | \ No newline at end of file | ... | ... |
pages/user/order_detail/order_detail.wxml
... | ... | @@ -18,7 +18,8 @@ |
18 | 18 | <view class="order-state"><view class="shop_name">门店:{{order.pickname}}</view> |
19 | 19 | <view>{{order.order_status_detail}}</view> |
20 | 20 | </view> |
21 | - <view class="order-detail" wx:for="{{order.order_goods}}" wx:key="{{index}}" wx:if="{{item.return_btn!=4}}" > | |
21 | + <!--wx:if="{{item.return_btn!=4}}" --> | |
22 | + <view class="order-detail" wx:for="{{order.order_goods}}" wx:key="{{index}}" > | |
22 | 23 | <view class="goods-img"> |
23 | 24 | <image class="wh100" src="{{resourceUrl+item.original_img}}" binderror="bind_bnerr" lazy-load="true" |
24 | 25 | data-errorimg="order.order_goods[{{index}}].original_img"></image> |
... | ... | @@ -35,7 +36,7 @@ |
35 | 36 | <view class="goods-num">×{{item.goods_num}}</view> |
36 | 37 | |
37 | 38 | <!-- 不是整单退的时候 --> |
38 | - <block wx:if="{{order.is_all_return!=1 && order.discount==0 && order.coupon_price<=0 && order.order_prom_amount<=0 && order.discount_amount<0 && item.prom_type!=5 && !order.is_prom}}"> | |
39 | + <block wx:if="{{order.is_all_return!=1 && order.discount<=0 && order.coupon_price<=0 && order.order_prom_amount<=0 && order.discount_amount<=0 && item.prom_type!=5 && !order.is_prom}}"> | |
39 | 40 | <view bindtap="checkReturnGoodsStatus" class="goods-num" data-oid="{{item.order_id}}" |
40 | 41 | data-recid="{{item.goods_id}}" wx:if="{{item.return_btn==1 && !order.is_bedistri}}">申请退款</view> |
41 | 42 | <view bindtap="gotoreturn" class="return-btn" data-oid="{{item.order_id}}" | ... | ... |
pages/user/order_list/order_list.wxml
... | ... | @@ -44,8 +44,9 @@ |
44 | 44 | <!-- 商品详情集合 --> |
45 | 45 | <view class="detail_commoditys"> |
46 | 46 | <!-- 单个商品 --> |
47 | + <!-- wx:if="{{goods.return_btn!=4}}" --> | |
47 | 48 | <view> |
48 | - <navigator class="detail_commodity flex-vertical padding border_bottom" wx:for="{{item.order_goods}}" wx:for-item="goods" wx:if="{{goods.return_btn!=4}}" wx:for-index="pinx" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}"> | |
49 | + <navigator class="detail_commodity flex-vertical padding border_bottom" wx:for="{{item.order_goods}}" wx:for-item="goods" wx:for-index="pinx" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}"> | |
49 | 50 | <!-- 商品图片 --> |
50 | 51 | <navigator class="rel"> |
51 | 52 | <image src="{{resourceUrl+goods.original_img}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="orderList[{{index}}].order_goods[{{pinx}}].original_img"></image> |
... | ... | @@ -67,7 +68,7 @@ |
67 | 68 | </view> |
68 | 69 | <view class="flex-level-right fs26 refund"> |
69 | 70 | <!-- 不是整单退的时候 --> |
70 | - <block wx:if="{{item.is_all_return!=1 && item.discount==0 && item.coupon_price<=0 && item.order_prom_amount<=0 && item.discount_amount<0 && goods.prom_type!=5 && !item.is_prom}}"> | |
71 | + <block wx:if="{{item.is_all_return!=1 && item.discount<=0 && item.coupon_price<=0 && item.order_prom_amount<=0 && item.discount_amount<=0 && goods.prom_type!=5 && !item.is_prom}}"> | |
71 | 72 | <view catchtap="checkReturnGoodsStatus" class="return-btn" data-oid="{{goods.order_id}}" data-recid="{{goods.goods_id}}" wx:if="{{goods.return_btn==1 && !item.is_bedistri }}">申请退款</view> |
72 | 73 | <view catchtap="gotoreturn" class="return-btn" data-oid="{{goods.order_id}}" data-recid="{{goods.goods_id}}" wx:if="{{goods.return_btn==2}}">退款中</view> |
73 | 74 | <view catchtap="checkReturnGoodsStatus" class="return-btn" data-oid="{{goods.order_id}}" data-recid="{{goods.goods_id}}" wx:if="{{goods.return_btn==3}}">重新退款</view> | ... | ... |
pages/user/userinfo/userinfo.js
... | ... | @@ -67,6 +67,8 @@ Page({ |
67 | 67 | is_zy: 0, //是否执行onshow |
68 | 68 | is_lable_set: "", //是否启用我的兴趣标签 |
69 | 69 | check_label: [], //我选择的兴趣标签 |
70 | + fir_guide_id:null, //存储会员详情接口出来的美导ID | |
71 | + | |
70 | 72 | }, |
71 | 73 | //通过路径跳转到其他页面 |
72 | 74 | goto: function(e) { |
... | ... | @@ -80,7 +82,9 @@ Page({ |
80 | 82 | var sms_conf = ee.switch_list; |
81 | 83 | sms_conf = JSON.parse(sms_conf); |
82 | 84 | th.setData({ |
83 | - is_lable_set: sms_conf.user_label_set | |
85 | + is_lable_set: sms_conf.user_label_set, //是不是会员标签设置 | |
86 | + guide_title:sms_conf.guide_consultant, //系统参数 导购标题 | |
87 | + guide_change_time:sms_conf.guide_change_time //每月能修改几次 | |
84 | 88 | }) |
85 | 89 | if (sms_conf.user_label_set) { |
86 | 90 | th.query_checklabels(); |
... | ... | @@ -627,6 +631,14 @@ Page({ |
627 | 631 | var e = this; |
628 | 632 | if (this.data.is_zy) return false; |
629 | 633 | this.wait_for_store_config(); |
634 | + | |
635 | + //如果有传值进行跳转的话 | |
636 | + var choice_guide=null; | |
637 | + if(getApp().globalData.choice_guide){ | |
638 | + choice_guide=JSON.parse(JSON.stringify(getApp().globalData.choice_guide)); | |
639 | + getApp().globalData.choice_guide=null; | |
640 | + } | |
641 | + | |
630 | 642 | var req = t; |
631 | 643 | req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { |
632 | 644 | success: function(src) { |
... | ... | @@ -644,6 +656,13 @@ Page({ |
644 | 656 | a.address=""; |
645 | 657 | } |
646 | 658 | |
659 | + e.data.fir_guide_id=a.staffId; | |
660 | + if(choice_guide){ | |
661 | + a.staffName=choice_guide.StaffName; | |
662 | + a.staffId=choice_guide.Id; | |
663 | + } | |
664 | + | |
665 | + | |
647 | 666 | e.setData({ |
648 | 667 | phone: a.mobile, |
649 | 668 | user: a, |
... | ... | @@ -656,6 +675,7 @@ Page({ |
656 | 675 | isstcsp: a.vipnopwd, |
657 | 676 | iscalendar:a.islunar |
658 | 677 | }); |
678 | + | |
659 | 679 | } |
660 | 680 | }) |
661 | 681 | a.getUserInfo(function(a) { |
... | ... | @@ -832,6 +852,11 @@ Page({ |
832 | 852 | islunar:th.data.iscalendar, |
833 | 853 | birthday:th.data.datet |
834 | 854 | } |
855 | + //往上提交美导的ID | |
856 | + if(th.data.fir_guide_id!=th.data.user.staffId){ | |
857 | + datas.staffId=th.data.user.staffId; | |
858 | + } | |
859 | + | |
835 | 860 | getApp().request.put("/api/weshop/users/updateUserInfo", { |
836 | 861 | data: datas, |
837 | 862 | success: function(res) { |
... | ... | @@ -862,5 +887,10 @@ Page({ |
862 | 887 | return o.share; |
863 | 888 | }, |
864 | 889 | |
890 | + //-- 跳转到获取导购的列表 -- | |
891 | + go_get_guide:function () { | |
892 | + getApp().goto("/pages/user/choice_guide/choice_guide"); | |
893 | + } | |
894 | + | |
865 | 895 | |
866 | 896 | }); |
867 | 897 | \ No newline at end of file | ... | ... |
pages/user/userinfo/userinfo.wxml
... | ... | @@ -184,15 +184,26 @@ |
184 | 184 | <!-- </block> --> |
185 | 185 | </view> |
186 | 186 | |
187 | + <!-- 选择门店 --> | |
187 | 188 | <view bindtap="onclickstore" class="user-name flex-vertical-between" data-type="email"> |
188 | 189 | <view class="user-name-txt">所属门店</view> |
189 | 190 | <view class="flex-center user-txt-right"> |
190 | - <view class="one-line">{{stoname}} | |
191 | - </view> | |
191 | + <view class="one-line">{{stoname}}</view> | |
192 | + <view class="angle">∟</view> | |
193 | + </view> | |
194 | + </view> | |
192 | 195 | |
196 | + <!-- 美容顾问 --> | |
197 | + <view bindtap="go_get_guide" class="user-name flex-vertical-between" data-type="email"> | |
198 | + <view class="user-name-txt">{{guide_title}}</view> | |
199 | + <view class="flex-center user-txt-right"> | |
200 | + <view class="one-line">{{user.staffName?user.staffName:"*选择顾问"}}</view> | |
193 | 201 | <view class="angle">∟</view> |
194 | 202 | </view> |
195 | 203 | </view> |
204 | + | |
205 | + | |
206 | + | |
196 | 207 | </view> |
197 | 208 | <!-- 我的兴趣 --> |
198 | 209 | <view wx:if="{{ isBool==1 && is_lable_set==1}}" class="padding Bbottom"> |
... | ... | @@ -218,6 +229,8 @@ |
218 | 229 | </view> |
219 | 230 | </view> |
220 | 231 | </view> |
232 | + </view> | |
233 | + | |
221 | 234 | <navigator bindtap="goto-address" class="user-name mt flex-vertical-between" url="/pages/user/address_list/address_list"> |
222 | 235 | <view class="user-name-txt">收货地址</view> |
223 | 236 | <view class="flex-center user-txt-right"> |
... | ... | @@ -225,11 +238,12 @@ |
225 | 238 | <view class="angle">∟</view> |
226 | 239 | </view> |
227 | 240 | </navigator> |
241 | + | |
228 | 242 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="email"> |
229 | 243 | <view class="user-name-txt">绑定时间</view> |
230 | 244 | <view class="user-txt-right one-line">{{user.reg_time?filters.replace_time2(user.reg_time):""}}</view> |
231 | 245 | </view> |
232 | - </view> | |
246 | + | |
233 | 247 | </view> |
234 | 248 | <!-- 确认修改按钮 --> |
235 | 249 | <view class="flex-center confirm"> | ... | ... |