diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index edcf86f..e9a5ec1 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -1465,6 +1465,7 @@ Page({
//-------------------计算订单价格-------------------
calculatePrice:async function (t, s) {
var th = this;
+ th.setData({submit:1});
wx.showLoading({
title: "处理中.",
@@ -1992,7 +1993,7 @@ Page({
[atxt]: all_total_m, [atxt1]: all_order_m,
[atxt2]: all_price, [atxt3]: all_user_m, [atxt4]: all_shipping_m,
[atxt5]: all_coupon_price_m, [atxt6]: all_cutprice,
- [atxt7]: all_order_prom, show_submit: 1, [atxt8]: all_zh_cutprice, [atxt9]: all_ladder_cutprice
+ [atxt7]: all_order_prom, show_submit: 1, [atxt8]: all_zh_cutprice, [atxt9]: all_ladder_cutprice,submit:0
})
th.data.order_prom_list_cart = c_arr;
th.set_can_num();
@@ -2043,6 +2044,7 @@ Page({
return false;
}
+ th.setData({submit:1});
wx.showLoading({
title: "处理中.",
mask:true
@@ -2368,14 +2370,14 @@ Page({
if (th.data.bn_use_money == 1) {
if (amoney > order_m) {
order_m = parseFloat(order_m).toFixed(2);
- th.setData({ [txt]: order_m, [txt2]: 0, [txt3]: coupon_price, show_submit: 1 })
+ th.setData({ [txt]: order_m, [txt2]: 0, [txt3]: coupon_price, show_submit: 1,submit:0 })
} else {
order_m = parseFloat(order_m) - parseFloat(amoney);
order_m = order_m.toFixed(2);
- th.setData({ [txt]: amoney, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1 })
+ th.setData({ [txt]: amoney, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1,submit:0 })
}
} else {
- th.setData({ [txt]: 0, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1 })
+ th.setData({ [txt]: 0, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1,submit:0 })
}
//优惠活动送积分
if (good.s_intValue) {
@@ -2435,14 +2437,14 @@ Page({
if (th.data.bn_use_money == 1) {
if (amoney > order_m) {
order_m = parseFloat(order_m).toFixed(2);
- th.setData({ [txt]: order_m, [txt2]: 0, [txt3]: coupon_price, show_submit: 1 })
+ th.setData({ [txt]: order_m, [txt2]: 0, [txt3]: coupon_price, show_submit: 1 ,submit:0})
} else {
order_m = parseFloat(order_m) - parseFloat(amoney);
order_m = order_m.toFixed(2);
- th.setData({ [txt]: amoney, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1 })
+ th.setData({ [txt]: amoney, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1,submit:0 })
}
} else {
- th.setData({ [txt]: 0, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1 })
+ th.setData({ [txt]: 0, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1,submit:0 })
}
//优惠活动送积分
if (good.s_intValue) {
@@ -2928,10 +2930,6 @@ Page({
var df_price = 0;
var df_room_ids = "";
-
-
-
-
//-------------让商品添加到商品列表--------------------
for (var k = 0; k < t_item.goods.length; k++) {
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index db2038f..0808679 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/pages/cart/cart2_pt/cart2_pt.js
@@ -396,10 +396,12 @@ Page({
//---------计算立即购买----------
calculatePrice2:async function () {
- wx.showLoading({
+ this.setData({submit:1});
+
+ wx.showLoading({
title: "处理中.",
mask:true
- })
+ })
var th = this, good = this.data.bn_goods;
//-----------计算商品总价--------------
@@ -533,14 +535,14 @@ Page({
//--------------如果使用余额---------------------
if (th.data.bn_use_money == 1 && th.data.yuer > 0) {
if (parseFloat(th.data.yuer) > total_m) {
- th.setData({ [txt]: total_m, [txt2]: 0 })
+ th.setData({ [txt]: total_m, [txt2]: 0,submit:0 })
} else {
order_m = parseFloat(order_m) - parseFloat(th.data.yuer);
order_m = order_m.toFixed(2);
- th.setData({ [txt]: th.data.yuer, [txt2]: order_m })
+ th.setData({ [txt]: th.data.yuer, [txt2]: order_m,submit:0 })
}
} else {
- th.setData({ [txt]: 0, [txt2]: order_m })
+ th.setData({ [txt]: 0, [txt2]: order_m,submit:0 })
}
wx.hideLoading();
diff --git a/pages/cart/cart2_pt/cart2_pt.wxml b/pages/cart/cart2_pt/cart2_pt.wxml
index bfb15a0..f2335b4 100644
--- a/pages/cart/cart2_pt/cart2_pt.wxml
+++ b/pages/cart/cart2_pt/cart2_pt.wxml
@@ -158,7 +158,7 @@
应付金额:¥{{formData.order_amount}}
-
+
diff --git a/pages/cart/cart_wk/cart_wk.js b/pages/cart/cart_wk/cart_wk.js
index 6dc8685..7748cdc 100644
--- a/pages/cart/cart_wk/cart_wk.js
+++ b/pages/cart/cart_wk/cart_wk.js
@@ -40,6 +40,7 @@ Page({
show_pay_type: 0,
teamgroup: null,
+ submit:1, //默认按钮是灰色
},
/**
@@ -71,7 +72,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
- getApp().check_can_share();
+ getApp().check_can_share();
var th = this;
if (th.data.isclose == 0) {
wx.navigateTo({
@@ -96,7 +97,7 @@ Page({
/**
* 用户点击右上角分享
*/
- onShareAppMessage: function () { getApp().globalData.no_clear=1 },
+ onShareAppMessage: function () { getApp().globalData.no_clear=1 },
//---------------获取物流---------------
get_wuliu(func) {
var th = this,
@@ -330,6 +331,8 @@ Page({
//--计算物流的值--
if (type == 0) {
+
+ th.setData({submit:0})
th.calculate_wuliu();
} else {
var allpice = parseFloat(th.data.order.order_amount)
@@ -348,11 +351,19 @@ Page({
},
//--弹起支付框--
to_pay() {
+
+
+ //如果有再计算价格的过程中,不能提交订单
+ if(submit){ return false}
+
//--物流支付时要有地址--
if (this.data.exp_type == 0 && this.data.user_addr == null) {
return getApp().my_warnning("请选择收货地址", 0, this);
}
+
+
+
this.setData({ show_pay_type: 1 });
},
@@ -474,6 +485,8 @@ Page({
//----计算物流的钱----
async calculate_wuliu() {
+ //让按钮变灰色
+ th.setData({submit:1});
var to = getApp(), th = this;
//to.getwuliuprice(async function (rs) {
var o_shipping_price = 0, goods_weight = -1, goods_piece = -1, good = th.data.goods;
@@ -568,13 +581,14 @@ Page({
await getApp().request.promisePost('/api/weshop/order/getOrderWuLiPrice', {data:w_data,is_json:1}).then(res=>{
if(res.data.code==0){
shipping_price=res.data.data; is_ok=1;
+ }else{
+ wx.showToast({
+ title: "计算物流错误:"+res.data.msg, icon: 'none',duration: 2000
+ })
}
})
if(!is_ok){
- wx.showToast({
- title: "计算物流错误", icon: 'none',duration: 2000
- })
- th.setData({ show_submit:0 });
+ th.setData({ submit:0 });
wx.hideLoading();
return false;
}
@@ -584,11 +598,11 @@ Page({
allpice = allpice.toFixed(2);
exp_price = parseFloat(exp_price);
- th.setData({ exp_price: exp_price, allpice: allpice })
+ th.setData({ exp_price: exp_price, allpice: allpice,submit:0 })
} else {
var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.tail_money;
allpice = allpice.toFixed(2);
- th.setData({ exp_price: 0, allpice: allpice })
+ th.setData({ exp_price: 0, allpice: allpice,submit:0})
}
//});
diff --git a/pages/cart/cart_wk/cart_wk.wxml b/pages/cart/cart_wk/cart_wk.wxml
index dca4ecd..4e58a03 100644
--- a/pages/cart/cart_wk/cart_wk.wxml
+++ b/pages/cart/cart_wk/cart_wk.wxml
@@ -110,7 +110,7 @@
¥{{filters.toFix(order.tail_money+exp_price,2)}}
-->
支付合计:¥{{filters.toFix(order.tail_money+exp_price,2)}}
- 支付尾款
+ 支付尾款
diff --git a/pages/cart/cart_wk/cart_wk.wxss b/pages/cart/cart_wk/cart_wk.wxss
index 282ca14..bd6b927 100644
--- a/pages/cart/cart_wk/cart_wk.wxss
+++ b/pages/cart/cart_wk/cart_wk.wxss
@@ -288,7 +288,11 @@ page {
color: #c4182e;
}
-/*----------nyf新增,地址---------*/
+.zf_btn.gray{
+ background-color:darkgrey;
+}
+
+ /*----------nyf新增,地址---------*/
.add_new{
box-sizing: border-box;
height: 92rpx;