Commit 31af7555ccb075c1feeefc75e193f3d5626ccd6d
Merge branch 'dev' into 'test'
选择方式优化 See merge request !1052
Showing
9 changed files
with
25 additions
and
16 deletions
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
| @@ -499,6 +499,9 @@ Page({ | @@ -499,6 +499,9 @@ Page({ | ||
| 499 | console.log('calculatePrice2'); | 499 | console.log('calculatePrice2'); | 
| 500 | var th = this, | 500 | var th = this, | 
| 501 | good = this.data.bn_goods; | 501 | good = this.data.bn_goods; | 
| 502 | + | ||
| 503 | + th.setData({is_show_sub:0}); | ||
| 504 | + | ||
| 502 | //-----------计算商品总价-------------- | 505 | //-----------计算商品总价-------------- | 
| 503 | var allpice = th.data.param.goods_price; | 506 | var allpice = th.data.param.goods_price; | 
| 504 | allpice = parseFloat(allpice).toFixed(2); | 507 | allpice = parseFloat(allpice).toFixed(2); | 
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | <form bindsubmit="submitConfirm"> | 2 | <form bindsubmit="submitConfirm"> | 
| 3 | <view class="container"> | 3 | <view class="container"> | 
| 4 | 4 | ||
| 5 | + <block wx:if="{{is_show_sub}}"> | ||
| 5 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | 6 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | 
| 6 | <view class="tab-wrapper"> | 7 | <view class="tab-wrapper"> | 
| 7 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 8 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 
| @@ -12,7 +13,7 @@ | @@ -12,7 +13,7 @@ | ||
| 12 | 13 | ||
| 13 | </view> | 14 | </view> | 
| 14 | </view> | 15 | </view> | 
| 15 | - | 16 | + </block> | 
| 16 | 17 | ||
| 17 | <!--要进行判断地址是否显示----> | 18 | <!--要进行判断地址是否显示----> | 
| 18 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | 19 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | 
packageC/pages/presell/cart/cart.js
| @@ -608,7 +608,6 @@ Page({ | @@ -608,7 +608,6 @@ Page({ | ||
| 608 | goods: goods, | 608 | goods: goods, | 
| 609 | presell: presell, | 609 | presell: presell, | 
| 610 | pre_arr: pre_arr, | 610 | pre_arr: pre_arr, | 
| 611 | - show_submit: 1, | ||
| 612 | userInfo: getApp().globalData.userInfo, | 611 | userInfo: getApp().globalData.userInfo, | 
| 613 | tail_pay: tail_pay, | 612 | tail_pay: tail_pay, | 
| 614 | order_goods: order_goods, | 613 | order_goods: order_goods, | 
| @@ -630,6 +629,8 @@ Page({ | @@ -630,6 +629,8 @@ Page({ | ||
| 630 | async calculatePrice2() { | 629 | async calculatePrice2() { | 
| 631 | var th = this; | 630 | var th = this; | 
| 632 | if (!this.data.pre_arr) return false; | 631 | if (!this.data.pre_arr) return false; | 
| 632 | + th.setData({ show_submit: 0,}) | ||
| 633 | + | ||
| 633 | //--计算物流-- | 634 | //--计算物流-- | 
| 634 | if (this.data.exp_type == 0) { | 635 | if (this.data.exp_type == 0) { | 
| 635 | this.calculate_wuliu(); | 636 | this.calculate_wuliu(); | 
| @@ -715,12 +716,12 @@ Page({ | @@ -715,12 +716,12 @@ Page({ | ||
| 715 | 716 | ||
| 716 | o_condition1 = parseFloat(o_condition1) - parseFloat(th.data.presell.presell_deposit); | 717 | o_condition1 = parseFloat(o_condition1) - parseFloat(th.data.presell.presell_deposit); | 
| 717 | if (o_condition1 < 0) o_condition1 = 0; | 718 | if (o_condition1 < 0) o_condition1 = 0; | 
| 718 | - th.setData({ exp_price: 0, order_m: o_condition1 }) | 719 | + th.setData({ exp_price: 0, order_m: o_condition1, show_submit: 1, }) | 
| 719 | }) | 720 | }) | 
| 720 | } else { | 721 | } else { | 
| 721 | o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); | 722 | o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); | 
| 722 | if (o_condition < 0) o_condition = 0; | 723 | if (o_condition < 0) o_condition = 0; | 
| 723 | - th.setData({ exp_price: 0, order_m: o_condition }) | 724 | + th.setData({ exp_price: 0, order_m: o_condition, show_submit: 1, }) | 
| 724 | } | 725 | } | 
| 725 | } | 726 | } | 
| 726 | }, | 727 | }, | 
| @@ -1952,14 +1953,14 @@ Page({ | @@ -1952,14 +1953,14 @@ Page({ | ||
| 1952 | 1953 | ||
| 1953 | ord_price = parseFloat(ord_price) - parseFloat(th.data.presell.presell_deposit); | 1954 | ord_price = parseFloat(ord_price) - parseFloat(th.data.presell.presell_deposit); | 
| 1954 | if (ord_price < 0) ord_price = 0; | 1955 | if (ord_price < 0) ord_price = 0; | 
| 1955 | - th.setData({ exp_price: exp_price, order_m: ord_price + parseFloat(exp_price) }) | 1956 | + th.setData({ exp_price: exp_price, order_m: ord_price + parseFloat(exp_price), show_submit: 1, }) | 
| 1956 | 1957 | ||
| 1957 | }) | 1958 | }) | 
| 1958 | } else { | 1959 | } else { | 
| 1959 | 1960 | ||
| 1960 | var o_condition1 = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); | 1961 | var o_condition1 = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); | 
| 1961 | if (o_condition1 < 0) o_condition1 = 0; | 1962 | if (o_condition1 < 0) o_condition1 = 0; | 
| 1962 | - th.setData({ exp_price: exp_price, order_m: parseFloat(o_condition1) + parseFloat(exp_price) }) | 1963 | + th.setData({ exp_price: exp_price, order_m: parseFloat(o_condition1) + parseFloat(exp_price), show_submit: 1, }) | 
| 1963 | } | 1964 | } | 
| 1964 | }, | 1965 | }, | 
| 1965 | 1966 | 
packageC/pages/presell/cart/cart.wxml
| @@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
| 108 | </view> | 108 | </view> | 
| 109 | </view>--> | 109 | </view>--> | 
| 110 | 110 | ||
| 111 | - <block wx:if="{{wait_wk}}"> | 111 | + <block wx:if="{{wait_wk && show_submit}}"> | 
| 112 | <!-- 立即购买的时候 --> | 112 | <!-- 立即购买的时候 --> | 
| 113 | <view class="tab-wrapper"> | 113 | <view class="tab-wrapper"> | 
| 114 | <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' | 114 | <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' | 
packageC/pages/presell/cart/cart2.wxml
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | <view class="container"> | 6 | <view class="container"> | 
| 7 | 7 | ||
| 8 | <!-- 立即购买的时候 --> | 8 | <!-- 立即购买的时候 --> | 
| 9 | - <view class="tab-container"> | 9 | + <view class="tab-container" wx:if="{{show_submit}}"> | 
| 10 | <view class="tab-wrapper"> | 10 | <view class="tab-wrapper"> | 
| 11 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 11 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 
| 12 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | 12 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | 
pages/cart/cart2/cart2.wxml
| @@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
| 4 | 4 | ||
| 5 | <form> | 5 | <form> | 
| 6 | <view class="container"> | 6 | <view class="container"> | 
| 7 | + <block wx:if="{{show_submit}}"> | ||
| 7 | <!-- 立即购买的时候 --> | 8 | <!-- 立即购买的时候 --> | 
| 8 | <block wx:if="{{is_b_now==1}}"> | 9 | <block wx:if="{{is_b_now==1}}"> | 
| 9 | <view class="tab-container"> | 10 | <view class="tab-container"> | 
| @@ -26,6 +27,7 @@ | @@ -26,6 +27,7 @@ | ||
| 26 | </view> | 27 | </view> | 
| 27 | </view> | 28 | </view> | 
| 28 | </block> | 29 | </block> | 
| 30 | + </block> | ||
| 29 | 31 | ||
| 30 | <!--要进行判断地址是否显示----> | 32 | <!--要进行判断地址是否显示----> | 
| 31 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'> | 33 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'> | 
| @@ -126,7 +128,7 @@ | @@ -126,7 +128,7 @@ | ||
| 126 | </view> | 128 | </view> | 
| 127 | 129 | ||
| 128 | <!-- 当是物流很多单的时候 --> | 130 | <!-- 当是物流很多单的时候 --> | 
| 129 | - <view class="use-item flex-space-between" wx:if="{{cartlist.length>1}}"> | 131 | + <view class="use-item flex-space-between" wx:if="{{cartlist.length>1 && show_submit}}"> | 
| 130 | <view class="flex-vertical"> | 132 | <view class="flex-vertical"> | 
| 131 | <view bindtap='setexptype_w2' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};"> | 133 | <view bindtap='setexptype_w2' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};"> | 
| 132 | <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> --> | 134 | <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> --> | 
pages/cart/cart2_inte/cart2_inte.wxml
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <form bindsubmit="submitForm"> | 5 | <form bindsubmit="submitForm"> | 
| 6 | <view class="container"> | 6 | <view class="container"> | 
| 7 | 7 | ||
| 8 | - <view class="tab-container"> | 8 | + <view class="tab-container" wx:if="{{show_submit}}"> | 
| 9 | <view class="tab-wrapper"> | 9 | <view class="tab-wrapper"> | 
| 10 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 10 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 
| 11 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | 11 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | 
pages/cart/cart2_pt/cart2_pt.js
| @@ -62,7 +62,8 @@ Page({ | @@ -62,7 +62,8 @@ Page({ | ||
| 62 | rank_switch: 0, //是不是开同等级卡 | 62 | rank_switch: 0, //是不是开同等级卡 | 
| 63 | show_card: null, //显示的等级卡 | 63 | show_card: null, //显示的等级卡 | 
| 64 | card_name: '', //显示的卡的名称 | 64 | card_name: '', //显示的卡的名称 | 
| 65 | - card_cut_price: null,//减价多少钱 | 65 | + card_cut_price: null,//减价多少钱 | 
| 66 | + show_btn:0, | ||
| 66 | }, | 67 | }, | 
| 67 | onLoad: function (t) { | 68 | onLoad: function (t) { | 
| 68 | console.log("onLoad_pt_cart"); | 69 | console.log("onLoad_pt_cart"); | 
| @@ -536,14 +537,14 @@ Page({ | @@ -536,14 +537,14 @@ Page({ | ||
| 536 | //--------------如果使用余额--------------------- | 537 | //--------------如果使用余额--------------------- | 
| 537 | if (th.data.bn_use_money == 1 && th.data.yuer > 0) { | 538 | if (th.data.bn_use_money == 1 && th.data.yuer > 0) { | 
| 538 | if (parseFloat(th.data.yuer) > total_m) { | 539 | if (parseFloat(th.data.yuer) > total_m) { | 
| 539 | - th.setData({ [txt]: total_m, [txt2]: 0,submit:0 }) | 540 | + th.setData({ [txt]: total_m, [txt2]: 0,submit:0,show_btn:1 }) | 
| 540 | } else { | 541 | } else { | 
| 541 | order_m = parseFloat(order_m) - parseFloat(th.data.yuer); | 542 | order_m = parseFloat(order_m) - parseFloat(th.data.yuer); | 
| 542 | order_m = order_m.toFixed(2); | 543 | order_m = order_m.toFixed(2); | 
| 543 | - th.setData({ [txt]: th.data.yuer, [txt2]: order_m,submit:0 }) | 544 | + th.setData({ [txt]: th.data.yuer, [txt2]: order_m,submit:0,show_btn:1 }) | 
| 544 | } | 545 | } | 
| 545 | } else { | 546 | } else { | 
| 546 | - th.setData({ [txt]: 0, [txt2]: order_m,submit:0 }) | 547 | + th.setData({ [txt]: 0, [txt2]: order_m,submit:0,show_btn:1 }) | 
| 547 | } | 548 | } | 
| 548 | 549 | ||
| 549 | wx.hideLoading(); | 550 | wx.hideLoading(); | 
pages/cart/cart2_pt/cart2_pt.wxml
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | <form bindsubmit="submitForm"> | 2 | <form bindsubmit="submitForm"> | 
| 3 | <view class="container"> | 3 | <view class="container"> | 
| 4 | 4 | ||
| 5 | + <block wx:if="{{show_btn}}"> | ||
| 5 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | 6 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | 
| 6 | <view class="tab-wrapper"> | 7 | <view class="tab-wrapper"> | 
| 7 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 8 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 
| @@ -12,7 +13,7 @@ | @@ -12,7 +13,7 @@ | ||
| 12 | 13 | ||
| 13 | </view> | 14 | </view> | 
| 14 | </view> | 15 | </view> | 
| 15 | - | 16 | + </block> | 
| 16 | 17 | ||
| 17 | <!--要进行判断地址是否显示----> | 18 | <!--要进行判断地址是否显示----> | 
| 18 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | 19 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | 
| @@ -153,7 +154,7 @@ | @@ -153,7 +154,7 @@ | ||
| 153 | </view> | 154 | </view> | 
| 154 | </view> | 155 | </view> | 
| 155 | 156 | ||
| 156 | - <view class="btn-wrap"> | 157 | + <view class="btn-wrap" wx:if="{{show_btn}}"> | 
| 157 | <view class="pay-amount"> | 158 | <view class="pay-amount"> | 
| 158 | <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | 159 | <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | 
| 159 | <!-- <view class="co-red big"></view> --> | 160 | <!-- <view class="co-red big"></view> --> | 
