From 2449b11d60dbf4de43e54b6d06ade6fb31cc5c5d Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Fri, 8 Mar 2024 18:26:46 +0800 Subject: [PATCH] OA单122361 --- packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js | 28 ++++++++++++++++++++++++++-- packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml | 23 +++++++++++++++++------ packageC/pages/presell/cart/cart.js | 46 +++++++++++++++++++++++++++++++++++++++++++--- packageC/pages/presell/cart/cart.wxml | 14 +++++++++++++- packageC/pages/presell/cart/cart2.js | 25 +++++++++++++++++++++++-- packageC/pages/presell/cart/cart2.wxml | 19 +++++++++++++++---- packageE/pages/cart/cart2/cart2.js | 49 ++++++++++++++++++++++++++++++++++++++++++------- packageE/pages/cart/cart2/cart2.wxml | 9 +++++++++ packageE/pages/cart/cart2_inte/cart2_inte.js | 25 +++++++++++++++++++++++-- packageE/pages/cart/cart2_inte/cart2_inte.wxml | 19 ++++++++++++++----- packageE/pages/cart/cart2_pt/cart2_pt.js | 26 +++++++++++++++++++++++--- packageE/pages/cart/cart2_pt/cart2_pt.wxml | 19 ++++++++++++++----- pages/template/index.js | 12 +++++++++--- 13 files changed, 271 insertions(+), 43 deletions(-) diff --git a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js index b32f387..a97870a 100644 --- a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js +++ b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js @@ -11,7 +11,7 @@ var oo = t.globalData.setting, var regeneratorRuntime = require('../../../../utils/runtime.js'); var util_pay = require("../../../../utils/pay.js"); let self = null; - + Page({ data: { prom_type: 9, @@ -87,6 +87,8 @@ Page({ can_use_ord_prom:{}, //存储订单促销的取价,按照门店进行索引 show_ord_prom:{}, + sameCityExp_off:0, //未达到起送价 + sameCityExp_info:'',//未达到起送价提示信息 }, @@ -1073,7 +1075,22 @@ Page({ if (res.data.code == 0) { var wl_txt = "formData.shipping_price"; th.setData({ [wl_txt]: res.data.data, }) + th.setData({ + sameCityExp_off:0, + sameCityExp_info:'' + }) } else { + if (res.data.code==-2) { //未达到起送价 + th.setData({ + sameCityExp_off:2, + sameCityExp_info:res.data.msg + }) + }else{ + th.setData({ + sameCityExp_off:1, + sameCityExp_info:res.data.msg + }) + } is_next = 0; wx.showToast({ title: res.data.msg, icon: 'none', duration: 2000 @@ -1821,7 +1838,10 @@ Page({ var th = this; var ty = t.currentTarget.dataset.t; th.setData({ - bn_exp_type: ty,same_ok:1 + bn_exp_type: ty, + same_ok:1, + sameCityExp_off:0, + sameCityExp_info:'', }); //当物流为空的时候。 if (ty == 0 && th.data.wu_arr == null) { @@ -2344,6 +2364,10 @@ Page({ } func(isok); }, + //去凑单 + qcd(){ + getApp().goto("/pages/index/index/index"); + }, }); diff --git a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml index 12ca5c8..097b433 100644 --- a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml +++ b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml @@ -9,7 +9,7 @@ - + @@ -221,11 +221,22 @@ - - 应付金额:¥{{formData.order_amount}} - - - + + + {{sameCityExp_info}} + + + + + + + 应付金额:¥{{formData.order_amount}} + + + + + + diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index 6ec4ec6..734fcde 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -123,7 +123,9 @@ Page({ bconfig: null, showFold:true, - is_fwk:0, //-- 是不是服务卡项的购买 -- + is_fwk:0, //-- 是不是服务卡项的购买 -- + sameCityExp_off:0, //未达到起送价 + sameCityExp_info:'',//未达到起送价提示信息 }, @@ -2519,7 +2521,22 @@ Page({ }).then(res => { if (res.data.code == 0) { shipping_price = res.data.data; + th.setData({ + sameCityExp_off:0, + sameCityExp_info:'' + }) } else { + if (res.data.code==-2) { //未达到起送价 + th.setData({ + sameCityExp_off:2, + sameCityExp_info:res.data.msg + }) + }else{ + th.setData({ + sameCityExp_off:1, + sameCityExp_info:res.data.msg + }) + } is_next = 0; wx.showToast({ title: res.data.msg, icon: 'none', duration: 2000 @@ -2605,7 +2622,22 @@ Page({ }).then(res => { if (res.data.code == 0) { shipping_price = res.data.data; + th.setData({ + sameCityExp_off:0, + sameCityExp_info:'' + }) } else { + if (res.data.code==-2) { //未达到起送价 + th.setData({ + sameCityExp_off:2, + sameCityExp_info:res.data.msg + }) + }else{ + th.setData({ + sameCityExp_off:1, + sameCityExp_info:res.data.msg + }) + } is_next = 0; wx.showToast({ title: res.data.msg, icon: 'none', duration: 2000 @@ -2920,7 +2952,10 @@ Page({ set_wuliu: function (e) { var type = e.currentTarget.dataset.type; this.setData({ - exp_type: type,same_ok:1 + exp_type: type, + same_ok:1, + sameCityExp_off:0, + sameCityExp_info:'', }); this.calculatePrice2(); }, @@ -3436,7 +3471,12 @@ Page({ //-- 查看物流 -- go_wuliu:function (e) { getApp().go_wuliu(e); - } + }, + //去凑单 + qcd(){ + getApp().goto("/pages/index/index/index"); + }, + diff --git a/packageC/pages/presell/cart/cart.wxml b/packageC/pages/presell/cart/cart.wxml index cf4a466..04a7734 100644 --- a/packageC/pages/presell/cart/cart.wxml +++ b/packageC/pages/presell/cart/cart.wxml @@ -388,14 +388,26 @@ 请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消 - - - 应付金额:{{formData.order_amount}} - - + + + {{sameCityExp_info}} + + + + + + 应付金额:{{formData.order_amount}} + + + + + + diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 01b9d44..0b14b49 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -186,7 +186,8 @@ Page({ can_use_ord_prom:{}, //存储订单促销的取价,按照门店进行索引 show_ord_prom:{}, - + sameCityExp_off:0, //未达到起送价 + sameCityExp_info:'',//未达到起送价提示信息 }, @@ -3691,8 +3692,23 @@ Page({ await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", { is_json: 1, data: req_data }).then(res => { if (res.data.code == 0) { cart_item.shipping_price = res.data.data; + th.setData({ + sameCityExp_off:0, + sameCityExp_info:'' + }) } else { - is_next = 0; + if (res.data.code==-2) { //未达到起送价 + th.setData({ + sameCityExp_off:2, + sameCityExp_info:res.data.msg + }) + }else{ + th.setData({ + sameCityExp_off:1, + sameCityExp_info:res.data.msg + }) + } + // is_next = 0; if (qfunc) qfunc(); else { @@ -4532,9 +4548,23 @@ Page({ if (res.data.code == 0) { var wl_txt = "formData.shipping_price"; th.setData({ [wl_txt]: res.data.data, }) - + th.setData({ + sameCityExp_off:0, + sameCityExp_info:'' + }) } else { - is_next = 0; + if (res.data.code==-2) { //未达到起送价 + th.setData({ + sameCityExp_off:2, + sameCityExp_info:res.data.msg + }) + }else{ + th.setData({ + sameCityExp_off:1, + sameCityExp_info:res.data.msg + }) + } + // is_next = 0; if (qfunc) { qfunc(); } else { @@ -7722,7 +7752,7 @@ Page({ setexptype2: function (e) { if(this.data.submit) return false; - this.setData({ submit: 1,same_ok:1 }); + this.setData({ submit: 1,same_ok:1,sameCityExp_off:0, sameCityExp_info:'',}); if(this.data.all_collocation_list){ var bn_coll= this.selectComponent('#bn_coll'); @@ -7741,7 +7771,7 @@ Page({ setexptype_w2: function (e) { if(this.data.submit) return false; - this.setData({ submit: 1,same_ok:1 }); + this.setData({ submit: 1,same_ok:1,sameCityExp_off:0, sameCityExp_info:'',}); for (let i = 0; i + + + {{sameCityExp_info}} + + + + + 应付金额:{{formData.order_amount}} + diff --git a/packageE/pages/cart/cart2_inte/cart2_inte.js b/packageE/pages/cart/cart2_inte/cart2_inte.js index 3fe3185..81758f2 100644 --- a/packageE/pages/cart/cart2_inte/cart2_inte.js +++ b/packageE/pages/cart/cart2_inte/cart2_inte.js @@ -93,6 +93,8 @@ Page({ can_use_ord_prom:{}, //存储订单促销的取价,按照门店进行索引 show_ord_prom:{}, + sameCityExp_off:0, //未达到起送价 + sameCityExp_info:'',//未达到起送价提示信息 }, @@ -1029,7 +1031,22 @@ Page({ if (res.data.code == 0) { var wl_txt = "formData.shipping_price"; th.setData({ [wl_txt]: res.data.data, }) + th.setData({ + sameCityExp_off:0, + sameCityExp_info:'' + }) }else{ + if (res.data.code==-2) { //未达到起送价 + th.setData({ + sameCityExp_off:2, + sameCityExp_info:res.data.msg + }) + }else{ + th.setData({ + sameCityExp_off:1, + sameCityExp_info:res.data.msg + }) + } is_next=0; wx.showToast({ title: res.data.msg, icon: 'none', duration: 2000 @@ -1636,7 +1653,7 @@ Page({ var th = this; var ty = t.currentTarget.dataset.t, def_exp_code = getApp().globalData.userInfo.def_exp_code; - th.setData({ bn_exp_type: ty,same_ok:1 }); + th.setData({ bn_exp_type: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'', }); //当物流为空的时候。 if (ty == 0 && th.data.wu_arr == null) { th.data.isget_by_quan = {}; @@ -1962,7 +1979,11 @@ Page({ mark:true }) th.calculatePrice2() - } + }, + //去凑单 + qcd(){ + getApp().goto("/pages/index/index/index"); + }, diff --git a/packageE/pages/cart/cart2_inte/cart2_inte.wxml b/packageE/pages/cart/cart2_inte/cart2_inte.wxml index b3bce8a..89c4a13 100644 --- a/packageE/pages/cart/cart2_inte/cart2_inte.wxml +++ b/packageE/pages/cart/cart2_inte/cart2_inte.wxml @@ -215,11 +215,20 @@ - - 应付金额:¥{{formData.order_amount}} - 应付积分:{{formData.integral}}积分 - - + + + {{sameCityExp_info}} + + + + + + + 应付金额:¥{{formData.order_amount}} + 应付积分:{{formData.integral}}积分 + + + diff --git a/packageE/pages/cart/cart2_pt/cart2_pt.js b/packageE/pages/cart/cart2_pt/cart2_pt.js index b3237ab..85519ea 100644 --- a/packageE/pages/cart/cart2_pt/cart2_pt.js +++ b/packageE/pages/cart/cart2_pt/cart2_pt.js @@ -97,6 +97,8 @@ Page({ can_use_ord_prom:{}, //存储订单促销的取价,按照门店进行索引 show_ord_prom:{}, + sameCityExp_off:0, //未达到起送价 + sameCityExp_info:'',//未达到起送价提示信息 }, @@ -1113,8 +1115,22 @@ Page({ if (res.data.code == 0) { var wl_txt = "formData.shipping_price"; th.setData({ [wl_txt]: res.data.data, }) - + th.setData({ + sameCityExp_off:0, + sameCityExp_info:'' + }) } else { + if (res.data.code==-2) { //未达到起送价 + th.setData({ + sameCityExp_off:2, + sameCityExp_info:res.data.msg + }) + }else{ + th.setData({ + sameCityExp_off:1, + sameCityExp_info:res.data.msg + }) + } is_next = 0; wx.showToast({ title: res.data.msg, icon: 'none', duration: 2000 @@ -1773,7 +1789,7 @@ Page({ setexptype_w: function (t) { var th = this; var ty = t.currentTarget.dataset.t, txt = t.currentTarget.dataset.txt; - th.setData({ [txt]: ty,same_ok:1 }); + th.setData({ [txt]: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'', }); var iszt = 1; if (ty == 0) { th.setData({ is_all_zt: 0 }); @@ -1795,7 +1811,7 @@ Page({ setexptype: function (t) { var th = this; var ty = t.currentTarget.dataset.t; - th.setData({ bn_exp_type: ty, same_ok:1 }); + th.setData({ bn_exp_type: ty, same_ok:1, sameCityExp_off:0, sameCityExp_info:'',}); //当物流为空的时候。 if (ty == 0 && th.data.wu_arr == null) { return th.get_wuliu(th.calculatePrice2()); @@ -2538,6 +2554,10 @@ Page({ } func(isok); }, + //去凑单 + qcd(){ + getApp().goto("/pages/index/index/index"); + }, diff --git a/packageE/pages/cart/cart2_pt/cart2_pt.wxml b/packageE/pages/cart/cart2_pt/cart2_pt.wxml index c0002b3..ddc72c9 100644 --- a/packageE/pages/cart/cart2_pt/cart2_pt.wxml +++ b/packageE/pages/cart/cart2_pt/cart2_pt.wxml @@ -237,11 +237,20 @@ - - 应付金额:¥{{formData.order_amount}} - - - + + + {{sameCityExp_info}} + + + + + + 应付金额:¥{{formData.order_amount}} + + + + + diff --git a/pages/template/index.js b/pages/template/index.js index 0e3929d..3904a01 100644 --- a/pages/template/index.js +++ b/pages/template/index.js @@ -18,6 +18,7 @@ Page({ is_full_screen_navigation_index: -1, //广告轮播满屏下标 nav_title: '首页', nav_frontColor: "#000", + old_nav_frontColor: "", nav_backgroundColor: "#fff", nav_type: 1, //导航类型 searchbox_transparent: 1, //搜索框背景是否透明 @@ -213,7 +214,7 @@ Page({ backgroundColor: temp_data.top_color, // 必写项 }) th.setData({ - // nav_frontColor: top_w_color, // 必写项 + nav_frontColor: top_w_color, // 必写项 nav_backgroundColor: temp_data.top_color, // 必写项 }) } @@ -232,8 +233,13 @@ Page({ }) }, onPageScroll: function (e) { - //满屏模式监听 + //满屏模式监听 let num = e.scrollTop + if (!this.data.old_nav_frontColor) { + this.setData({ + old_nav_frontColor:this.data.nav_frontColor + }) + } if (this.data.is_full_screen_navigation) { let nav_type = this.data.nav_type if (num >= 100 && nav_type) { @@ -248,7 +254,7 @@ Page({ this.setData({ nav_type: 1, searchbox_transparent: 1, - nav_frontColor: '#000' + nav_frontColor: this.data.old_nav_frontColor }) // this.data.nav_type = 1 } -- libgit2 0.21.4