Commit f92e05ece0d487ce6d475582023317d442daab54
合并luo39
Showing
13 changed files
with
272 additions
and
43 deletions
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
| @@ -11,7 +11,7 @@ var oo = t.globalData.setting, | @@ -11,7 +11,7 @@ var oo = t.globalData.setting, | ||
| 11 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 11 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
| 12 | var util_pay = require("../../../../utils/pay.js"); | 12 | var util_pay = require("../../../../utils/pay.js"); |
| 13 | let self = null; | 13 | let self = null; |
| 14 | - | 14 | + |
| 15 | Page({ | 15 | Page({ |
| 16 | data: { | 16 | data: { |
| 17 | prom_type: 9, | 17 | prom_type: 9, |
| @@ -87,6 +87,8 @@ Page({ | @@ -87,6 +87,8 @@ Page({ | ||
| 87 | can_use_ord_prom:{}, | 87 | can_use_ord_prom:{}, |
| 88 | //存储订单促销的取价,按照门店进行索引 | 88 | //存储订单促销的取价,按照门店进行索引 |
| 89 | show_ord_prom:{}, | 89 | show_ord_prom:{}, |
| 90 | + sameCityExp_off:0, //未达到起送价 | ||
| 91 | + sameCityExp_info:'',//未达到起送价提示信息 | ||
| 90 | }, | 92 | }, |
| 91 | 93 | ||
| 92 | 94 | ||
| @@ -1073,7 +1075,22 @@ Page({ | @@ -1073,7 +1075,22 @@ Page({ | ||
| 1073 | if (res.data.code == 0) { | 1075 | if (res.data.code == 0) { |
| 1074 | var wl_txt = "formData.shipping_price"; | 1076 | var wl_txt = "formData.shipping_price"; |
| 1075 | th.setData({ [wl_txt]: res.data.data, }) | 1077 | th.setData({ [wl_txt]: res.data.data, }) |
| 1078 | + th.setData({ | ||
| 1079 | + sameCityExp_off:0, | ||
| 1080 | + sameCityExp_info:'' | ||
| 1081 | + }) | ||
| 1076 | } else { | 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 | is_next = 0; | 1094 | is_next = 0; |
| 1078 | wx.showToast({ | 1095 | wx.showToast({ |
| 1079 | title: res.data.msg, icon: 'none', duration: 2000 | 1096 | title: res.data.msg, icon: 'none', duration: 2000 |
| @@ -1821,7 +1838,10 @@ Page({ | @@ -1821,7 +1838,10 @@ Page({ | ||
| 1821 | var th = this; | 1838 | var th = this; |
| 1822 | var ty = t.currentTarget.dataset.t; | 1839 | var ty = t.currentTarget.dataset.t; |
| 1823 | th.setData({ | 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 | if (ty == 0 && th.data.wu_arr == null) { | 1847 | if (ty == 0 && th.data.wu_arr == null) { |
| @@ -2344,6 +2364,10 @@ Page({ | @@ -2344,6 +2364,10 @@ Page({ | ||
| 2344 | } | 2364 | } |
| 2345 | func(isok); | 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,7 +9,7 @@ | ||
| 9 | 9 | ||
| 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> | 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 | <block wx:if="{{show_same_city}}"> | 13 | <block wx:if="{{show_same_city}}"> |
| 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> | 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 | </block> | 15 | </block> |
| @@ -221,11 +221,22 @@ | @@ -221,11 +221,22 @@ | ||
| 221 | </view> | 221 | </view> |
| 222 | 222 | ||
| 223 | <view class="btn-wrap" wx:if="{{is_show_sub}}"> | 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 | </view> | 240 | </view> |
| 230 | </form> | 241 | </form> |
| 231 | 242 |
packageC/pages/presell/cart/cart.js
| @@ -123,7 +123,9 @@ Page({ | @@ -123,7 +123,9 @@ Page({ | ||
| 123 | bconfig: null, | 123 | bconfig: null, |
| 124 | showFold:true, | 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 | ||
| @@ -2526,7 +2528,22 @@ Page({ | @@ -2526,7 +2528,22 @@ Page({ | ||
| 2526 | }).then(res => { | 2528 | }).then(res => { |
| 2527 | if (res.data.code == 0) { | 2529 | if (res.data.code == 0) { |
| 2528 | shipping_price = res.data.data; | 2530 | shipping_price = res.data.data; |
| 2531 | + th.setData({ | ||
| 2532 | + sameCityExp_off:0, | ||
| 2533 | + sameCityExp_info:'' | ||
| 2534 | + }) | ||
| 2529 | } else { | 2535 | } else { |
| 2536 | + if (res.data.code==-2) { //未达到起送价 | ||
| 2537 | + th.setData({ | ||
| 2538 | + sameCityExp_off:2, | ||
| 2539 | + sameCityExp_info:res.data.msg | ||
| 2540 | + }) | ||
| 2541 | + }else{ | ||
| 2542 | + th.setData({ | ||
| 2543 | + sameCityExp_off:1, | ||
| 2544 | + sameCityExp_info:res.data.msg | ||
| 2545 | + }) | ||
| 2546 | + } | ||
| 2530 | is_next = 0; | 2547 | is_next = 0; |
| 2531 | wx.showToast({ | 2548 | wx.showToast({ |
| 2532 | title: res.data.msg, icon: 'none', duration: 2000 | 2549 | title: res.data.msg, icon: 'none', duration: 2000 |
| @@ -2612,7 +2629,22 @@ Page({ | @@ -2612,7 +2629,22 @@ Page({ | ||
| 2612 | }).then(res => { | 2629 | }).then(res => { |
| 2613 | if (res.data.code == 0) { | 2630 | if (res.data.code == 0) { |
| 2614 | shipping_price = res.data.data; | 2631 | shipping_price = res.data.data; |
| 2632 | + th.setData({ | ||
| 2633 | + sameCityExp_off:0, | ||
| 2634 | + sameCityExp_info:'' | ||
| 2635 | + }) | ||
| 2615 | } else { | 2636 | } else { |
| 2637 | + if (res.data.code==-2) { //未达到起送价 | ||
| 2638 | + th.setData({ | ||
| 2639 | + sameCityExp_off:2, | ||
| 2640 | + sameCityExp_info:res.data.msg | ||
| 2641 | + }) | ||
| 2642 | + }else{ | ||
| 2643 | + th.setData({ | ||
| 2644 | + sameCityExp_off:1, | ||
| 2645 | + sameCityExp_info:res.data.msg | ||
| 2646 | + }) | ||
| 2647 | + } | ||
| 2616 | is_next = 0; | 2648 | is_next = 0; |
| 2617 | wx.showToast({ | 2649 | wx.showToast({ |
| 2618 | title: res.data.msg, icon: 'none', duration: 2000 | 2650 | title: res.data.msg, icon: 'none', duration: 2000 |
| @@ -2927,7 +2959,10 @@ Page({ | @@ -2927,7 +2959,10 @@ Page({ | ||
| 2927 | set_wuliu: function (e) { | 2959 | set_wuliu: function (e) { |
| 2928 | var type = e.currentTarget.dataset.type; | 2960 | var type = e.currentTarget.dataset.type; |
| 2929 | this.setData({ | 2961 | this.setData({ |
| 2930 | - exp_type: type,same_ok:1 | 2962 | + exp_type: type, |
| 2963 | + same_ok:1, | ||
| 2964 | + sameCityExp_off:0, | ||
| 2965 | + sameCityExp_info:'', | ||
| 2931 | }); | 2966 | }); |
| 2932 | this.calculatePrice2(); | 2967 | this.calculatePrice2(); |
| 2933 | }, | 2968 | }, |
| @@ -3443,7 +3478,12 @@ Page({ | @@ -3443,7 +3478,12 @@ Page({ | ||
| 3443 | //-- 查看物流 -- | 3478 | //-- 查看物流 -- |
| 3444 | go_wuliu:function (e) { | 3479 | go_wuliu:function (e) { |
| 3445 | getApp().go_wuliu(e); | 3480 | getApp().go_wuliu(e); |
| 3446 | - } | 3481 | + }, |
| 3482 | + //去凑单 | ||
| 3483 | + qcd(){ | ||
| 3484 | + getApp().goto("/pages/index/index/index"); | ||
| 3485 | + }, | ||
| 3486 | + | ||
| 3447 | 3487 | ||
| 3448 | 3488 | ||
| 3449 | 3489 |
packageC/pages/presell/cart/cart.wxml
| @@ -388,14 +388,26 @@ | @@ -388,14 +388,26 @@ | ||
| 388 | 请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消 | 388 | 请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消 |
| 389 | </view> | 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 | <view class="pay-amount"> | 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 | <view class="payable">应付金额: | 403 | <view class="payable">应付金额: |
| 394 | <text class="co-red"> <text class="fs24">¥</text>{{filters.toFix(order_m,2)}}</text> | 404 | <text class="co-red"> <text class="fs24">¥</text>{{filters.toFix(order_m,2)}}</text> |
| 395 | </view> | 405 | </view> |
| 396 | </view> | 406 | </view> |
| 397 | <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">支付尾款</button> | 407 | <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">支付尾款</button> |
| 398 | <button wx:else class="tips-btn" bindtap="show_pay" hidden="{{!show_submit || !same_ok}}">支付尾款</button> | 408 | <button wx:else class="tips-btn" bindtap="show_pay" hidden="{{!show_submit || !same_ok}}">支付尾款</button> |
| 409 | + </block> | ||
| 410 | + | ||
| 399 | <!-- 预售 --> | 411 | <!-- 预售 --> |
| 400 | <!-- <button class="tips-btn" formType="submit" id="submitOrder">立即支付</button> --> | 412 | <!-- <button class="tips-btn" formType="submit" id="submitOrder">立即支付</button> --> |
| 401 | </view> | 413 | </view> |
packageC/pages/presell/cart/cart2.js
| @@ -142,6 +142,8 @@ Page({ | @@ -142,6 +142,8 @@ Page({ | ||
| 142 | can_use_ord_prom:{}, | 142 | can_use_ord_prom:{}, |
| 143 | //存储订单促销的取价,按照门店进行索引 | 143 | //存储订单促销的取价,按照门店进行索引 |
| 144 | show_ord_prom:{}, | 144 | show_ord_prom:{}, |
| 145 | + sameCityExp_off:0, //未达到起送价 | ||
| 146 | + sameCityExp_info:'',//未达到起送价提示信息 | ||
| 145 | }, | 147 | }, |
| 146 | 148 | ||
| 147 | 149 | ||
| @@ -1181,7 +1183,22 @@ Page({ | @@ -1181,7 +1183,22 @@ Page({ | ||
| 1181 | if (res.data.code == 0) { | 1183 | if (res.data.code == 0) { |
| 1182 | var wl_txt = "formData.shipping_price"; | 1184 | var wl_txt = "formData.shipping_price"; |
| 1183 | th.setData({ [wl_txt]: res.data.data, }) | 1185 | th.setData({ [wl_txt]: res.data.data, }) |
| 1186 | + th.setData({ | ||
| 1187 | + sameCityExp_off:0, | ||
| 1188 | + sameCityExp_info:'' | ||
| 1189 | + }) | ||
| 1184 | }else{ | 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 | is_next=0; | 1202 | is_next=0; |
| 1186 | wx.showToast({ | 1203 | wx.showToast({ |
| 1187 | title: res.data.msg, icon: 'none', duration: 2000 | 1204 | title: res.data.msg, icon: 'none', duration: 2000 |
| @@ -2261,7 +2278,7 @@ Page({ | @@ -2261,7 +2278,7 @@ Page({ | ||
| 2261 | setexptype: function (t) { | 2278 | setexptype: function (t) { |
| 2262 | var th = this; | 2279 | var th = this; |
| 2263 | var ty = t.currentTarget.dataset.t, def_exp_code = getApp().globalData.userInfo.def_exp_code; | 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 | if (ty == 0) { | 2282 | if (ty == 0) { |
| 2266 | th.setData({ is_all_zt: 0 }); | 2283 | th.setData({ is_all_zt: 0 }); |
| 2267 | } | 2284 | } |
| @@ -3400,7 +3417,11 @@ Page({ | @@ -3400,7 +3417,11 @@ Page({ | ||
| 3400 | if(!th.data.can_use_ord_prom[pickid]){ | 3417 | if(!th.data.can_use_ord_prom[pickid]){ |
| 3401 | th.get_buy_now_quan(); | 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,10 +272,21 @@ | ||
| 272 | </view> | 272 | </view> |
| 273 | 273 | ||
| 274 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> | 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 | </view> | 290 | </view> |
| 280 | </form> | 291 | </form> |
| 281 | 292 |
packageE/pages/cart/cart2/cart2.js
| @@ -186,7 +186,8 @@ Page({ | @@ -186,7 +186,8 @@ Page({ | ||
| 186 | can_use_ord_prom:{}, | 186 | can_use_ord_prom:{}, |
| 187 | //存储订单促销的取价,按照门店进行索引 | 187 | //存储订单促销的取价,按照门店进行索引 |
| 188 | show_ord_prom:{}, | 188 | show_ord_prom:{}, |
| 189 | - | 189 | + sameCityExp_off:0, //未达到起送价 |
| 190 | + sameCityExp_info:'',//未达到起送价提示信息 | ||
| 190 | }, | 191 | }, |
| 191 | 192 | ||
| 192 | 193 | ||
| @@ -3691,8 +3692,23 @@ Page({ | @@ -3691,8 +3692,23 @@ Page({ | ||
| 3691 | await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", { is_json: 1, data: req_data }).then(res => { | 3692 | await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", { is_json: 1, data: req_data }).then(res => { |
| 3692 | if (res.data.code == 0) { | 3693 | if (res.data.code == 0) { |
| 3693 | cart_item.shipping_price = res.data.data; | 3694 | cart_item.shipping_price = res.data.data; |
| 3695 | + th.setData({ | ||
| 3696 | + sameCityExp_off:0, | ||
| 3697 | + sameCityExp_info:'' | ||
| 3698 | + }) | ||
| 3694 | } else { | 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 | if (qfunc) qfunc(); | 3713 | if (qfunc) qfunc(); |
| 3698 | else { | 3714 | else { |
| @@ -4532,9 +4548,23 @@ Page({ | @@ -4532,9 +4548,23 @@ Page({ | ||
| 4532 | if (res.data.code == 0) { | 4548 | if (res.data.code == 0) { |
| 4533 | var wl_txt = "formData.shipping_price"; | 4549 | var wl_txt = "formData.shipping_price"; |
| 4534 | th.setData({ [wl_txt]: res.data.data, }) | 4550 | th.setData({ [wl_txt]: res.data.data, }) |
| 4535 | - | 4551 | + th.setData({ |
| 4552 | + sameCityExp_off:0, | ||
| 4553 | + sameCityExp_info:'' | ||
| 4554 | + }) | ||
| 4536 | } else { | 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 | if (qfunc) { | 4568 | if (qfunc) { |
| 4539 | qfunc(); | 4569 | qfunc(); |
| 4540 | } else { | 4570 | } else { |
| @@ -7722,7 +7752,7 @@ Page({ | @@ -7722,7 +7752,7 @@ Page({ | ||
| 7722 | setexptype2: function (e) { | 7752 | setexptype2: function (e) { |
| 7723 | 7753 | ||
| 7724 | if(this.data.submit) return false; | 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 | if(this.data.all_collocation_list){ | 7757 | if(this.data.all_collocation_list){ |
| 7728 | var bn_coll= this.selectComponent('#bn_coll'); | 7758 | var bn_coll= this.selectComponent('#bn_coll'); |
| @@ -7741,7 +7771,7 @@ Page({ | @@ -7741,7 +7771,7 @@ Page({ | ||
| 7741 | setexptype_w2: function (e) { | 7771 | setexptype_w2: function (e) { |
| 7742 | 7772 | ||
| 7743 | if(this.data.submit) return false; | 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 | for (let i = 0; i <this.data.cartlist.length ; i++) { | 7776 | for (let i = 0; i <this.data.cartlist.length ; i++) { |
| 7747 | 7777 | ||
| @@ -9164,7 +9194,12 @@ Page({ | @@ -9164,7 +9194,12 @@ Page({ | ||
| 9164 | if(!th.data.can_use_ord_prom[pickid]){ | 9194 | if(!th.data.can_use_ord_prom[pickid]){ |
| 9165 | th.get_buy_now_quan(); | 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,12 +841,21 @@ | ||
| 841 | </view> | 841 | </view> |
| 842 | 842 | ||
| 843 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> | 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 | <view class="pay-amount"> | 852 | <view class="pay-amount"> |
| 845 | <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> | 853 | <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> |
| 846 | <!-- <view class="co-red big"></view> --> | 854 | <!-- <view class="co-red big"></view> --> |
| 847 | </view> | 855 | </view> |
| 848 | <button class="tips-btn" formType="submit" id="submitOrder" | 856 | <button class="tips-btn" formType="submit" id="submitOrder" |
| 849 | disabled="{{submit || !same_ok}}" bindtap="requestSubscribe">提交订单</button> | 857 | disabled="{{submit || !same_ok}}" bindtap="requestSubscribe">提交订单</button> |
| 858 | + </block> | ||
| 850 | </view> | 859 | </view> |
| 851 | </form> | 860 | </form> |
| 852 | 861 |
packageE/pages/cart/cart2_inte/cart2_inte.js
| @@ -93,6 +93,8 @@ Page({ | @@ -93,6 +93,8 @@ Page({ | ||
| 93 | can_use_ord_prom:{}, | 93 | can_use_ord_prom:{}, |
| 94 | //存储订单促销的取价,按照门店进行索引 | 94 | //存储订单促销的取价,按照门店进行索引 |
| 95 | show_ord_prom:{}, | 95 | show_ord_prom:{}, |
| 96 | + sameCityExp_off:0, //未达到起送价 | ||
| 97 | + sameCityExp_info:'',//未达到起送价提示信息 | ||
| 96 | }, | 98 | }, |
| 97 | 99 | ||
| 98 | 100 | ||
| @@ -1029,7 +1031,22 @@ Page({ | @@ -1029,7 +1031,22 @@ Page({ | ||
| 1029 | if (res.data.code == 0) { | 1031 | if (res.data.code == 0) { |
| 1030 | var wl_txt = "formData.shipping_price"; | 1032 | var wl_txt = "formData.shipping_price"; |
| 1031 | th.setData({ [wl_txt]: res.data.data, }) | 1033 | th.setData({ [wl_txt]: res.data.data, }) |
| 1034 | + th.setData({ | ||
| 1035 | + sameCityExp_off:0, | ||
| 1036 | + sameCityExp_info:'' | ||
| 1037 | + }) | ||
| 1032 | }else{ | 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 | is_next=0; | 1050 | is_next=0; |
| 1034 | wx.showToast({ | 1051 | wx.showToast({ |
| 1035 | title: res.data.msg, icon: 'none', duration: 2000 | 1052 | title: res.data.msg, icon: 'none', duration: 2000 |
| @@ -1637,7 +1654,7 @@ Page({ | @@ -1637,7 +1654,7 @@ Page({ | ||
| 1637 | var th = this; | 1654 | var th = this; |
| 1638 | var ty = t.currentTarget.dataset.t, def_exp_code = getApp().globalData.userInfo.def_exp_code; | 1655 | var ty = t.currentTarget.dataset.t, def_exp_code = getApp().globalData.userInfo.def_exp_code; |
| 1639 | 1656 | ||
| 1640 | - th.setData({ bn_exp_type: ty,same_ok:1 }); | 1657 | + th.setData({ bn_exp_type: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'', }); |
| 1641 | //当物流为空的时候。 | 1658 | //当物流为空的时候。 |
| 1642 | if (ty == 0 && th.data.wu_arr == null) { | 1659 | if (ty == 0 && th.data.wu_arr == null) { |
| 1643 | th.data.isget_by_quan = {}; | 1660 | th.data.isget_by_quan = {}; |
| @@ -1963,7 +1980,11 @@ Page({ | @@ -1963,7 +1980,11 @@ Page({ | ||
| 1963 | mark:true | 1980 | mark:true |
| 1964 | }) | 1981 | }) |
| 1965 | th.calculatePrice2() | 1982 | th.calculatePrice2() |
| 1966 | - } | 1983 | + }, |
| 1984 | + //去凑单 | ||
| 1985 | + qcd(){ | ||
| 1986 | + getApp().goto("/pages/index/index/index"); | ||
| 1987 | + }, | ||
| 1967 | 1988 | ||
| 1968 | 1989 | ||
| 1969 | 1990 |
packageE/pages/cart/cart2_inte/cart2_inte.wxml
| @@ -216,11 +216,21 @@ | @@ -216,11 +216,21 @@ | ||
| 216 | 216 | ||
| 217 | 217 | ||
| 218 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> | 218 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> |
| 219 | - <view class="pay-amount"> | ||
| 220 | - <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | ||
| 221 | - <view hidden="{{can_use_ord_prom && can_use_ord_prom[bn_pick] }}" class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> | ||
| 222 | - </view> | ||
| 223 | - <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | 219 | + |
| 220 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | ||
| 221 | + <view class="pay-amount"> | ||
| 222 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | ||
| 223 | + <!-- <view class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> --> | ||
| 224 | + </view> | ||
| 225 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> | ||
| 226 | + </block> | ||
| 227 | + <block wx:else> | ||
| 228 | + <view class="pay-amount"> | ||
| 229 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | ||
| 230 | + <view class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> | ||
| 231 | + </view> | ||
| 232 | + <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | ||
| 233 | + </block> | ||
| 224 | </view> | 234 | </view> |
| 225 | </form> | 235 | </form> |
| 226 | 236 |
packageE/pages/cart/cart2_pt/cart2_pt.js
| @@ -97,6 +97,8 @@ Page({ | @@ -97,6 +97,8 @@ Page({ | ||
| 97 | can_use_ord_prom:{}, | 97 | can_use_ord_prom:{}, |
| 98 | //存储订单促销的取价,按照门店进行索引 | 98 | //存储订单促销的取价,按照门店进行索引 |
| 99 | show_ord_prom:{}, | 99 | show_ord_prom:{}, |
| 100 | + sameCityExp_off:0, //未达到起送价 | ||
| 101 | + sameCityExp_info:'',//未达到起送价提示信息 | ||
| 100 | }, | 102 | }, |
| 101 | 103 | ||
| 102 | 104 | ||
| @@ -1113,8 +1115,22 @@ Page({ | @@ -1113,8 +1115,22 @@ Page({ | ||
| 1113 | if (res.data.code == 0) { | 1115 | if (res.data.code == 0) { |
| 1114 | var wl_txt = "formData.shipping_price"; | 1116 | var wl_txt = "formData.shipping_price"; |
| 1115 | th.setData({ [wl_txt]: res.data.data, }) | 1117 | th.setData({ [wl_txt]: res.data.data, }) |
| 1116 | - | 1118 | + th.setData({ |
| 1119 | + sameCityExp_off:0, | ||
| 1120 | + sameCityExp_info:'' | ||
| 1121 | + }) | ||
| 1117 | } else { | 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 | is_next = 0; | 1134 | is_next = 0; |
| 1119 | wx.showToast({ | 1135 | wx.showToast({ |
| 1120 | title: res.data.msg, icon: 'none', duration: 2000 | 1136 | title: res.data.msg, icon: 'none', duration: 2000 |
| @@ -1773,7 +1789,7 @@ Page({ | @@ -1773,7 +1789,7 @@ Page({ | ||
| 1773 | setexptype_w: function (t) { | 1789 | setexptype_w: function (t) { |
| 1774 | var th = this; | 1790 | var th = this; |
| 1775 | var ty = t.currentTarget.dataset.t, txt = t.currentTarget.dataset.txt; | 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 | var iszt = 1; | 1793 | var iszt = 1; |
| 1778 | if (ty == 0) { | 1794 | if (ty == 0) { |
| 1779 | th.setData({ is_all_zt: 0 }); | 1795 | th.setData({ is_all_zt: 0 }); |
| @@ -1795,7 +1811,7 @@ Page({ | @@ -1795,7 +1811,7 @@ Page({ | ||
| 1795 | setexptype: function (t) { | 1811 | setexptype: function (t) { |
| 1796 | var th = this; | 1812 | var th = this; |
| 1797 | var ty = t.currentTarget.dataset.t; | 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 | if (ty == 0 && th.data.wu_arr == null) { | 1816 | if (ty == 0 && th.data.wu_arr == null) { |
| 1801 | return th.get_wuliu(th.calculatePrice2()); | 1817 | return th.get_wuliu(th.calculatePrice2()); |
| @@ -2538,6 +2554,10 @@ Page({ | @@ -2538,6 +2554,10 @@ Page({ | ||
| 2538 | } | 2554 | } |
| 2539 | func(isok); | 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,11 +237,20 @@ | ||
| 237 | </view> | 237 | </view> |
| 238 | 238 | ||
| 239 | <view class="btn-wrap" wx:if="{{show_btn}}"> | 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 | </view> | 254 | </view> |
| 246 | </form> | 255 | </form> |
| 247 | 256 |
pages/template/index.js
| @@ -18,6 +18,7 @@ Page({ | @@ -18,6 +18,7 @@ Page({ | ||
| 18 | is_full_screen_navigation_index: -1, //广告轮播满屏下标 | 18 | is_full_screen_navigation_index: -1, //广告轮播满屏下标 |
| 19 | nav_title: '首页', | 19 | nav_title: '首页', |
| 20 | nav_frontColor: "#000", | 20 | nav_frontColor: "#000", |
| 21 | + old_nav_frontColor: "", | ||
| 21 | nav_backgroundColor: "#fff", | 22 | nav_backgroundColor: "#fff", |
| 22 | nav_type: 1, //导航类型 | 23 | nav_type: 1, //导航类型 |
| 23 | searchbox_transparent: 1, //搜索框背景是否透明 | 24 | searchbox_transparent: 1, //搜索框背景是否透明 |
| @@ -213,7 +214,7 @@ Page({ | @@ -213,7 +214,7 @@ Page({ | ||
| 213 | backgroundColor: temp_data.top_color, // 必写项 | 214 | backgroundColor: temp_data.top_color, // 必写项 |
| 214 | }) | 215 | }) |
| 215 | th.setData({ | 216 | th.setData({ |
| 216 | - // nav_frontColor: top_w_color, // 必写项 | 217 | + nav_frontColor: top_w_color, // 必写项 |
| 217 | nav_backgroundColor: temp_data.top_color, // 必写项 | 218 | nav_backgroundColor: temp_data.top_color, // 必写项 |
| 218 | }) | 219 | }) |
| 219 | } | 220 | } |
| @@ -232,8 +233,13 @@ Page({ | @@ -232,8 +233,13 @@ Page({ | ||
| 232 | }) | 233 | }) |
| 233 | }, | 234 | }, |
| 234 | onPageScroll: function (e) { | 235 | onPageScroll: function (e) { |
| 235 | - //满屏模式监听 | 236 | + //满屏模式监听 |
| 236 | let num = e.scrollTop | 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 | if (this.data.is_full_screen_navigation) { | 243 | if (this.data.is_full_screen_navigation) { |
| 238 | let nav_type = this.data.nav_type | 244 | let nav_type = this.data.nav_type |
| 239 | if (num >= 100 && nav_type) { | 245 | if (num >= 100 && nav_type) { |
| @@ -248,7 +254,7 @@ Page({ | @@ -248,7 +254,7 @@ Page({ | ||
| 248 | this.setData({ | 254 | this.setData({ |
| 249 | nav_type: 1, | 255 | nav_type: 1, |
| 250 | searchbox_transparent: 1, | 256 | searchbox_transparent: 1, |
| 251 | - nav_frontColor: '#000' | 257 | + nav_frontColor: this.data.old_nav_frontColor |
| 252 | }) | 258 | }) |
| 253 | // this.data.nav_type = 1 | 259 | // this.data.nav_type = 1 |
| 254 | } | 260 | } |