Commit 2449b11d60dbf4de43e54b6d06ade6fb31cc5c5d
1 parent
fbde7aee
OA单122361
Showing
13 changed files
with
271 additions
and
43 deletions
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
... | ... | @@ -11,7 +11,7 @@ var oo = t.globalData.setting, |
11 | 11 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
12 | 12 | var util_pay = require("../../../../utils/pay.js"); |
13 | 13 | let self = null; |
14 | - | |
14 | + | |
15 | 15 | Page({ |
16 | 16 | data: { |
17 | 17 | prom_type: 9, |
... | ... | @@ -87,6 +87,8 @@ Page({ |
87 | 87 | can_use_ord_prom:{}, |
88 | 88 | //存储订单促销的取价,按照门店进行索引 |
89 | 89 | show_ord_prom:{}, |
90 | + sameCityExp_off:0, //未达到起送价 | |
91 | + sameCityExp_info:'',//未达到起送价提示信息 | |
90 | 92 | }, |
91 | 93 | |
92 | 94 | |
... | ... | @@ -1073,7 +1075,22 @@ Page({ |
1073 | 1075 | if (res.data.code == 0) { |
1074 | 1076 | var wl_txt = "formData.shipping_price"; |
1075 | 1077 | th.setData({ [wl_txt]: res.data.data, }) |
1078 | + th.setData({ | |
1079 | + sameCityExp_off:0, | |
1080 | + sameCityExp_info:'' | |
1081 | + }) | |
1076 | 1082 | } else { |
1083 | + if (res.data.code==-2) { //未达到起送价 | |
1084 | + th.setData({ | |
1085 | + sameCityExp_off:2, | |
1086 | + sameCityExp_info:res.data.msg | |
1087 | + }) | |
1088 | + }else{ | |
1089 | + th.setData({ | |
1090 | + sameCityExp_off:1, | |
1091 | + sameCityExp_info:res.data.msg | |
1092 | + }) | |
1093 | + } | |
1077 | 1094 | is_next = 0; |
1078 | 1095 | wx.showToast({ |
1079 | 1096 | title: res.data.msg, icon: 'none', duration: 2000 |
... | ... | @@ -1821,7 +1838,10 @@ Page({ |
1821 | 1838 | var th = this; |
1822 | 1839 | var ty = t.currentTarget.dataset.t; |
1823 | 1840 | th.setData({ |
1824 | - bn_exp_type: ty,same_ok:1 | |
1841 | + bn_exp_type: ty, | |
1842 | + same_ok:1, | |
1843 | + sameCityExp_off:0, | |
1844 | + sameCityExp_info:'', | |
1825 | 1845 | }); |
1826 | 1846 | //当物流为空的时候。 |
1827 | 1847 | if (ty == 0 && th.data.wu_arr == null) { |
... | ... | @@ -2344,6 +2364,10 @@ Page({ |
2344 | 2364 | } |
2345 | 2365 | func(isok); |
2346 | 2366 | }, |
2367 | + //去凑单 | |
2368 | + qcd(){ | |
2369 | + getApp().goto("/pages/index/index/index"); | |
2370 | + }, | |
2347 | 2371 | |
2348 | 2372 | |
2349 | 2373 | }); | ... | ... |
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | |
10 | 10 | <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄</view> |
11 | 11 | |
12 | - <!-- 同城配送 --> | |
12 | + <!-- 同城配送 --> | |
13 | 13 | <block wx:if="{{show_same_city}}"> |
14 | 14 | <view hidden="{{bn_t_exp_t==3}}" bindtap='setexptype' data-t='2' class="tab {{bn_exp_type== 2 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">同城配送</view> |
15 | 15 | </block> |
... | ... | @@ -221,11 +221,22 @@ |
221 | 221 | </view> |
222 | 222 | |
223 | 223 | <view class="btn-wrap" wx:if="{{is_show_sub}}"> |
224 | - <view class="pay-amount"> | |
225 | - <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
226 | - <!-- <view class="co-red big"></view> --> | |
227 | - </view> | |
228 | - <button disabled="{{sub || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
224 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
225 | + <view class="pay-amount"> | |
226 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | |
227 | + <!-- <view class="co-red big"></view> --> | |
228 | + </view> | |
229 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> | |
230 | + </block> | |
231 | + <block wx:else> | |
232 | + <view class="pay-amount"> | |
233 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
234 | + <!-- <view class="co-red big"></view> --> | |
235 | + </view> | |
236 | + <button disabled="{{sub || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
237 | + </block> | |
238 | + | |
239 | + | |
229 | 240 | </view> |
230 | 241 | </form> |
231 | 242 | ... | ... |
packageC/pages/presell/cart/cart.js
... | ... | @@ -123,7 +123,9 @@ Page({ |
123 | 123 | bconfig: null, |
124 | 124 | showFold:true, |
125 | 125 | |
126 | - is_fwk:0, //-- 是不是服务卡项的购买 -- | |
126 | + is_fwk:0, //-- 是不是服务卡项的购买 -- | |
127 | + sameCityExp_off:0, //未达到起送价 | |
128 | + sameCityExp_info:'',//未达到起送价提示信息 | |
127 | 129 | }, |
128 | 130 | |
129 | 131 | |
... | ... | @@ -2519,7 +2521,22 @@ Page({ |
2519 | 2521 | }).then(res => { |
2520 | 2522 | if (res.data.code == 0) { |
2521 | 2523 | shipping_price = res.data.data; |
2524 | + th.setData({ | |
2525 | + sameCityExp_off:0, | |
2526 | + sameCityExp_info:'' | |
2527 | + }) | |
2522 | 2528 | } else { |
2529 | + if (res.data.code==-2) { //未达到起送价 | |
2530 | + th.setData({ | |
2531 | + sameCityExp_off:2, | |
2532 | + sameCityExp_info:res.data.msg | |
2533 | + }) | |
2534 | + }else{ | |
2535 | + th.setData({ | |
2536 | + sameCityExp_off:1, | |
2537 | + sameCityExp_info:res.data.msg | |
2538 | + }) | |
2539 | + } | |
2523 | 2540 | is_next = 0; |
2524 | 2541 | wx.showToast({ |
2525 | 2542 | title: res.data.msg, icon: 'none', duration: 2000 |
... | ... | @@ -2605,7 +2622,22 @@ Page({ |
2605 | 2622 | }).then(res => { |
2606 | 2623 | if (res.data.code == 0) { |
2607 | 2624 | shipping_price = res.data.data; |
2625 | + th.setData({ | |
2626 | + sameCityExp_off:0, | |
2627 | + sameCityExp_info:'' | |
2628 | + }) | |
2608 | 2629 | } else { |
2630 | + if (res.data.code==-2) { //未达到起送价 | |
2631 | + th.setData({ | |
2632 | + sameCityExp_off:2, | |
2633 | + sameCityExp_info:res.data.msg | |
2634 | + }) | |
2635 | + }else{ | |
2636 | + th.setData({ | |
2637 | + sameCityExp_off:1, | |
2638 | + sameCityExp_info:res.data.msg | |
2639 | + }) | |
2640 | + } | |
2609 | 2641 | is_next = 0; |
2610 | 2642 | wx.showToast({ |
2611 | 2643 | title: res.data.msg, icon: 'none', duration: 2000 |
... | ... | @@ -2920,7 +2952,10 @@ Page({ |
2920 | 2952 | set_wuliu: function (e) { |
2921 | 2953 | var type = e.currentTarget.dataset.type; |
2922 | 2954 | this.setData({ |
2923 | - exp_type: type,same_ok:1 | |
2955 | + exp_type: type, | |
2956 | + same_ok:1, | |
2957 | + sameCityExp_off:0, | |
2958 | + sameCityExp_info:'', | |
2924 | 2959 | }); |
2925 | 2960 | this.calculatePrice2(); |
2926 | 2961 | }, |
... | ... | @@ -3436,7 +3471,12 @@ Page({ |
3436 | 3471 | //-- 查看物流 -- |
3437 | 3472 | go_wuliu:function (e) { |
3438 | 3473 | getApp().go_wuliu(e); |
3439 | - } | |
3474 | + }, | |
3475 | + //去凑单 | |
3476 | + qcd(){ | |
3477 | + getApp().goto("/pages/index/index/index"); | |
3478 | + }, | |
3479 | + | |
3440 | 3480 | |
3441 | 3481 | |
3442 | 3482 | ... | ... |
packageC/pages/presell/cart/cart.wxml
... | ... | @@ -388,14 +388,26 @@ |
388 | 388 | 请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消 |
389 | 389 | </view> |
390 | 390 | |
391 | - <view class="btn-wrap" hidden="{{disabled_btn}}"> | |
391 | + <view class="btn-wrap" > | |
392 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
392 | 393 | <view class="pay-amount"> |
394 | + <view class="payable"> | |
395 | + <text class="co-red fs24">{{sameCityExp_info}}</text> | |
396 | + </view> | |
397 | + </view> | |
398 | + <!-- <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">支付尾款</button> --> | |
399 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> | |
400 | + </block> | |
401 | + <block wx:else> | |
402 | + <view class="pay-amount" hidden="{{disabled_btn}}"> | |
393 | 403 | <view class="payable">应付金额: |
394 | 404 | <text class="co-red"> <text class="fs24">¥</text>{{filters.toFix(order_m,2)}}</text> |
395 | 405 | </view> |
396 | 406 | </view> |
397 | 407 | <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">支付尾款</button> |
398 | 408 | <button wx:else class="tips-btn" bindtap="show_pay" hidden="{{!show_submit || !same_ok}}">支付尾款</button> |
409 | + </block> | |
410 | + | |
399 | 411 | <!-- 预售 --> |
400 | 412 | <!-- <button class="tips-btn" formType="submit" id="submitOrder">立即支付</button> --> |
401 | 413 | </view> | ... | ... |
packageC/pages/presell/cart/cart2.js
... | ... | @@ -142,6 +142,8 @@ Page({ |
142 | 142 | can_use_ord_prom:{}, |
143 | 143 | //存储订单促销的取价,按照门店进行索引 |
144 | 144 | show_ord_prom:{}, |
145 | + sameCityExp_off:0, //未达到起送价 | |
146 | + sameCityExp_info:'',//未达到起送价提示信息 | |
145 | 147 | }, |
146 | 148 | |
147 | 149 | |
... | ... | @@ -1181,7 +1183,22 @@ Page({ |
1181 | 1183 | if (res.data.code == 0) { |
1182 | 1184 | var wl_txt = "formData.shipping_price"; |
1183 | 1185 | th.setData({ [wl_txt]: res.data.data, }) |
1186 | + th.setData({ | |
1187 | + sameCityExp_off:0, | |
1188 | + sameCityExp_info:'' | |
1189 | + }) | |
1184 | 1190 | }else{ |
1191 | + if (res.data.code==-2) { //未达到起送价 | |
1192 | + th.setData({ | |
1193 | + sameCityExp_off:2, | |
1194 | + sameCityExp_info:res.data.msg | |
1195 | + }) | |
1196 | + }else{ | |
1197 | + th.setData({ | |
1198 | + sameCityExp_off:1, | |
1199 | + sameCityExp_info:res.data.msg | |
1200 | + }) | |
1201 | + } | |
1185 | 1202 | is_next=0; |
1186 | 1203 | wx.showToast({ |
1187 | 1204 | title: res.data.msg, icon: 'none', duration: 2000 |
... | ... | @@ -2261,7 +2278,7 @@ Page({ |
2261 | 2278 | setexptype: function (t) { |
2262 | 2279 | var th = this; |
2263 | 2280 | var ty = t.currentTarget.dataset.t, def_exp_code = getApp().globalData.userInfo.def_exp_code; |
2264 | - th.setData({ bn_exp_type: ty,same_ok:1 }); | |
2281 | + th.setData({ bn_exp_type: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'',}); | |
2265 | 2282 | if (ty == 0) { |
2266 | 2283 | th.setData({ is_all_zt: 0 }); |
2267 | 2284 | } |
... | ... | @@ -3400,7 +3417,11 @@ Page({ |
3400 | 3417 | if(!th.data.can_use_ord_prom[pickid]){ |
3401 | 3418 | th.get_buy_now_quan(); |
3402 | 3419 | } |
3403 | - } | |
3420 | + }, | |
3421 | + //去凑单 | |
3422 | + qcd(){ | |
3423 | + getApp().goto("/pages/index/index/index"); | |
3424 | + }, | |
3404 | 3425 | |
3405 | 3426 | |
3406 | 3427 | ... | ... |
packageC/pages/presell/cart/cart2.wxml
... | ... | @@ -272,10 +272,21 @@ |
272 | 272 | </view> |
273 | 273 | |
274 | 274 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> |
275 | - <view class="pay-amount"> | |
276 | - <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> | |
277 | - </view> | |
278 | - <button disabled="{{dis_btn}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
275 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
276 | + <view class="pay-amount"> | |
277 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | |
278 | + </view> | |
279 | + <button class="tips-btn" catchtap="qcd">去凑单</button> | |
280 | + </block> | |
281 | + <block wx:else> | |
282 | + <view class="pay-amount"> | |
283 | + <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> | |
284 | + </view> | |
285 | + <button disabled="{{dis_btn}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
286 | + </block> | |
287 | + | |
288 | + | |
289 | + | |
279 | 290 | </view> |
280 | 291 | </form> |
281 | 292 | ... | ... |
packageE/pages/cart/cart2/cart2.js
... | ... | @@ -186,7 +186,8 @@ Page({ |
186 | 186 | can_use_ord_prom:{}, |
187 | 187 | //存储订单促销的取价,按照门店进行索引 |
188 | 188 | show_ord_prom:{}, |
189 | - | |
189 | + sameCityExp_off:0, //未达到起送价 | |
190 | + sameCityExp_info:'',//未达到起送价提示信息 | |
190 | 191 | }, |
191 | 192 | |
192 | 193 | |
... | ... | @@ -3691,8 +3692,23 @@ Page({ |
3691 | 3692 | await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", { is_json: 1, data: req_data }).then(res => { |
3692 | 3693 | if (res.data.code == 0) { |
3693 | 3694 | cart_item.shipping_price = res.data.data; |
3695 | + th.setData({ | |
3696 | + sameCityExp_off:0, | |
3697 | + sameCityExp_info:'' | |
3698 | + }) | |
3694 | 3699 | } else { |
3695 | - is_next = 0; | |
3700 | + if (res.data.code==-2) { //未达到起送价 | |
3701 | + th.setData({ | |
3702 | + sameCityExp_off:2, | |
3703 | + sameCityExp_info:res.data.msg | |
3704 | + }) | |
3705 | + }else{ | |
3706 | + th.setData({ | |
3707 | + sameCityExp_off:1, | |
3708 | + sameCityExp_info:res.data.msg | |
3709 | + }) | |
3710 | + } | |
3711 | + // is_next = 0; | |
3696 | 3712 | |
3697 | 3713 | if (qfunc) qfunc(); |
3698 | 3714 | else { |
... | ... | @@ -4532,9 +4548,23 @@ Page({ |
4532 | 4548 | if (res.data.code == 0) { |
4533 | 4549 | var wl_txt = "formData.shipping_price"; |
4534 | 4550 | th.setData({ [wl_txt]: res.data.data, }) |
4535 | - | |
4551 | + th.setData({ | |
4552 | + sameCityExp_off:0, | |
4553 | + sameCityExp_info:'' | |
4554 | + }) | |
4536 | 4555 | } else { |
4537 | - is_next = 0; | |
4556 | + if (res.data.code==-2) { //未达到起送价 | |
4557 | + th.setData({ | |
4558 | + sameCityExp_off:2, | |
4559 | + sameCityExp_info:res.data.msg | |
4560 | + }) | |
4561 | + }else{ | |
4562 | + th.setData({ | |
4563 | + sameCityExp_off:1, | |
4564 | + sameCityExp_info:res.data.msg | |
4565 | + }) | |
4566 | + } | |
4567 | + // is_next = 0; | |
4538 | 4568 | if (qfunc) { |
4539 | 4569 | qfunc(); |
4540 | 4570 | } else { |
... | ... | @@ -7722,7 +7752,7 @@ Page({ |
7722 | 7752 | setexptype2: function (e) { |
7723 | 7753 | |
7724 | 7754 | if(this.data.submit) return false; |
7725 | - this.setData({ submit: 1,same_ok:1 }); | |
7755 | + this.setData({ submit: 1,same_ok:1,sameCityExp_off:0, sameCityExp_info:'',}); | |
7726 | 7756 | |
7727 | 7757 | if(this.data.all_collocation_list){ |
7728 | 7758 | var bn_coll= this.selectComponent('#bn_coll'); |
... | ... | @@ -7741,7 +7771,7 @@ Page({ |
7741 | 7771 | setexptype_w2: function (e) { |
7742 | 7772 | |
7743 | 7773 | if(this.data.submit) return false; |
7744 | - this.setData({ submit: 1,same_ok:1 }); | |
7774 | + this.setData({ submit: 1,same_ok:1,sameCityExp_off:0, sameCityExp_info:'',}); | |
7745 | 7775 | |
7746 | 7776 | for (let i = 0; i <this.data.cartlist.length ; i++) { |
7747 | 7777 | |
... | ... | @@ -9164,7 +9194,12 @@ Page({ |
9164 | 9194 | if(!th.data.can_use_ord_prom[pickid]){ |
9165 | 9195 | th.get_buy_now_quan(); |
9166 | 9196 | } |
9167 | - } | |
9197 | + }, | |
9198 | + | |
9199 | + //去凑单 | |
9200 | + qcd(){ | |
9201 | + getApp().goto("/pages/index/index/index"); | |
9202 | + }, | |
9168 | 9203 | |
9169 | 9204 | |
9170 | 9205 | ... | ... |
packageE/pages/cart/cart2/cart2.wxml
... | ... | @@ -841,12 +841,21 @@ |
841 | 841 | </view> |
842 | 842 | |
843 | 843 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> |
844 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
845 | + <view class="pay-amount"> | |
846 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text> | |
847 | + </view> | |
848 | + </view> | |
849 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn " catchtap="qcd">去凑单</button> | |
850 | + </block> | |
851 | + <block wx:else> | |
844 | 852 | <view class="pay-amount"> |
845 | 853 | <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> |
846 | 854 | <!-- <view class="co-red big"></view> --> |
847 | 855 | </view> |
848 | 856 | <button class="tips-btn" formType="submit" id="submitOrder" |
849 | 857 | disabled="{{submit || !same_ok}}" bindtap="requestSubscribe">提交订单</button> |
858 | + </block> | |
850 | 859 | </view> |
851 | 860 | </form> |
852 | 861 | ... | ... |
packageE/pages/cart/cart2_inte/cart2_inte.js
... | ... | @@ -93,6 +93,8 @@ Page({ |
93 | 93 | can_use_ord_prom:{}, |
94 | 94 | //存储订单促销的取价,按照门店进行索引 |
95 | 95 | show_ord_prom:{}, |
96 | + sameCityExp_off:0, //未达到起送价 | |
97 | + sameCityExp_info:'',//未达到起送价提示信息 | |
96 | 98 | }, |
97 | 99 | |
98 | 100 | |
... | ... | @@ -1029,7 +1031,22 @@ Page({ |
1029 | 1031 | if (res.data.code == 0) { |
1030 | 1032 | var wl_txt = "formData.shipping_price"; |
1031 | 1033 | th.setData({ [wl_txt]: res.data.data, }) |
1034 | + th.setData({ | |
1035 | + sameCityExp_off:0, | |
1036 | + sameCityExp_info:'' | |
1037 | + }) | |
1032 | 1038 | }else{ |
1039 | + if (res.data.code==-2) { //未达到起送价 | |
1040 | + th.setData({ | |
1041 | + sameCityExp_off:2, | |
1042 | + sameCityExp_info:res.data.msg | |
1043 | + }) | |
1044 | + }else{ | |
1045 | + th.setData({ | |
1046 | + sameCityExp_off:1, | |
1047 | + sameCityExp_info:res.data.msg | |
1048 | + }) | |
1049 | + } | |
1033 | 1050 | is_next=0; |
1034 | 1051 | wx.showToast({ |
1035 | 1052 | title: res.data.msg, icon: 'none', duration: 2000 |
... | ... | @@ -1636,7 +1653,7 @@ Page({ |
1636 | 1653 | var th = this; |
1637 | 1654 | var ty = t.currentTarget.dataset.t, def_exp_code = getApp().globalData.userInfo.def_exp_code; |
1638 | 1655 | |
1639 | - th.setData({ bn_exp_type: ty,same_ok:1 }); | |
1656 | + th.setData({ bn_exp_type: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'', }); | |
1640 | 1657 | //当物流为空的时候。 |
1641 | 1658 | if (ty == 0 && th.data.wu_arr == null) { |
1642 | 1659 | th.data.isget_by_quan = {}; |
... | ... | @@ -1962,7 +1979,11 @@ Page({ |
1962 | 1979 | mark:true |
1963 | 1980 | }) |
1964 | 1981 | th.calculatePrice2() |
1965 | - } | |
1982 | + }, | |
1983 | + //去凑单 | |
1984 | + qcd(){ | |
1985 | + getApp().goto("/pages/index/index/index"); | |
1986 | + }, | |
1966 | 1987 | |
1967 | 1988 | |
1968 | 1989 | ... | ... |
packageE/pages/cart/cart2_inte/cart2_inte.wxml
... | ... | @@ -215,11 +215,20 @@ |
215 | 215 | </view> |
216 | 216 | |
217 | 217 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> |
218 | - <view class="pay-amount"> | |
219 | - <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
220 | - <view class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> | |
221 | - </view> | |
222 | - <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
218 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
219 | + <view class="pay-amount"> | |
220 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | |
221 | + <!-- <view class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> --> | |
222 | + </view> | |
223 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> | |
224 | + </block> | |
225 | + <block wx:else> | |
226 | + <view class="pay-amount"> | |
227 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
228 | + <view class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> | |
229 | + </view> | |
230 | + <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
231 | + </block> | |
223 | 232 | </view> |
224 | 233 | </form> |
225 | 234 | ... | ... |
packageE/pages/cart/cart2_pt/cart2_pt.js
... | ... | @@ -97,6 +97,8 @@ Page({ |
97 | 97 | can_use_ord_prom:{}, |
98 | 98 | //存储订单促销的取价,按照门店进行索引 |
99 | 99 | show_ord_prom:{}, |
100 | + sameCityExp_off:0, //未达到起送价 | |
101 | + sameCityExp_info:'',//未达到起送价提示信息 | |
100 | 102 | }, |
101 | 103 | |
102 | 104 | |
... | ... | @@ -1113,8 +1115,22 @@ Page({ |
1113 | 1115 | if (res.data.code == 0) { |
1114 | 1116 | var wl_txt = "formData.shipping_price"; |
1115 | 1117 | th.setData({ [wl_txt]: res.data.data, }) |
1116 | - | |
1118 | + th.setData({ | |
1119 | + sameCityExp_off:0, | |
1120 | + sameCityExp_info:'' | |
1121 | + }) | |
1117 | 1122 | } else { |
1123 | + if (res.data.code==-2) { //未达到起送价 | |
1124 | + th.setData({ | |
1125 | + sameCityExp_off:2, | |
1126 | + sameCityExp_info:res.data.msg | |
1127 | + }) | |
1128 | + }else{ | |
1129 | + th.setData({ | |
1130 | + sameCityExp_off:1, | |
1131 | + sameCityExp_info:res.data.msg | |
1132 | + }) | |
1133 | + } | |
1118 | 1134 | is_next = 0; |
1119 | 1135 | wx.showToast({ |
1120 | 1136 | title: res.data.msg, icon: 'none', duration: 2000 |
... | ... | @@ -1773,7 +1789,7 @@ Page({ |
1773 | 1789 | setexptype_w: function (t) { |
1774 | 1790 | var th = this; |
1775 | 1791 | var ty = t.currentTarget.dataset.t, txt = t.currentTarget.dataset.txt; |
1776 | - th.setData({ [txt]: ty,same_ok:1 }); | |
1792 | + th.setData({ [txt]: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'', }); | |
1777 | 1793 | var iszt = 1; |
1778 | 1794 | if (ty == 0) { |
1779 | 1795 | th.setData({ is_all_zt: 0 }); |
... | ... | @@ -1795,7 +1811,7 @@ Page({ |
1795 | 1811 | setexptype: function (t) { |
1796 | 1812 | var th = this; |
1797 | 1813 | var ty = t.currentTarget.dataset.t; |
1798 | - th.setData({ bn_exp_type: ty, same_ok:1 }); | |
1814 | + th.setData({ bn_exp_type: ty, same_ok:1, sameCityExp_off:0, sameCityExp_info:'',}); | |
1799 | 1815 | //当物流为空的时候。 |
1800 | 1816 | if (ty == 0 && th.data.wu_arr == null) { |
1801 | 1817 | return th.get_wuliu(th.calculatePrice2()); |
... | ... | @@ -2538,6 +2554,10 @@ Page({ |
2538 | 2554 | } |
2539 | 2555 | func(isok); |
2540 | 2556 | }, |
2557 | + //去凑单 | |
2558 | + qcd(){ | |
2559 | + getApp().goto("/pages/index/index/index"); | |
2560 | + }, | |
2541 | 2561 | |
2542 | 2562 | |
2543 | 2563 | ... | ... |
packageE/pages/cart/cart2_pt/cart2_pt.wxml
... | ... | @@ -237,11 +237,20 @@ |
237 | 237 | </view> |
238 | 238 | |
239 | 239 | <view class="btn-wrap" wx:if="{{show_btn}}"> |
240 | - <view class="pay-amount"> | |
241 | - <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
242 | - <!-- <view class="co-red big"></view> --> | |
243 | - </view> | |
244 | - <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
240 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
241 | + <view class="pay-amount"> | |
242 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | |
243 | + </view> | |
244 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> | |
245 | + </block> | |
246 | + <block wx:else> | |
247 | + <view class="pay-amount"> | |
248 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
249 | + <!-- <view class="co-red big"></view> --> | |
250 | + </view> | |
251 | + <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
252 | + </block> | |
253 | + | |
245 | 254 | </view> |
246 | 255 | </form> |
247 | 256 | ... | ... |
pages/template/index.js
... | ... | @@ -18,6 +18,7 @@ Page({ |
18 | 18 | is_full_screen_navigation_index: -1, //广告轮播满屏下标 |
19 | 19 | nav_title: '首页', |
20 | 20 | nav_frontColor: "#000", |
21 | + old_nav_frontColor: "", | |
21 | 22 | nav_backgroundColor: "#fff", |
22 | 23 | nav_type: 1, //导航类型 |
23 | 24 | searchbox_transparent: 1, //搜索框背景是否透明 |
... | ... | @@ -213,7 +214,7 @@ Page({ |
213 | 214 | backgroundColor: temp_data.top_color, // 必写项 |
214 | 215 | }) |
215 | 216 | th.setData({ |
216 | - // nav_frontColor: top_w_color, // 必写项 | |
217 | + nav_frontColor: top_w_color, // 必写项 | |
217 | 218 | nav_backgroundColor: temp_data.top_color, // 必写项 |
218 | 219 | }) |
219 | 220 | } |
... | ... | @@ -232,8 +233,13 @@ Page({ |
232 | 233 | }) |
233 | 234 | }, |
234 | 235 | onPageScroll: function (e) { |
235 | - //满屏模式监听 | |
236 | + //满屏模式监听 | |
236 | 237 | let num = e.scrollTop |
238 | + if (!this.data.old_nav_frontColor) { | |
239 | + this.setData({ | |
240 | + old_nav_frontColor:this.data.nav_frontColor | |
241 | + }) | |
242 | + } | |
237 | 243 | if (this.data.is_full_screen_navigation) { |
238 | 244 | let nav_type = this.data.nav_type |
239 | 245 | if (num >= 100 && nav_type) { |
... | ... | @@ -248,7 +254,7 @@ Page({ |
248 | 254 | this.setData({ |
249 | 255 | nav_type: 1, |
250 | 256 | searchbox_transparent: 1, |
251 | - nav_frontColor: '#000' | |
257 | + nav_frontColor: this.data.old_nav_frontColor | |
252 | 258 | }) |
253 | 259 | // this.data.nav_type = 1 |
254 | 260 | } | ... | ... |