diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index d222d50..2027341 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -134,6 +134,16 @@ + + + 本商户积分抵扣 + 使用{{item.order.use_mer_integral}}积分抵扣{{item.order.use_mer_integral_price}} + + + 平台积分抵扣 + 使用{{item.order.use_platform_integral}}积分抵扣{{item.order.use_platform_integral_price}} + + 快递费用 (尾款阶段) @@ -325,17 +335,38 @@ 店铺优惠金额: -¥{{coupon_price}} - + 积分抵扣: - + + + 持有相关商户积分{{hold_mer_integral}} + + 使用了{{order_use_mer_integral}}个商户积分,共抵扣{{order_use_mer_integral_price}}元 + + + + + + + + 持有平台积分{{hold_platform_integral}} + + 使用了{{order_use_platform_integral}}个平台积分,共抵扣{{order_use_platform_integral_price}}元 + + + + + + + + @@ -563,8 +594,17 @@ priceGroup: {}, animated: false, totalPrice: 0, - use_integral: false, - pagesUrl: "", + // use_integral: false, + use_mer_integral: false,// 是否使用商户积分 + use_platform_integral: false,// 是否使用平台积分 + order_use_mer_integral: 0,// 使用的商户总积分 + order_use_mer_integral_price: 0,// 商户积分抵扣的总金额 + order_use_platform_integral: 0,// 使用的平台总积分 + order_use_platform_integral_price: 0,// 平台积分抵扣的总金额 + hold_mer_integral: 0,// 用户持有的当前订单相关商户总商户积分 + hold_platform_integral: 0,// 用户持有的平台积分总数 + is_has_integral_use: 0, + pagesUrl: "", orderKey: "", offlinePostage: "", isAuto: false, //没有授权的不会自动授权 @@ -712,8 +752,11 @@ changeIsAgree: function(e) { this.isAgree = !this.isAgree; }, - changeIntegral: function(e) { - this.use_integral = !this.use_integral; + changeIntegral: function(type) { + console.log("--------- 变更类型 ---------------",type); + // this.use_integral = !this.use_integral; + if(type === 'mer') this.use_mer_integral = !this.use_mer_integral; + if(type === 'platform') this.use_platform_integral = !this.use_platform_integral; this.getConfirm(this.addressId); }, showPresellAgree(){ @@ -973,8 +1016,10 @@ address_id: address_id, takes: that.take, use_coupon: that.subCoupon, - use_integral: that.use_integral - }).then(res => { + // use_integral: that.use_integral, + use_mer_integral: that.use_mer_integral, + use_platform_integral: that.use_platform_integral, + }).then(res => { // 默认选中 that.is_take = false res.data.order.forEach(el => { @@ -1011,7 +1056,16 @@ that.$set(that, 'integral_count', res.data.order_total_integral); that.$set(that, 'integral_price', res.data.order_total_integral_price); that.$set(that, 'open_integral', res.data.openIntegral); - that.$set(that, 'use_integral', res.data.useIntegral); + // that.$set(that, 'use_integral', res.data.useIntegral); + that.$set(that, 'use_mer_integral', res.data.useMerIntegral); + that.$set(that, 'use_platform_integral', res.data.usePlatformIntegral); + that.$set(that, 'order_use_mer_integral', res.data.order_use_mer_integral); + that.$set(that, 'order_use_mer_integral_price', res.data.order_use_mer_integral_price); + that.$set(that, 'order_use_platform_integral', res.data.order_use_platform_integral); + that.$set(that, 'order_use_platform_integral_price', res.data.order_use_platform_integral_price); + that.$set(that, 'hold_mer_integral', res.data.hold_mer_integral); + that.$set(that, 'hold_platform_integral', res.data.hold_platform_integral); + that.$set(that, 'is_has_integral_use', res.data.is_has_integral_use); that.$set(that, 'order_extend', (that.order_extend && that.order_extend.length>0) ? that.order_extend : res.data.order_extend); that.totalPrice = res.data.order_price that.orderStatus = res.data.status @@ -1473,7 +1527,9 @@ order_type: this.order_type, key: this.order_key, takes: this.take, - use_integral: this.use_integral, + // use_integral: this.use_integral, + use_mer_integral: this.use_mer_integral, + use_platform_integral: this.use_platform_integral, receipt_data: this.invoiceData, extend: this.extend, post: this.post, @@ -1600,6 +1656,31 @@