Commit d956ed89 by songbingqi

修改结算页跳转订单详情返回逻辑

parent 4c5c7ff2
......@@ -126,7 +126,8 @@ export default {
Utils,
isBuild:true,
waitTime:0,
backFlag:false
backFlag:false,
backToMneu:false
}
},
methods: {
......@@ -141,7 +142,11 @@ export default {
},
goBack(){
if(this.backFlag){
uni.switchTab({ url: '/pages/order/order' })
if(this.backToMneu){
uni.switchTab({ url: '/pages/menu/menu' })
}else{
uni.switchTab({ url: '/pages/order/order' })
}
this.backFlag = false
}
},
......@@ -179,12 +184,18 @@ export default {
},
async initData(option){
this.getSystemInfo()
this.backToMneu = false
this.backFlag = true
let oId = uni.getStorageSync('orderId');
console.log(option,'option')
// 从订阅消息进入
if(JSON.stringify(option)!=='{}'&&option){
this.option = JSON.stringify(option)
const { orderId = '' } = option
const { orderId = '',from = '' } = option
// 从结算进入
if(from==='settlement'){
this.backToMneu = true
}
// 从订阅消息进入
let Authorization = uni.getStorageSync('Authorization')
if(orderId){
console.log(!Authorization,Authorization)
......@@ -197,8 +208,6 @@ export default {
oId = orderId
}
}
}else{
this.backFlag = true
}
// return
const {data = {}} = await Order.getOrderDetail({orderId:oId})
......
......@@ -25,7 +25,6 @@ module.exports = (vm) => {
// 请求拦截
uni.$u.http.interceptors.request.use(
(config) => {
console.log(config)
const {noLoading = false} = config.custom
// 可使用async await 做异步操作
if(!noLoading){
......
......@@ -63,7 +63,7 @@ export default {
$EventBus.$emit('updateCar');
uni.setStorageSync('orderId', data.orderId);
if(switchTab){
let url = '/orderSubPackage/pages/orderInfo/index'
let url = '/orderSubPackage/pages/orderInfo/index?from=settlement'
uni.navigateTo({ url })
}else{
callBack()
......@@ -81,7 +81,7 @@ export default {
$EventBus.$emit('updateCar');
uni.setStorageSync('orderId', data.orderId);
if(switchTab){
let url = '/orderSubPackage/pages/orderInfo/index'
let url = '/orderSubPackage/pages/orderInfo/index?from=settlement'
uni.navigateTo({ url })
}else{
callBack()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment