Commit d128b5be208dad4d12eef4a9155990ccb485d1c9
Merge branch 'dev' into 'test'
Dev See merge request !641
Showing
8 changed files
with
48 additions
and
35 deletions
packageA/pages/my_service/i_service.js
@@ -50,8 +50,11 @@ Page({ | @@ -50,8 +50,11 @@ Page({ | ||
50 | */ | 50 | */ |
51 | onShow: function() { | 51 | onShow: function() { |
52 | var th = this; | 52 | var th = this; |
53 | - var my_confirm = th.selectComponent("#my_confirm"); //组件的id | ||
54 | - my_confirm.open_cancel(0); | 53 | + setTimeout(function (){ |
54 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | ||
55 | + my_confirm.open_cancel(0); | ||
56 | + },1000); | ||
57 | + | ||
55 | }, | 58 | }, |
56 | 59 | ||
57 | onReachBottom: function() { | 60 | onReachBottom: function() { |
packageA/pages/profile/profile.js
@@ -93,16 +93,21 @@ Page({ | @@ -93,16 +93,21 @@ Page({ | ||
93 | }).then(res => { | 93 | }).then(res => { |
94 | if (res.data.code == 0) { | 94 | if (res.data.code == 0) { |
95 | var data = res.data.data; | 95 | var data = res.data.data; |
96 | - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签 | ||
97 | - var dateList = data.VipLabel.split(","); | ||
98 | - for (var i in dateList) { | ||
99 | - if (dateList[i] != "") { | ||
100 | - VipLabel.push(dateList[i]); | ||
101 | - } | 96 | + var VipLabel = th.data.VipLabel; //通过id标签找到已选择的标签 |
97 | + if(VipLabel){ | ||
98 | + var dateList = data.VipLabel.split(","); | ||
99 | + var arr=[]; | ||
100 | + for (var i in dateList) { | ||
101 | + if (dateList[i] != "") { | ||
102 | + arr.push(dateList[i]); | ||
103 | + } | ||
104 | + } | ||
105 | + th.setData({ | ||
106 | + check_label: arr | ||
107 | + }) | ||
102 | } | 108 | } |
103 | - th.setData({ | ||
104 | - check_label: VipLabel | ||
105 | - }) | 109 | + |
110 | + | ||
106 | } else { | 111 | } else { |
107 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | 112 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); |
108 | } | 113 | } |
pages/cart/cart2/cart2.js
@@ -3023,7 +3023,7 @@ Page({ | @@ -3023,7 +3023,7 @@ Page({ | ||
3023 | arr[ind].check_quan_price_list=check_quan_price_list; | 3023 | arr[ind].check_quan_price_list=check_quan_price_list; |
3024 | 3024 | ||
3025 | //是否关闭使用优惠券 | 3025 | //是否关闭使用优惠券 |
3026 | - if (th.data.is_close_quan != 1 && !is_xz_yh) { | 3026 | + if (th.data.is_close_quan != 1 && !is_xz_yh && check_quan_ware_list && check_quan_ware_list!="") { |
3027 | //--调用接口,获取优惠券的列表,3秒钟内控制接口请求-- | 3027 | //--调用接口,获取优惠券的列表,3秒钟内控制接口请求-- |
3028 | var url="/api/weshop/couponList/getUseCouponList"; | 3028 | var url="/api/weshop/couponList/getUseCouponList"; |
3029 | await app.request.promiseGet(url,{ data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:ckeck_quan_price,WareIds:check_quan_ware_list,pageSize:100}}).then(res=>{ | 3029 | await app.request.promiseGet(url,{ data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:ckeck_quan_price,WareIds:check_quan_ware_list,pageSize:100}}).then(res=>{ |
@@ -3059,7 +3059,7 @@ Page({ | @@ -3059,7 +3059,7 @@ Page({ | ||
3059 | th.data.ckeck_quan_price=good.offline_price; //如果有线下取价,就用线下价 | 3059 | th.data.ckeck_quan_price=good.offline_price; //如果有线下取价,就用线下价 |
3060 | } | 3060 | } |
3061 | //--如果商家后台没有限制使用优惠券,同时商品的优惠活动没有限制使用优惠券-- | 3061 | //--如果商家后台没有限制使用优惠券,同时商品的优惠活动没有限制使用优惠券-- |
3062 | - if(th.data.is_close_quan != 1 && th.data.bn_goods.is_xz_yh!=1) | 3062 | + if(th.data.is_close_quan != 1 && th.data.bn_goods.is_xz_yh!=1 && th.data.check_quan_ware_list && th.data.check_quan_ware_list!='') |
3063 | { | 3063 | { |
3064 | var url0 = "/api/weshop/users/frozenQuan/listFrozenQuan/" + app.globalData.user_id; | 3064 | var url0 = "/api/weshop/users/frozenQuan/listFrozenQuan/" + app.globalData.user_id; |
3065 | var url="/api/weshop/couponList/getUseCouponList"; | 3065 | var url="/api/weshop/couponList/getUseCouponList"; |
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -30,8 +30,13 @@ Page({ | @@ -30,8 +30,13 @@ Page({ | ||
30 | onLoad: function(options) { | 30 | onLoad: function(options) { |
31 | 31 | ||
32 | var th = this; | 32 | var th = this; |
33 | - var my_confirm = th.selectComponent("#my_confirm"); //组件的id | ||
34 | - my_confirm.open_cancel(0); | 33 | + setTimeout(function (){ |
34 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | ||
35 | + my_confirm.open_cancel(0); | ||
36 | + },1000) | ||
37 | + | ||
38 | + | ||
39 | + | ||
35 | th.setData({ | 40 | th.setData({ |
36 | getStorageID: a.stoid, | 41 | getStorageID: a.stoid, |
37 | getUserID: d.user_id | 42 | getUserID: d.user_id |
pages/user/labels/labels.js
@@ -117,7 +117,7 @@ Page({ | @@ -117,7 +117,7 @@ Page({ | ||
117 | }) | 117 | }) |
118 | th.query_checklabels(); | 118 | th.query_checklabels(); |
119 | } else { | 119 | } else { |
120 | - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | 120 | + getApp().my_warnning("系统未设置兴趣标签集合", 0, th); |
121 | th.setData({ | 121 | th.setData({ |
122 | isread: 1 | 122 | isread: 1 |
123 | }) | 123 | }) |
@@ -136,7 +136,7 @@ Page({ | @@ -136,7 +136,7 @@ Page({ | ||
136 | storeId: a.stoid | 136 | storeId: a.stoid |
137 | } | 137 | } |
138 | }).then(res => { | 138 | }).then(res => { |
139 | - if (res.data.code == 0) { | 139 | + if (res.data.code == 0 && res.data.data && res.data.data.VipLabelId) { |
140 | var data = res.data.data; | 140 | var data = res.data.data; |
141 | var arr = []; | 141 | var arr = []; |
142 | var VipLabelId = []; //通过id标签找到已选择的标签 | 142 | var VipLabelId = []; //通过id标签找到已选择的标签 |
@@ -165,7 +165,7 @@ Page({ | @@ -165,7 +165,7 @@ Page({ | ||
165 | interest_lables: interest_lables | 165 | interest_lables: interest_lables |
166 | }) | 166 | }) |
167 | } else { | 167 | } else { |
168 | - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | 168 | + //getApp().my_warnning("系统繁忙,请稍后再试", 0, th); |
169 | return false; | 169 | return false; |
170 | } | 170 | } |
171 | }) | 171 | }) |
pages/user/my_service/i_service.js
@@ -45,8 +45,11 @@ Page({ | @@ -45,8 +45,11 @@ Page({ | ||
45 | */ | 45 | */ |
46 | onShow: function() { | 46 | onShow: function() { |
47 | var th = this; | 47 | var th = this; |
48 | - var my_confirm = th.selectComponent("#my_confirm"); //组件的id | ||
49 | - my_confirm.open_cancel(0); | 48 | + setTimeout(function (){ |
49 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | ||
50 | + my_confirm.open_cancel(0); | ||
51 | + },1000) | ||
52 | + | ||
50 | }, | 53 | }, |
51 | onReachBottom: function() { | 54 | onReachBottom: function() { |
52 | var th = this; | 55 | var th = this; |
pages/user/userinfo/userinfo.js
@@ -115,20 +115,19 @@ Page({ | @@ -115,20 +115,19 @@ Page({ | ||
115 | storeId: r.stoid | 115 | storeId: r.stoid |
116 | } | 116 | } |
117 | }).then(res => { | 117 | }).then(res => { |
118 | - if (res.data.code == 0) { | 118 | + if (res.data.code == 0 && res.data.data && res.data.data.VipLabel) { |
119 | var data = res.data.data; | 119 | var data = res.data.data; |
120 | - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签 | 120 | + var VipLabel = th.data.VipLabel; //通过id标签找到已选择的标签 |
121 | var dateList = data.VipLabel.split(","); | 121 | var dateList = data.VipLabel.split(","); |
122 | + var arr=[]; | ||
122 | for (var i in dateList) { | 123 | for (var i in dateList) { |
123 | if (dateList[i] != "") { | 124 | if (dateList[i] != "") { |
124 | - VipLabel.push(dateList[i]); | 125 | + arr.push(dateList[i]); |
125 | } | 126 | } |
126 | } | 127 | } |
127 | th.setData({ | 128 | th.setData({ |
128 | - check_label: VipLabel | 129 | + check_label: arr |
129 | }) | 130 | }) |
130 | - } else { | ||
131 | - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | ||
132 | } | 131 | } |
133 | }) | 132 | }) |
134 | }, | 133 | }, |
@@ -678,8 +677,8 @@ Page({ | @@ -678,8 +677,8 @@ Page({ | ||
678 | 677 | ||
679 | if(!a) a={}; | 678 | if(!a) a={}; |
680 | var time ="",birthday =""; | 679 | var time ="",birthday =""; |
681 | - if(a && a.reg_time) time=util.formatTime(a.reg_time, "'Y/M/D"); | ||
682 | - if(a && a.birthday) birthday=util.formatTime(a.birthday, "'Y/M/D"); | 680 | + if(a && a.reg_time) time=util.formar_no_full(a.reg_time); |
681 | + if(a && a.birthday) birthday=util.formar_no_full(a.birthday); | ||
683 | 682 | ||
684 | a.reg_time = time; | 683 | a.reg_time = time; |
685 | a.birthday = birthday | 684 | a.birthday = birthday |
@@ -708,9 +707,9 @@ Page({ | @@ -708,9 +707,9 @@ Page({ | ||
708 | user2:a, | 707 | user2:a, |
709 | datet:a.birthday | 708 | datet:a.birthday |
710 | }); | 709 | }); |
711 | - | ||
712 | } | 710 | } |
713 | }) | 711 | }) |
712 | + | ||
714 | a.getUserInfo(function(a) { | 713 | a.getUserInfo(function(a) { |
715 | var txt = util.formatTime(a.birthday, 'yyyy-M-d'), | 714 | var txt = util.formatTime(a.birthday, 'yyyy-M-d'), |
716 | arr = txt.split(' '); | 715 | arr = txt.split(' '); |
@@ -718,7 +717,7 @@ Page({ | @@ -718,7 +717,7 @@ Page({ | ||
718 | var txt2 = util.formatTime(a.reg_time, 'yyyy-M-d'), | 717 | var txt2 = util.formatTime(a.reg_time, 'yyyy-M-d'), |
719 | arr2 = txt.split(' '); | 718 | arr2 = txt.split(' '); |
720 | a.reg_time = arr2[0]; | 719 | a.reg_time = arr2[0]; |
721 | - if (a.pickup_id != null) { | 720 | + if (a.pickup_id && a.pickup_id>0) { |
722 | req.get("/api/weshop/pickup/get/" + r.stoid + "/" + a.pickup_id, { | 721 | req.get("/api/weshop/pickup/get/" + r.stoid + "/" + a.pickup_id, { |
723 | success: function(da) { | 722 | success: function(da) { |
724 | if(da.data.data){ | 723 | if(da.data.data){ |
@@ -891,10 +890,8 @@ Page({ | @@ -891,10 +890,8 @@ Page({ | ||
891 | } | 890 | } |
892 | 891 | ||
893 | if(this.data.confirmed) return false; | 892 | if(this.data.confirmed) return false; |
894 | - this.data.confirmed=1; | ||
895 | - | 893 | + this.data.confirmed=1; |
896 | 894 | ||
897 | - | ||
898 | var datas = { | 895 | var datas = { |
899 | mobile: phone, //手机号码 | 896 | mobile: phone, //手机号码 |
900 | store_id: r.stoid, | 897 | store_id: r.stoid, |
@@ -907,7 +904,7 @@ Page({ | @@ -907,7 +904,7 @@ Page({ | ||
907 | address: address, //地址 | 904 | address: address, //地址 |
908 | pickup_id: sto_sele_id ,//自提门店 所属门店 | 905 | pickup_id: sto_sele_id ,//自提门店 所属门店 |
909 | islunar:th.data.iscalendar, | 906 | islunar:th.data.iscalendar, |
910 | - birthday:th.data.datet | 907 | + birthday:th.data.datet |
911 | } | 908 | } |
912 | //往上提交美导的ID | 909 | //往上提交美导的ID |
913 | if(th.data.fir_guide_id!=th.data.user.staffId){ | 910 | if(th.data.fir_guide_id!=th.data.user.staffId){ |
pages/user/userinfo/userinfo.wxml
@@ -150,7 +150,7 @@ | @@ -150,7 +150,7 @@ | ||
150 | </picker> | 150 | </picker> |
151 | </block> | 151 | </block> |
152 | <block wx:else> | 152 | <block wx:else> |
153 | - <view>{{datet==""? user.birthday==""?"":filters.replace_time2(user.birthday):datet}}</view> | 153 | + <view>{{datet==""? user.birthday==""?"":filters.format_time(user.birthday):datet}}</view> |
154 | </block> | 154 | </block> |
155 | </view> | 155 | </view> |
156 | 156 |