Commit d956ed89 by songbingqi

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

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