diff --git a/components/cart/cart.vue b/components/cart/cart.vue index b179932f..6840a041 100644 --- a/components/cart/cart.vue +++ b/components/cart/cart.vue @@ -157,21 +157,23 @@ 合计: - {{ currency_symbol }} + {{ buy_currency_symbol }} {{ total_price }} - - - 优惠:{{ currency_symbol }}{{ preferential_price }} - - - - 增加:{{ currency_symbol }}{{ increase_price }} + + + + 优惠:{{ buy_currency_symbol }}{{ preferential_price }} - - 查看明细 - + + + 增加:{{ buy_currency_symbol }}{{ increase_price }} + + + 查看明细 + + @@ -227,15 +229,15 @@ - + 金额明细 - + - + @@ -245,7 +247,7 @@ - + @@ -254,7 +256,7 @@ - {{ new_currency_symbol }}{{ item.price }} + {{ buy_currency_symbol }}{{ item.price }} x{{ item.stock }} @@ -267,22 +269,23 @@ - + + 金额明细 - {{ new_currency_symbol }}{{ all_total_price }} + {{ buy_currency_symbol }}{{ all_total_price }} - + 共减 - {{ new_currency_symbol }}{{ preferential_price }} + {{ buy_currency_symbol }}{{ preferential_price }} - + 共加 - {{ new_currency_symbol }}{{ increase_price }} + {{ buy_currency_symbol }}{{ increase_price }} @@ -329,7 +332,7 @@ increase_price: 0, all_total_price: 0, discount_detail_list: [], - new_currency_symbol: app.globalData.currency_symbol(), + buy_currency_symbol: app.globalData.currency_symbol(), is_selected_all: false, already_selected_status: false, already_valid_selected_status: false, @@ -964,7 +967,7 @@ preferential_price: data.base.preferential_price, increase_price: data.base.increase_price, all_total_price: data.base.total_price, - new_currency_symbol: data.currency_symbol, + buy_currency_symbol: data.currency_symbol, discount_detail_list: data.goods_list, }); } else { @@ -1229,6 +1232,7 @@ discount_detail_open_event(e) { this.setData({ discount_detail_status: !this.discount_detail_status, + discount_detail_goods_list_status: false, }); }, // 关闭优惠明细弹窗 @@ -1467,11 +1471,25 @@ /** * 查看明细弹窗 */ + .discount_detail-popup-title { + position: absolute; + left: 0; + right: 0; + background: #f6f6f6; + top: 0; + z-index: 2; + padding: 24rpx; + } + .discount_detail-popup-goods-list { + margin-top: 84rpx; + } .discount-detail-popup-z-index { z-index: 1002; } .discount_detail-popup { margin-bottom: 122rpx; + height: calc(70vh - 122rpx); + overflow-y: auto; } .scroll-box-popup { height: 480rpx; diff --git a/pages/buy/buy.vue b/pages/buy/buy.vue index e4f87fea..d5983c66 100644 --- a/pages/buy/buy.vue +++ b/pages/buy/buy.vue @@ -79,12 +79,7 @@ - + 优惠劵 {{ (plugins_choice_coupon_value || null) != null && (plugins_choice_coupon_value[group.id] || null) != null ? plugins_choice_coupon_value[group.id] : '请选择优惠券' }} @@ -136,7 +131,7 @@ -{{ currency_symbol }}{{ plugins_points_data.discount_price }} - + @@ -155,16 +150,7 @@ {{ buy_datetime_info.title }} - + {{ buy_datetime_info.placeholder }} {{ buy_datetime_info.value }} @@ -178,14 +164,14 @@ - {{ user_note_value || '留言' }} + {{ user_note_value || '留言' }} 快捷输入 - {{ item }} + {{ item }} @@ -290,17 +276,7 @@ - + @@ -385,7 +361,7 @@ componentNoData, componentTimeSelect, componentPayment, - componentBuyOrdergoodsform + componentBuyOrdergoodsform, }, props: {}, @@ -469,7 +445,7 @@ } // 是否门店订单 - if((this.params.realstore_id || null) != null) { + if ((this.params.realstore_id || null) != null) { var realstore_order_page = '/pages/plugins/realstore/orderallot-list/orderallot-list'; this.setData({ to_page_back: { @@ -568,9 +544,9 @@ }); // 可使用积分数量 - if(this.plugins_points_data != null && this.is_first == 1) { + if (this.plugins_points_data != null && this.is_first == 1) { this.setData({ - actual_use_integral: this.plugins_points_data.use_integral || '' + actual_use_integral: this.plugins_points_data.use_integral || '', }); } @@ -653,7 +629,7 @@ // 积分 data['is_points'] = this.plugins_points_status === true ? 1 : 0; - if(data['is_points'] == 1) { + if (data['is_points'] == 1) { data['actual_use_integral'] = this.actual_use_integral; } return data; @@ -684,9 +660,9 @@ note_fast_event(e) { var value = e.currentTarget.dataset.value; var user_note = this.user_note_value || ''; - if(user_note != '') { + if (user_note != '') { // 已存在则不追加 - if(user_note.indexOf(value) != -1) { + if (user_note.indexOf(value) != -1) { return false; } // 有数据组则增加分割符号 @@ -695,9 +671,9 @@ user_note += value; // 大于限定长度则不增加 - if(user_note.length <= 230) { + if (user_note.length <= 230) { this.setData({ - user_note_value: user_note + user_note_value: user_note, }); } }, @@ -726,9 +702,9 @@ // 订单商品表单插件数据验证处理 var buy_ordergoodsform = this.$refs.buy_ordergoodsform || []; - if(buy_ordergoodsform.length > 0) { - for(var i in buy_ordergoodsform) { - if(!buy_ordergoodsform[i].data_check()) { + if (buy_ordergoodsform.length > 0) { + for (var i in buy_ordergoodsform) { + if (!buy_ordergoodsform[i].data_check()) { return false; } } @@ -790,32 +766,32 @@ }, // 订单提交响应处理 - buy_submit_response_handle(res) { - // 是否预约模式,则进入订单列表 - if(res.data.order_status == 0) { - var self = this; - uni.showModal({ - title: '温馨提示', - content: res.msg, - confirmText: '确认', - showCancel: false, - success(res) { - uni.redirectTo({ - url: self.to_appoint_page - }); - }, - fail(res) { - uni.redirectTo({ - url: this.to_appoint_page - }); - }, - }); - } else { - // 调用支付 - this.setData({ - to_appoint_page: this.to_appoint_page+'?order_ids=' + res.data.order_ids.join(','), - }); - this.$refs.payment.pay_handle(res.data.order_ids.join(','), res.data.payment_id, this.payment_list); + buy_submit_response_handle(res) { + // 是否预约模式,则进入订单列表 + if (res.data.order_status == 0) { + var self = this; + uni.showModal({ + title: '温馨提示', + content: res.msg, + confirmText: '确认', + showCancel: false, + success(res) { + uni.redirectTo({ + url: self.to_appoint_page, + }); + }, + fail(res) { + uni.redirectTo({ + url: this.to_appoint_page, + }); + }, + }); + } else { + // 调用支付 + this.setData({ + to_appoint_page: this.to_appoint_page + '?order_ids=' + res.data.order_ids.join(','), + }); + this.$refs.payment.pay_handle(res.data.order_ids.join(','), res.data.payment_id, this.payment_list); } }, @@ -829,14 +805,14 @@ // 优惠劵弹层开启 plugins_coupon_open_event(e) { - var index = e.currentTarget.dataset.index; - var coupon_data = this.plugins_coupon_data[index]['coupon_data']; + var index = e.currentTarget.dataset.index; + var coupon_data = this.plugins_coupon_data[index]['coupon_data']; var coupon_choice = coupon_data.coupon_choice || null; var temp_list = coupon_data.coupon_list || []; // 选中处理 if (temp_list.length > 0) { for (var i in temp_list) { - temp_list[i]['is_active'] = (coupon_choice.id == temp_list[i]['id']) ? 1 : 0; + temp_list[i]['is_active'] = (coupon_choice || null) !== null && (coupon_choice.id == temp_list[i]['id']) ? 1 : 0; } } this.setData({ @@ -860,9 +836,9 @@ var temp_ids = this.plugins_use_coupon_ids; if (this.popup_plugins_coupon_index !== null && temp_ids.indexOf(value) == -1) { var temp_data = this.plugins_coupon_data[this.popup_plugins_coupon_index]; - var temp_list = this.plugins_coupon_list; - // 当前索引数据已选中则不处理 - if((temp_list[index]['is_active'] || 0) != 1) { + var temp_list = this.plugins_coupon_list; + // 当前索引数据已选中则不处理 + if ((temp_list[index]['is_active'] || 0) != 1) { // 选中处理 for (var i in temp_list) { temp_list[i]['is_active'] = index == i ? 1 : 0; @@ -877,7 +853,7 @@ }); // 重新获取数据 - this.init(); + this.init(); } } }, @@ -970,7 +946,7 @@ points_use_value_event(e) { var value = parseInt(e.detail.value || 0); var use_integral = parseInt(this.plugins_points_data.use_integral || 0); - if(value > use_integral && use_integral > 0) { + if (value > use_integral && use_integral > 0) { value = use_integral; } this.setData({