-
Status changed to merged
-
mentioned in commit 4551b4dbcb9669d2558728a724d4ea729b168ba9
-
2. 超时退款后的订单的显示退款的问题
Showing
20 changed files
app.js
@@ -595,6 +595,17 @@ App({ | @@ -595,6 +595,17 @@ App({ | ||
595 | this.globalData.room_goods_id=null; //关闭要把物流清空 | 595 | this.globalData.room_goods_id=null; //关闭要把物流清空 |
596 | this.globalData.config2=null; //清除config2的缓存 | 596 | this.globalData.config2=null; //清除config2的缓存 |
597 | this.globalData.config=null; //清除config的缓存 | 597 | this.globalData.config=null; //清除config的缓存 |
598 | + }, | ||
599 | + | ||
600 | + clear_word:function (word) { | ||
601 | + | ||
602 | + var str=word; | ||
603 | + let reg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n])|(\s)/g , | ||
604 | + indexArr = reg.exec(str); | ||
605 | + if(str.match(reg)) { | ||
606 | + str = str.replace(reg, ''); | ||
607 | + } | ||
608 | + return str; | ||
598 | } | 609 | } |
599 | 610 | ||
600 | 611 |
app.json
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | - "pages/index/index/index", | 3 | + |
4 | + "pages/index/index/index", | ||
4 | "pages/justTest/justTest", | 5 | "pages/justTest/justTest", |
5 | "pages/goods/categoryList/categoryList", | 6 | "pages/goods/categoryList/categoryList", |
6 | "pages/cart/cart/cart", | 7 | "pages/cart/cart/cart", |
@@ -85,7 +86,8 @@ | @@ -85,7 +86,8 @@ | ||
85 | "pages/user/assistance/assistance", | 86 | "pages/user/assistance/assistance", |
86 | "pages/video/index", | 87 | "pages/video/index", |
87 | "pages/template/index", | 88 | "pages/template/index", |
88 | - "pages/store/index" | 89 | + "pages/store/index", |
90 | + "pages/user/choice_guide/choice_guide" | ||
89 | ], | 91 | ], |
90 | "plugins": { | 92 | "plugins": { |
91 | "live-player-plugin": { | 93 | "live-player-plugin": { |
components/diy_advertising/diy_advertising.wxml
@@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
85 | 85 | ||
86 | <block wx:for="{{object.data}}" wx:key="{{index}}"> | 86 | <block wx:for="{{object.data}}" wx:key="{{index}}"> |
87 | 87 | ||
88 | - <view class='s4_gk' wx:if="{{index==0}}" style="width:{{(max_sw_height-2*object.two_side-2*object.jian_ge)/3}}px"> | 88 | + <view class='s4_gk' wx:if="{{index==0}}" style="width:{{(750-2*object.two_side-2*object.jian_ge)/3}}px"> |
89 | <block wx:if="{{item.src==''}}"> | 89 | <block wx:if="{{item.src==''}}"> |
90 | <text>200*200</text> | 90 | <text>200*200</text> |
91 | </block> | 91 | </block> |
@@ -95,7 +95,7 @@ | @@ -95,7 +95,7 @@ | ||
95 | </block> | 95 | </block> |
96 | </view> | 96 | </view> |
97 | 97 | ||
98 | - <view class='s4_gk' wx:else style="margin-left:{{object.jian_ge}}px; width:{{(max_sw_height-2*object.two_side-2*object.jian_ge)/3}}px"> | 98 | + <view class='s4_gk' wx:else style="margin-left:{{object.jian_ge}}px; width:{{(750-2*object.two_side-2*object.jian_ge)/3}}px"> |
99 | <block wx:if="{{item.src==''}}"> | 99 | <block wx:if="{{item.src==''}}"> |
100 | <text>200*200</text> | 100 | <text>200*200</text> |
101 | </block> | 101 | </block> |
components/diy_assist/diy_assist.wxml
1 | -<view class='assist' style='height:{{object.height}}rpx;background-color:{{object.bgcolor}}'></view> | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +<view class='assist' style='height:{{object.height*2}}rpx;background-color:{{object.bgcolor}}'></view> | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
components/diy_assist/diy_assist.wxss
components/goods_list/goods_list.js
@@ -101,6 +101,8 @@ Component({ | @@ -101,6 +101,8 @@ Component({ | ||
101 | store_id: o.stoid, | 101 | store_id: o.stoid, |
102 | page: curPage, | 102 | page: curPage, |
103 | pageSize: 6, | 103 | pageSize: 6, |
104 | + orderField:"sort", | ||
105 | + orderType:'asc', | ||
104 | }, | 106 | }, |
105 | success: function(res) { | 107 | success: function(res) { |
106 | var data = res.data; | 108 | var data = res.data; |
pages/cart/cart2/cart2.js
@@ -1076,10 +1076,42 @@ Page({ | @@ -1076,10 +1076,42 @@ Page({ | ||
1076 | [atxt7]: all_order_prom, | 1076 | [atxt7]: all_order_prom, |
1077 | }) | 1077 | }) |
1078 | th.data.order_prom_list_cart=c_arr; | 1078 | th.data.order_prom_list_cart=c_arr; |
1079 | + th.set_can_num(); | ||
1079 | 1080 | ||
1080 | }); | 1081 | }); |
1081 | }); | 1082 | }); |
1082 | }, | 1083 | }, |
1084 | + | ||
1085 | + set_can_num:function(){ | ||
1086 | + var th=this; | ||
1087 | + //-- 这个地方,循环计算几张优惠券可用-- | ||
1088 | + for ( var iter in th.data.cartlist){ | ||
1089 | + var num=0; | ||
1090 | + var c_item=th.data.cartlist[iter]; | ||
1091 | + var pkid=c_item.pickup_id; | ||
1092 | + //-- 普通券 -- | ||
1093 | + if(c_item.quan_list){ | ||
1094 | + for (var iter1 in c_item.quan_list){ | ||
1095 | + //判断是不是其他订单有选用 | ||
1096 | + var is_other_is_use=th.check_other_use(c_item.quan_list[iter1],pkid); | ||
1097 | + if(!is_other_is_use) num++; | ||
1098 | + } | ||
1099 | + } | ||
1100 | + //-- 包邮券 -- | ||
1101 | + var by_quan=th.data.get_by_quan_list_cart[pkid]; | ||
1102 | + if(by_quan){ | ||
1103 | + for (var iter2 in by_quan){ | ||
1104 | + //判断是不是其他订单有选用 | ||
1105 | + var is_other_is_use=th.check_other_use_by(by_quan[iter2],pkid); | ||
1106 | + if(!is_other_is_use) num++; | ||
1107 | + } | ||
1108 | + } | ||
1109 | + var set_txt="cartlist["+iter+"].can_num"; | ||
1110 | + th.setData({ [set_txt]: num}); | ||
1111 | + } | ||
1112 | + }, | ||
1113 | + | ||
1114 | + | ||
1083 | //---------计算立即购买---------- | 1115 | //---------计算立即购买---------- |
1084 | calculatePrice2: function () { | 1116 | calculatePrice2: function () { |
1085 | var th = this, good = this.data.bn_goods; | 1117 | var th = this, good = this.data.bn_goods; |
@@ -2103,16 +2135,22 @@ Page({ | @@ -2103,16 +2135,22 @@ Page({ | ||
2103 | 2135 | ||
2104 | 2136 | ||
2105 | //对于在其他门店已经选择了的券 要判断是否显示到界面 | 2137 | //对于在其他门店已经选择了的券 要判断是否显示到界面 |
2138 | + var t_user=th.data.using_quan[pickid]; | ||
2139 | + | ||
2106 | for(var i in quanlist){ | 2140 | for(var i in quanlist){ |
2107 | quanlist[i].is_using= th.check_in_sele(quanlist[i].CashRepNo,pickid); | 2141 | quanlist[i].is_using= th.check_in_sele(quanlist[i].CashRepNo,pickid); |
2142 | + if(!t_user || quanlist[i].CashRepNo!=t_user.coupon_no) quanlist[i].show_red=0; | ||
2108 | } | 2143 | } |
2109 | 2144 | ||
2110 | if(get_by_quan_list_cart){ | 2145 | if(get_by_quan_list_cart){ |
2111 | for(var i in get_by_quan_list_cart){ | 2146 | for(var i in get_by_quan_list_cart){ |
2112 | get_by_quan_list_cart[i].is_using= th.check_in_sele(get_by_quan_list_cart[i].no,pickid); | 2147 | get_by_quan_list_cart[i].is_using= th.check_in_sele(get_by_quan_list_cart[i].no,pickid); |
2148 | + if(!t_user || get_by_quan_list_cart[i].no!=t_user.coupon_no) get_by_quan_list_cart[i].show_red=0; | ||
2113 | } | 2149 | } |
2114 | th.setData({by_quan_list_cart:get_by_quan_list_cart}); | 2150 | th.setData({by_quan_list_cart:get_by_quan_list_cart}); |
2115 | - } | 2151 | + }else { |
2152 | + th.setData({by_quan_list_cart:null}); | ||
2153 | + } | ||
2116 | 2154 | ||
2117 | console.log("2222222券的列表", quanlist); | 2155 | console.log("2222222券的列表", quanlist); |
2118 | th.setData({ sele_cart_ind:cindx,sele_exp_type:exp_type,open_quan:1,selected_quan_pick:pickid,selected_quan_list:quanlist,disabled:1}); | 2156 | th.setData({ sele_cart_ind:cindx,sele_exp_type:exp_type,open_quan:1,selected_quan_pick:pickid,selected_quan_list:quanlist,disabled:1}); |
@@ -2129,7 +2167,7 @@ Page({ | @@ -2129,7 +2167,7 @@ Page({ | ||
2129 | if(th.data.using_quan.length<=0) return false; | 2167 | if(th.data.using_quan.length<=0) return false; |
2130 | for(var i in th.data.using_quan){ | 2168 | for(var i in th.data.using_quan){ |
2131 | //--如果键值等于本身就要跳出-- | 2169 | //--如果键值等于本身就要跳出-- |
2132 | - if(i==pick_id) continue; | 2170 | + if(parseInt(i)==parseInt(pick_id)) continue; |
2133 | var item=th.data.using_quan[i]; | 2171 | var item=th.data.using_quan[i]; |
2134 | if(item.coupon_no==no){ | 2172 | if(item.coupon_no==no){ |
2135 | return true; | 2173 | return true; |
@@ -2624,9 +2662,9 @@ Page({ | @@ -2624,9 +2662,9 @@ Page({ | ||
2624 | th.setData({selected_quan_list:quanlist,cartlist:arr}) | 2662 | th.setData({selected_quan_list:quanlist,cartlist:arr}) |
2625 | }else{ | 2663 | }else{ |
2626 | th.setData({cartlist:arr }) | 2664 | th.setData({cartlist:arr }) |
2665 | + th.set_can_num(); | ||
2627 | } | 2666 | } |
2628 | 2667 | ||
2629 | - | ||
2630 | }) | 2668 | }) |
2631 | }, | 2669 | }, |
2632 | 2670 | ||
@@ -2869,7 +2907,38 @@ Page({ | @@ -2869,7 +2907,38 @@ Page({ | ||
2869 | for(var i in arr){ | 2907 | for(var i in arr){ |
2870 | if(arr[i].goods_id==goods_id) return arr[i]; | 2908 | if(arr[i].goods_id==goods_id) return arr[i]; |
2871 | } | 2909 | } |
2910 | + }, | ||
2911 | + | ||
2912 | + //检查是不是有其他门店的订单在选择了券 | ||
2913 | + check_other_use:function (iter,pkid) { | ||
2914 | + var using=this.data.using_quan; | ||
2915 | + var is_use=0; | ||
2916 | + if(using){ | ||
2917 | + for(var i in using){ | ||
2918 | + if(i==pkid) continue; | ||
2919 | + if(iter.CashRepNo==using[i].coupon_no){ | ||
2920 | + is_use=1; break; | ||
2921 | + } | ||
2922 | + } | ||
2923 | + } | ||
2924 | + return is_use; | ||
2925 | + | ||
2926 | + }, | ||
2927 | + //检查是不是有其他门店的订单在选择了包邮券 | ||
2928 | + check_other_use_by:function (iter,pkid) { | ||
2929 | + var using=this.data.using_quan; | ||
2930 | + var is_use=0; | ||
2931 | + if(using){ | ||
2932 | + for(var i in using){ | ||
2933 | + if(i==pkid) continue; | ||
2934 | + if(iter.no==using[i].coupon_no){ | ||
2935 | + is_use=1; break; | ||
2936 | + } | ||
2937 | + } | ||
2938 | + } | ||
2939 | + return is_use; | ||
2872 | } | 2940 | } |
2873 | 2941 | ||
2874 | 2942 | ||
2943 | + | ||
2875 | }); | 2944 | }); |
pages/cart/cart2/cart2.wxml
@@ -70,12 +70,12 @@ | @@ -70,12 +70,12 @@ | ||
70 | </navigator> | 70 | </navigator> |
71 | 71 | ||
72 | </view> | 72 | </view> |
73 | - <view style="display: none;">!!!!---{{item.quan_list.length}}---!!!</view> | 73 | + |
74 | <!-----使用优惠券------> | 74 | <!-----使用优惠券------> |
75 | <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" | 75 | <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" |
76 | wx:if="{{(item.quan_list && item.quan_list.length>0) || get_by_quan_list_cart[item.pickup_id]!=null}}" data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}"> | 76 | wx:if="{{(item.quan_list && item.quan_list.length>0) || get_by_quan_list_cart[item.pickup_id]!=null}}" data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}"> |
77 | <view class="work-frame flex-space-between"> | 77 | <view class="work-frame flex-space-between"> |
78 | - <view class="work">优惠券</view> | 78 | + <view class="work">优惠券<text class="quan_num_show fs20">{{item.can_num}}张可用</text></view> |
79 | <view class="xc-right-frame"> | 79 | <view class="xc-right-frame"> |
80 | <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text> | 80 | <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text> |
81 | <text wx:if="{{using_quan[item.pickup_id].money}}">¥{{using_quan[item.pickup_id].money}}元优惠券</text> | 81 | <text wx:if="{{using_quan[item.pickup_id].money}}">¥{{using_quan[item.pickup_id].money}}元优惠券</text> |
@@ -249,7 +249,7 @@ | @@ -249,7 +249,7 @@ | ||
249 | wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> | 249 | wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> |
250 | <view class="work-frame flex-space-between"> | 250 | <view class="work-frame flex-space-between"> |
251 | <view class="work"> | 251 | <view class="work"> |
252 | - 优惠券 | 252 | + 优惠券 <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用</text> |
253 | </view> | 253 | </view> |
254 | <view class="xc-right-frame"> | 254 | <view class="xc-right-frame"> |
255 | <text wx:if="{{using_quan[bn_pick].is_nouse}}">不使用</text> | 255 | <text wx:if="{{using_quan[bn_pick].is_nouse}}">不使用</text> |
pages/cart/cart2/cart2.wxss
@@ -819,4 +819,6 @@ margin-left: 20rpx; | @@ -819,4 +819,6 @@ margin-left: 20rpx; | ||
819 | color: #808080; | 819 | color: #808080; |
820 | } | 820 | } |
821 | .n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } | 821 | .n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } |
822 | -.gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0} | ||
823 | \ No newline at end of file | 822 | \ No newline at end of file |
823 | +.gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0} | ||
824 | + | ||
825 | +.quan_num_show{ padding: 6rpx 10rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx } | ||
824 | \ No newline at end of file | 826 | \ No newline at end of file |
pages/getphone/getphone.js
@@ -74,7 +74,7 @@ Page({ | @@ -74,7 +74,7 @@ Page({ | ||
74 | var app=getApp(),a=app,th=this; | 74 | var app=getApp(),a=app,th=this; |
75 | var dd = { | 75 | var dd = { |
76 | oauth: "miniapp", | 76 | oauth: "miniapp", |
77 | - nickname: r.nickName, | 77 | + nickname:a.clear_word(r.nickName), |
78 | head_pic: r.avatarUrl, | 78 | head_pic: r.avatarUrl, |
79 | sex: r.gender, | 79 | sex: r.gender, |
80 | terminal: "miniapp", | 80 | terminal: "miniapp", |
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 | + input_val:null, | ||
17 | + }, | ||
18 | + //------初始化加载---------- | ||
19 | + onLoad: function(t) {}, | ||
20 | + | ||
21 | + onShow: function() { | ||
22 | + this.data.ismore=0;this.data.isload=0; | ||
23 | + this.setData({list:null}); | ||
24 | + this.get_list(); | ||
25 | + }, | ||
26 | + | ||
27 | + //--点击分享事件--- | ||
28 | + onShareAppMessage: function(t) { | ||
29 | + return o.share; | ||
30 | + }, | ||
31 | + | ||
32 | + get_list: function() { | ||
33 | + var th = this, e = th; | ||
34 | + var r_data={ | ||
35 | + storeId: os.stoid, | ||
36 | + page: th.data.page, | ||
37 | + pageSize: th.data.pageSize | ||
38 | + }; | ||
39 | + | ||
40 | + //关键字搜索 | ||
41 | + if(this.data.input_val){ | ||
42 | + r_data.KeyWord= encodeURIComponent(this.data.input_val); | ||
43 | + } | ||
44 | + | ||
45 | + getApp().request.promiseGet("/api/weshop/users/staff/page", { | ||
46 | + data:r_data | ||
47 | + }).then(res => { | ||
48 | + th.setData({isload:1}); | ||
49 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { | ||
50 | + th.data.page++;//当前页数+1 | ||
51 | + var arr1 = th.data.list;//获取明细数组 | ||
52 | + var arr2 = res.data.data.pageData;//获取当前查询数据 | ||
53 | + if(!arr1) arr1=[]; | ||
54 | + | ||
55 | + var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 | ||
56 | + var ismore = 0; | ||
57 | + if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 | ||
58 | + | ||
59 | + th.setData({ | ||
60 | + list: arr3, | ||
61 | + total: res.data.data.total, | ||
62 | + ismore: ismore, | ||
63 | + }) | ||
64 | + } | ||
65 | + }) | ||
66 | + | ||
67 | + }, | ||
68 | + | ||
69 | + /** | ||
70 | + * 页面上拉触底事件的处理函数 | ||
71 | + */ | ||
72 | + onReachBottom: function() { | ||
73 | + if (this.data.total <= this.data.pageSize) return; | ||
74 | + if (this.data.ismore) { | ||
75 | + t.my_warnning("加载完啦!", 0, this);return | ||
76 | + }; | ||
77 | + this.get_list(); | ||
78 | + }, | ||
79 | + | ||
80 | + //返回 | ||
81 | + back:function () { | ||
82 | + wx.navigateBack({ delta: 1}) | ||
83 | + }, | ||
84 | + | ||
85 | + pop_sele:function (e) { | ||
86 | + var index=e.currentTarget.dataset.index; | ||
87 | + var item=this.data.list[index]; | ||
88 | + this.setData({show_pop:1,sele_item:item}); | ||
89 | + }, | ||
90 | + close_pop:function () { | ||
91 | + this.setData({show_pop:0}); | ||
92 | + }, | ||
93 | + //选择了导购,就跳转到会员中心页面 | ||
94 | + go_user_info:function () { | ||
95 | + var item=this.data.sele_item; | ||
96 | + getApp().globalData.choice_guide=item; | ||
97 | + getApp().goto("/pages/user/userinfo/userinfo"); | ||
98 | + }, | ||
99 | + | ||
100 | + img_err:function (e) { | ||
101 | + var txt=e.currentTarget.dataset.err_img; | ||
102 | + this.setData({[txt]:this.data.iurl+'/miniapp/images/no-head.jpg'}); | ||
103 | + }, | ||
104 | + | ||
105 | + get_input_val:function(e){ | ||
106 | + var value=e.detail.value; | ||
107 | + this.data.input_val=value; | ||
108 | + }, | ||
109 | + sear:function(){ | ||
110 | + this.data.ismore=0;this.data.page=1; | ||
111 | + this.setData({isload:0}); | ||
112 | + this.setData({list:null}); | ||
113 | + this.get_list(); | ||
114 | + } | ||
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | ||
119 | + | ||
120 | +}); | ||
0 | \ No newline at end of file | 121 | \ 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 bindinput="get_input_val" class="fs32" placeholder="请输入关键字" /> | ||
7 | + </view> | ||
8 | + <view class="sear_btn" bindtap="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?item.PhotoUrl:iurl+'/miniapp/images/no-head.jpg'}}" binderror="img_err" data-err_img="list[{{index}}].PhotoUrl" ></image></view> | ||
20 | + <view style="margin-left: 30rpx; margin-top: 20rpx"> | ||
21 | + <view class="fs35">{{item.StaffName}}</view> | ||
22 | + <view class="fs28 ellipsis-3">{{item.Remark1?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="{{(!list || list.length<=0) && isload}}"> | ||
35 | + <view class="flex-level" style="margin-top: 150rpx"> | ||
36 | + <image src="{{iurl}}miniapp/images/order/empty_order.png" style="width: 260rpx; height: 260rpx"></image> | ||
37 | + </view> | ||
38 | + <view class="flex-level fs30 xc-ash" style="margin-top: 10rpx">暂无顾问明细</view> | ||
39 | + <view class="flex-level" style="margin-top: 10rpx"> | ||
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 | \ No newline at end of file | 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 | \ No newline at end of file | 18 | \ No newline at end of file |
pages/user/order_detail/order_detail.js
@@ -68,17 +68,13 @@ Page({ | @@ -68,17 +68,13 @@ Page({ | ||
68 | rq.get("/api/weshop/ordergoods/list",{ | 68 | rq.get("/api/weshop/ordergoods/list",{ |
69 | data: { store_id: os.stoid, order_id: oid}, | 69 | data: { store_id: os.stoid, order_id: oid}, |
70 | success:async function (eb) { | 70 | success:async function (eb) { |
71 | - r.order_goods=eb.data.data.pageData; | ||
72 | - | ||
73 | - var glist = r.order_goods; | ||
74 | - for(var i in glist){ | 71 | + r.order_goods=eb.data.data.pageData; |
72 | + var glist = r.order_goods; | ||
73 | + for(var i in glist){ | ||
75 | if(glist[i].is_gift){ | 74 | if(glist[i].is_gift){ |
76 | r.is_prom=1; | 75 | r.is_prom=1; |
77 | } | 76 | } |
78 | - } | ||
79 | - | ||
80 | - | ||
81 | - | 77 | + } |
82 | 78 | ||
83 | //------------对比一下有没有退款记录------------ | 79 | //------------对比一下有没有退款记录------------ |
84 | await getApp().request.promiseGet("/api/weshop/order/returngoods/page",{ | 80 | await getApp().request.promiseGet("/api/weshop/order/returngoods/page",{ |
@@ -107,6 +103,8 @@ Page({ | @@ -107,6 +103,8 @@ Page({ | ||
107 | //--------整单退-------- | 103 | //--------整单退-------- |
108 | if (ttd.data.data.pageData[0]['goods_id_list'] != null | 104 | if (ttd.data.data.pageData[0]['goods_id_list'] != null |
109 | && ttd.data.data.pageData[0]['goods_id_list'] != ''){ | 105 | && ttd.data.data.pageData[0]['goods_id_list'] != ''){ |
106 | + | ||
107 | + | ||
110 | var eea = ttd.data.data.pageData[0]; | 108 | var eea = ttd.data.data.pageData[0]; |
111 | //1.退款正在进行中, | 109 | //1.退款正在进行中, |
112 | //2.退款被拒绝就要显示可以退款 | 110 | //2.退款被拒绝就要显示可以退款 |
@@ -118,8 +116,10 @@ Page({ | @@ -118,8 +116,10 @@ Page({ | ||
118 | switch (eea.status) { | 116 | switch (eea.status) { |
119 | case 0: | 117 | case 0: |
120 | case 1: | 118 | case 1: |
119 | + r.order_status_detail="退款中"; | ||
121 | r['return_btn'] = 2; break; | 120 | r['return_btn'] = 2; break; |
122 | case 2: | 121 | case 2: |
122 | + r.order_status_detail="退款完成"; | ||
123 | r['return_btn'] = 4; break; | 123 | r['return_btn'] = 4; break; |
124 | case 3: | 124 | case 3: |
125 | r['return_btn'] = 3; break; | 125 | r['return_btn'] = 3; break; |
pages/user/order_detail/order_detail.wxml
@@ -18,7 +18,8 @@ | @@ -18,7 +18,8 @@ | ||
18 | <view class="order-state"><view class="shop_name">门店:{{order.pickname}}</view> | 18 | <view class="order-state"><view class="shop_name">门店:{{order.pickname}}</view> |
19 | <view>{{order.order_status_detail}}</view> | 19 | <view>{{order.order_status_detail}}</view> |
20 | </view> | 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 | <view class="goods-img"> | 23 | <view class="goods-img"> |
23 | <image class="wh100" src="{{resourceUrl+item.original_img}}" binderror="bind_bnerr" lazy-load="true" | 24 | <image class="wh100" src="{{resourceUrl+item.original_img}}" binderror="bind_bnerr" lazy-load="true" |
24 | data-errorimg="order.order_goods[{{index}}].original_img"></image> | 25 | data-errorimg="order.order_goods[{{index}}].original_img"></image> |
@@ -35,7 +36,7 @@ | @@ -35,7 +36,7 @@ | ||
35 | <view class="goods-num">×{{item.goods_num}}</view> | 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 | <view bindtap="checkReturnGoodsStatus" class="goods-num" data-oid="{{item.order_id}}" | 40 | <view bindtap="checkReturnGoodsStatus" class="goods-num" data-oid="{{item.order_id}}" |
40 | data-recid="{{item.goods_id}}" wx:if="{{item.return_btn==1 && !order.is_bedistri}}">申请退款</view> | 41 | data-recid="{{item.goods_id}}" wx:if="{{item.return_btn==1 && !order.is_bedistri}}">申请退款</view> |
41 | <view bindtap="gotoreturn" class="return-btn" data-oid="{{item.order_id}}" | 42 | <view bindtap="gotoreturn" class="return-btn" data-oid="{{item.order_id}}" |
pages/user/order_list/order_list.wxml
@@ -44,8 +44,9 @@ | @@ -44,8 +44,9 @@ | ||
44 | <!-- 商品详情集合 --> | 44 | <!-- 商品详情集合 --> |
45 | <view class="detail_commoditys"> | 45 | <view class="detail_commoditys"> |
46 | <!-- 单个商品 --> | 46 | <!-- 单个商品 --> |
47 | + <!-- wx:if="{{goods.return_btn!=4}}" --> | ||
47 | <view> | 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 | <navigator class="rel"> | 51 | <navigator class="rel"> |
51 | <image src="{{resourceUrl+goods.original_img}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="orderList[{{index}}].order_goods[{{pinx}}].original_img"></image> | 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,7 +68,7 @@ | ||
67 | </view> | 68 | </view> |
68 | <view class="flex-level-right fs26 refund"> | 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 | <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 | <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 | <view catchtap="gotoreturn" class="return-btn" data-oid="{{goods.order_id}}" data-recid="{{goods.goods_id}}" wx:if="{{goods.return_btn==2}}">退款中</view> | 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 | <view catchtap="checkReturnGoodsStatus" class="return-btn" data-oid="{{goods.order_id}}" data-recid="{{goods.goods_id}}" wx:if="{{goods.return_btn==3}}">重新退款</view> | 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,6 +67,8 @@ Page({ | ||
67 | is_zy: 0, //是否执行onshow | 67 | is_zy: 0, //是否执行onshow |
68 | is_lable_set: "", //是否启用我的兴趣标签 | 68 | is_lable_set: "", //是否启用我的兴趣标签 |
69 | check_label: [], //我选择的兴趣标签 | 69 | check_label: [], //我选择的兴趣标签 |
70 | + fir_guide_id:null, //存储会员详情接口出来的美导ID | ||
71 | + | ||
70 | }, | 72 | }, |
71 | //通过路径跳转到其他页面 | 73 | //通过路径跳转到其他页面 |
72 | goto: function(e) { | 74 | goto: function(e) { |
@@ -80,7 +82,9 @@ Page({ | @@ -80,7 +82,9 @@ Page({ | ||
80 | var sms_conf = ee.switch_list; | 82 | var sms_conf = ee.switch_list; |
81 | sms_conf = JSON.parse(sms_conf); | 83 | sms_conf = JSON.parse(sms_conf); |
82 | th.setData({ | 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 | if (sms_conf.user_label_set) { | 89 | if (sms_conf.user_label_set) { |
86 | th.query_checklabels(); | 90 | th.query_checklabels(); |
@@ -152,8 +156,6 @@ Page({ | @@ -152,8 +156,6 @@ Page({ | ||
152 | th.setData({ | 156 | th.setData({ |
153 | isGender: sex | 157 | isGender: sex |
154 | }) | 158 | }) |
155 | - | ||
156 | - | ||
157 | }, | 159 | }, |
158 | //密码是否隐藏显示 | 160 | //密码是否隐藏显示 |
159 | ispwhid: function() { | 161 | ispwhid: function() { |
@@ -627,6 +629,14 @@ Page({ | @@ -627,6 +629,14 @@ Page({ | ||
627 | var e = this; | 629 | var e = this; |
628 | if (this.data.is_zy) return false; | 630 | if (this.data.is_zy) return false; |
629 | this.wait_for_store_config(); | 631 | this.wait_for_store_config(); |
632 | + | ||
633 | + //如果有传值进行跳转的话 | ||
634 | + var choice_guide=null; | ||
635 | + if(getApp().globalData.choice_guide){ | ||
636 | + choice_guide=JSON.parse(JSON.stringify(getApp().globalData.choice_guide)); | ||
637 | + getApp().globalData.choice_guide=null; | ||
638 | + } | ||
639 | + | ||
630 | var req = t; | 640 | var req = t; |
631 | req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { | 641 | req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { |
632 | success: function(src) { | 642 | success: function(src) { |
@@ -644,6 +654,13 @@ Page({ | @@ -644,6 +654,13 @@ Page({ | ||
644 | a.address=""; | 654 | a.address=""; |
645 | } | 655 | } |
646 | 656 | ||
657 | + e.data.fir_guide_id=a.staffId; | ||
658 | + if(choice_guide){ | ||
659 | + a.staffName=choice_guide.StaffName; | ||
660 | + a.staffId=choice_guide.Id; | ||
661 | + } | ||
662 | + | ||
663 | + | ||
647 | e.setData({ | 664 | e.setData({ |
648 | phone: a.mobile, | 665 | phone: a.mobile, |
649 | user: a, | 666 | user: a, |
@@ -656,6 +673,7 @@ Page({ | @@ -656,6 +673,7 @@ Page({ | ||
656 | isstcsp: a.vipnopwd, | 673 | isstcsp: a.vipnopwd, |
657 | iscalendar:a.islunar | 674 | iscalendar:a.islunar |
658 | }); | 675 | }); |
676 | + | ||
659 | } | 677 | } |
660 | }) | 678 | }) |
661 | a.getUserInfo(function(a) { | 679 | a.getUserInfo(function(a) { |
@@ -832,6 +850,11 @@ Page({ | @@ -832,6 +850,11 @@ Page({ | ||
832 | islunar:th.data.iscalendar, | 850 | islunar:th.data.iscalendar, |
833 | birthday:th.data.datet | 851 | birthday:th.data.datet |
834 | } | 852 | } |
853 | + //往上提交美导的ID | ||
854 | + if(th.data.fir_guide_id!=th.data.user.staffId){ | ||
855 | + datas.staffId=th.data.user.staffId; | ||
856 | + } | ||
857 | + | ||
835 | getApp().request.put("/api/weshop/users/updateUserInfo", { | 858 | getApp().request.put("/api/weshop/users/updateUserInfo", { |
836 | data: datas, | 859 | data: datas, |
837 | success: function(res) { | 860 | success: function(res) { |
@@ -862,5 +885,10 @@ Page({ | @@ -862,5 +885,10 @@ Page({ | ||
862 | return o.share; | 885 | return o.share; |
863 | }, | 886 | }, |
864 | 887 | ||
888 | + //-- 跳转到获取导购的列表 -- | ||
889 | + go_get_guide:function () { | ||
890 | + getApp().goto("/pages/user/choice_guide/choice_guide"); | ||
891 | + } | ||
892 | + | ||
865 | 893 | ||
866 | }); | 894 | }); |
867 | \ No newline at end of file | 895 | \ No newline at end of file |
pages/user/userinfo/userinfo.wxml
@@ -184,15 +184,26 @@ | @@ -184,15 +184,26 @@ | ||
184 | <!-- </block> --> | 184 | <!-- </block> --> |
185 | </view> | 185 | </view> |
186 | 186 | ||
187 | + <!-- 选择门店 --> | ||
187 | <view bindtap="onclickstore" class="user-name flex-vertical-between" data-type="email"> | 188 | <view bindtap="onclickstore" class="user-name flex-vertical-between" data-type="email"> |
188 | <view class="user-name-txt">所属门店</view> | 189 | <view class="user-name-txt">所属门店</view> |
189 | <view class="flex-center user-txt-right"> | 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 | <view class="angle">∟</view> | 201 | <view class="angle">∟</view> |
194 | </view> | 202 | </view> |
195 | </view> | 203 | </view> |
204 | + | ||
205 | + | ||
206 | + | ||
196 | </view> | 207 | </view> |
197 | <!-- 我的兴趣 --> | 208 | <!-- 我的兴趣 --> |
198 | <view wx:if="{{ isBool==1 && is_lable_set==1}}" class="padding Bbottom"> | 209 | <view wx:if="{{ isBool==1 && is_lable_set==1}}" class="padding Bbottom"> |
@@ -218,6 +229,8 @@ | @@ -218,6 +229,8 @@ | ||
218 | </view> | 229 | </view> |
219 | </view> | 230 | </view> |
220 | </view> | 231 | </view> |
232 | + </view> | ||
233 | + | ||
221 | <navigator bindtap="goto-address" class="user-name mt flex-vertical-between" url="/pages/user/address_list/address_list"> | 234 | <navigator bindtap="goto-address" class="user-name mt flex-vertical-between" url="/pages/user/address_list/address_list"> |
222 | <view class="user-name-txt">收货地址</view> | 235 | <view class="user-name-txt">收货地址</view> |
223 | <view class="flex-center user-txt-right"> | 236 | <view class="flex-center user-txt-right"> |
@@ -225,11 +238,12 @@ | @@ -225,11 +238,12 @@ | ||
225 | <view class="angle">∟</view> | 238 | <view class="angle">∟</view> |
226 | </view> | 239 | </view> |
227 | </navigator> | 240 | </navigator> |
241 | + | ||
228 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="email"> | 242 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="email"> |
229 | <view class="user-name-txt">绑定时间</view> | 243 | <view class="user-name-txt">绑定时间</view> |
230 | <view class="user-txt-right one-line">{{user.reg_time?filters.replace_time2(user.reg_time):""}}</view> | 244 | <view class="user-txt-right one-line">{{user.reg_time?filters.replace_time2(user.reg_time):""}}</view> |
231 | </view> | 245 | </view> |
232 | - </view> | 246 | + |
233 | </view> | 247 | </view> |
234 | <!-- 确认修改按钮 --> | 248 | <!-- 确认修改按钮 --> |
235 | <view class="flex-center confirm"> | 249 | <view class="flex-center confirm"> |
utils/auth.js
@@ -51,7 +51,7 @@ module.exports = { | @@ -51,7 +51,7 @@ module.exports = { | ||
51 | data: { | 51 | data: { |
52 | js_code: e, | 52 | js_code: e, |
53 | store_id: a.globalData.setting.stoid, | 53 | store_id: a.globalData.setting.stoid, |
54 | - nickname:a.globalData.getu.nickName, | 54 | + nickname: a.clear_word(a.globalData.getu.nickName) |
55 | }, | 55 | }, |
56 | success: function (e) { | 56 | success: function (e) { |
57 | console.log("openidandkey"); | 57 | console.log("openidandkey"); |