diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index 52edcd1..46efede 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -1432,7 +1432,7 @@ let cartId = res.data.cart_id if (news) { uni.navigateTo({ - url: '/pages/users/order_confirm/index?cartId=' + cartId + url: `/pages/users/order_confirm/index?cartId=${cartId}&sale_type=${that.sale_type}` }); } else { that.$util.Tips({ diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue index 0ed7aed..ec877a7 100644 --- a/pages/order_addcart/order_addcart.vue +++ b/pages/order_addcart/order_addcart.vue @@ -666,7 +666,7 @@ }) if (selectValue.length > 0) { uni.navigateTo({ - url: '/pages/users/order_confirm/index?cartId=' + selectValue.join(',') + url: `/pages/users/order_confirm/index?cartId=${selectValue.join(',')}&sale_type=${this.tabsCurr}` }); } else { return this.$util.Tips({ diff --git a/pages/order_pay_status/index.vue b/pages/order_pay_status/index.vue index da96a6e..8d332fe 100644 --- a/pages/order_pay_status/index.vue +++ b/pages/order_pay_status/index.vue @@ -140,7 +140,8 @@ moneyBg: '/static/images/couponBg', text: '展开更多', timer: null, - payResult: '正在查询支付结果...' + payResult: '正在查询支付结果...', + sale_type: 1 }; }, computed: mapGetters(['isLogin', 'viewColor', 'keyColor']), @@ -151,6 +152,7 @@ tab: 3, url: 1 }); + if(options.sale_type) this.sale_type = options.sale_type; this.orderId = options.order_id; this.order_type = options.order_type; this.status = options.status || 0; @@ -224,20 +226,20 @@ let that = this; if (that.order_type == 20) { uni.navigateTo({ - url: '/pages/points_mall/exchange_record?delte=1' + url: `/pages/points_mall/exchange_record?delte=1&sale_type=${that.sale_type}` }) } else { if (that.order_pay_info.paid == 0) { uni.navigateTo({ - url: '/pages/users/order_list/index' + url: `/pages/users/order_list/index?sale_type=${that.sale_type}` }) } else if (that.order_pay_info && that.order_pay_info.orderList[0]['is_virtual'] == 2) { uni.navigateTo({ - url: '/pages/users/order_list/index?status=3' + url: `/pages/users/order_list/index?status=3&sale_type=${that.sale_type}` }) } else { uni.navigateTo({ - url: '/pages/users/order_list/index?status=1' + url: `/pages/users/order_list/index?status=1&sale_type=${that.sale_type}` }) } } diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index db90e4b..ba000f4 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -754,6 +754,7 @@ isShow: false, moneyInfo: {}, orderData: {}, //支付参数 + sale_type: 1, }; }, computed: { @@ -772,6 +773,7 @@ mounted: function() {}, onLoad: function(options) { this.seckillId = options.seckillId + if(options.sale_type) this.sale_type = options.sale_type; // #ifdef H5 this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5' // #endif @@ -1411,7 +1413,7 @@ orderId = res.data.result.order_id, callback_key = res.data.result.pay_key, jsConfig = res.data.result.config, - goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message; + goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message + '&sale_type=' + that.sale_type; that.orderPay = true; uni.hideLoading(); switch (status) { @@ -1478,7 +1480,7 @@ orderInfo: jsConfig, success: (e) => { let url = '/pages/order_pay_status/index?order_id=' + orderId + - '&msg=支付成功'; + '&msg=支付成功' + '&sale_type=' + that.sale_type; return that.$util.Tips({ title: '支付成功', icon: 'success' @@ -1489,7 +1491,7 @@ }, fail: (e) => { let url = '/pages/order_pay_status/index?order_id=' + orderId + - '&msg=取消支付'; + '&msg=取消支付' + '&sale_type=' + that.sale_type; return that.$util.Tips({ title: '取消支付', }, { @@ -1499,7 +1501,7 @@ }, complete: () => { let url = '/pages/order_pay_status/index?order_id=' + orderId + - '&msg=取消支付'; + '&msg=取消支付' + '&sale_type=' + that.sale_type; return that.$util.Tips({ title: '', }, { @@ -1535,7 +1537,7 @@ }, fail: function(e) { let pages = '/pages/order_pay_status/index?order_id=' + - orderId + '&msg=取消支付' + orderId + '&msg=取消支付' + '&sale_type=' + that.sale_type return that.$util.Tips({ title: '取消支付' }, { @@ -1568,7 +1570,7 @@ case 'h5': let host = window.location.protocol + "//" + window.location.host; let url = - `${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}` + `${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&sale_type=${that.sale_type}` let eUrl = encodeURIComponent(url) let jsurl = jsConfig.mweb_url || jsConfig.h5_url let locations = `${jsurl}&redirect_url=${eUrl}` @@ -1593,7 +1595,7 @@ }, fail: (e) => { let pages = '/pages/order_pay_status/index?order_id=' + - orderId + '&msg=支付失败' + orderId + '&msg=支付失败' + '&sale_type=' + that.sale_type return that.$util.Tips({ title: '支付失败' }, { @@ -1604,7 +1606,7 @@ complete: () => { uni.hideLoading(); let pages = '/pages/order_pay_status/index?order_id=' + - orderId + '&msg=取消支付' + orderId + '&msg=取消支付' + '&sale_type=' + that.sale_type return that.$util.Tips({ title: '' }, { @@ -1617,7 +1619,7 @@ // #endif default: let pages = '/pages/order_pay_status/index?order_id=' + - orderId + '&msg=取消支付' + orderId + '&msg=取消支付' + '&sale_type=' + that.sale_type return that.$util.Tips({ title: '取消支付' }, { diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index 4315e36..c20eb2d 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -9,7 +9,7 @@ 用户订单 - 商户订单 @@ -468,7 +468,7 @@ invoice: false, add: false, }, - mer_info: {} + mer_info: {}, }; }, computed: { @@ -478,7 +478,9 @@ watch: { }, - onLoad() { + onLoad(options) { + if(options.sale_type) this.sale_type = options.sale_type; + if(options.status) this.orderStatus = options.status; let user = this.$store.state.app.userInfo; if(user.mer_info) this.initMerInfo(user); }, @@ -566,12 +568,6 @@ payClose: function() { this.pay_close = false; }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function(options) { - if (options.status) this.orderStatus = options.status; - }, /** * 获取订单统计数据 *