修复bug

This commit is contained in:
weipengfei 2024-03-22 15:30:34 +08:00
parent 3c16481555
commit 30ed1fcdc0
5 changed files with 25 additions and 25 deletions

View File

@ -1432,7 +1432,7 @@
let cartId = res.data.cart_id let cartId = res.data.cart_id
if (news) { if (news) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId url: `/pages/users/order_confirm/index?cartId=${cartId}&sale_type=${that.sale_type}`
}); });
} else { } else {
that.$util.Tips({ that.$util.Tips({

View File

@ -666,7 +666,7 @@
}) })
if (selectValue.length > 0) { if (selectValue.length > 0) {
uni.navigateTo({ 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 { } else {
return this.$util.Tips({ return this.$util.Tips({

View File

@ -140,7 +140,8 @@
moneyBg: '/static/images/couponBg', moneyBg: '/static/images/couponBg',
text: '展开更多', text: '展开更多',
timer: null, timer: null,
payResult: '正在查询支付结果...' payResult: '正在查询支付结果...',
sale_type: 1
}; };
}, },
computed: mapGetters(['isLogin', 'viewColor', 'keyColor']), computed: mapGetters(['isLogin', 'viewColor', 'keyColor']),
@ -151,6 +152,7 @@
tab: 3, tab: 3,
url: 1 url: 1
}); });
if(options.sale_type) this.sale_type = options.sale_type;
this.orderId = options.order_id; this.orderId = options.order_id;
this.order_type = options.order_type; this.order_type = options.order_type;
this.status = options.status || 0; this.status = options.status || 0;
@ -224,20 +226,20 @@
let that = this; let that = this;
if (that.order_type == 20) { if (that.order_type == 20) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/points_mall/exchange_record?delte=1' url: `/pages/points_mall/exchange_record?delte=1&sale_type=${that.sale_type}`
}) })
} else { } else {
if (that.order_pay_info.paid == 0) { if (that.order_pay_info.paid == 0) {
uni.navigateTo({ 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) { } else if (that.order_pay_info && that.order_pay_info.orderList[0]['is_virtual'] == 2) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_list/index?status=3' url: `/pages/users/order_list/index?status=3&sale_type=${that.sale_type}`
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_list/index?status=1' url: `/pages/users/order_list/index?status=1&sale_type=${that.sale_type}`
}) })
} }
} }

View File

@ -754,6 +754,7 @@
isShow: false, isShow: false,
moneyInfo: {}, moneyInfo: {},
orderData: {}, // orderData: {}, //
sale_type: 1,
}; };
}, },
computed: { computed: {
@ -772,6 +773,7 @@
mounted: function() {}, mounted: function() {},
onLoad: function(options) { onLoad: function(options) {
this.seckillId = options.seckillId this.seckillId = options.seckillId
if(options.sale_type) this.sale_type = options.sale_type;
// #ifdef H5 // #ifdef H5
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5' this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
// #endif // #endif
@ -1411,7 +1413,7 @@
orderId = res.data.result.order_id, orderId = res.data.result.order_id,
callback_key = res.data.result.pay_key, callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config, 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; that.orderPay = true;
uni.hideLoading(); uni.hideLoading();
switch (status) { switch (status) {
@ -1478,7 +1480,7 @@
orderInfo: jsConfig, orderInfo: jsConfig,
success: (e) => { success: (e) => {
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=支付成功'; '&msg=支付成功' + '&sale_type=' + that.sale_type;
return that.$util.Tips({ return that.$util.Tips({
title: '支付成功', title: '支付成功',
icon: 'success' icon: 'success'
@ -1489,7 +1491,7 @@
}, },
fail: (e) => { fail: (e) => {
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付'; '&msg=取消支付' + '&sale_type=' + that.sale_type;
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付', title: '取消支付',
}, { }, {
@ -1499,7 +1501,7 @@
}, },
complete: () => { complete: () => {
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付'; '&msg=取消支付' + '&sale_type=' + that.sale_type;
return that.$util.Tips({ return that.$util.Tips({
title: '', title: '',
}, { }, {
@ -1535,7 +1537,7 @@
}, },
fail: function(e) { fail: function(e) {
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' orderId + '&msg=取消支付' + '&sale_type=' + that.sale_type
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
@ -1568,7 +1570,7 @@
case 'h5': case 'h5':
let host = window.location.protocol + "//" + window.location.host; let host = window.location.protocol + "//" + window.location.host;
let url = 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 eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}` let locations = `${jsurl}&redirect_url=${eUrl}`
@ -1593,7 +1595,7 @@
}, },
fail: (e) => { fail: (e) => {
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=支付失败' orderId + '&msg=支付失败' + '&sale_type=' + that.sale_type
return that.$util.Tips({ return that.$util.Tips({
title: '支付失败' title: '支付失败'
}, { }, {
@ -1604,7 +1606,7 @@
complete: () => { complete: () => {
uni.hideLoading(); uni.hideLoading();
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' orderId + '&msg=取消支付' + '&sale_type=' + that.sale_type
return that.$util.Tips({ return that.$util.Tips({
title: '' title: ''
}, { }, {
@ -1617,7 +1619,7 @@
// #endif // #endif
default: default:
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' orderId + '&msg=取消支付' + '&sale_type=' + that.sale_type
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {

View File

@ -9,7 +9,7 @@
<view class="btn_tab"> <view class="btn_tab">
<view class="tab_item" :class="{'tab_item_active': sale_type==1}" @click="changeSaleType(1)"> <view class="tab_item" :class="{'tab_item_active': sale_type==1}" @click="changeSaleType(1)">
用户订单</view> 用户订单</view>
<view v-if="mer_info.mer_settlement_agree_status" class="tab_item" <view v-if="mer_info.mer_settlement_agree_status||sale_type==2" class="tab_item"
:class="{'tab_item_active': sale_type==2}" @click="changeSaleType(2)">商户订单</view> :class="{'tab_item_active': sale_type==2}" @click="changeSaleType(2)">商户订单</view>
</view> </view>
<view class="btn_car" @click="toGwc"> <view class="btn_car" @click="toGwc">
@ -468,7 +468,7 @@
invoice: false, invoice: false,
add: false, add: false,
}, },
mer_info: {} mer_info: {},
}; };
}, },
computed: { computed: {
@ -478,7 +478,9 @@
watch: { 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; let user = this.$store.state.app.userInfo;
if(user.mer_info) this.initMerInfo(user); if(user.mer_info) this.initMerInfo(user);
}, },
@ -566,12 +568,6 @@
payClose: function() { payClose: function() {
this.pay_close = false; this.pay_close = false;
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (options.status) this.orderStatus = options.status;
},
/** /**
* 获取订单统计数据 * 获取订单统计数据
* *