调整 入口页面跳转逻辑
parent
4a489c04cf
commit
9740568620
|
|
@ -23,9 +23,7 @@
|
|||
// 优先存储 invite_code
|
||||
if (scene.i) {
|
||||
uni.setStorageSync('INVITE_CODE', scene.i)
|
||||
|
||||
}
|
||||
|
||||
// 产品详细页
|
||||
if (scene.p) {
|
||||
uni.redirectTo({
|
||||
|
|
@ -33,45 +31,17 @@
|
|||
})
|
||||
}
|
||||
// 扫码下单
|
||||
// else if (scene.o) {
|
||||
// setTimeout(async () => {
|
||||
// uni.showLoading({
|
||||
// title: '加载中',
|
||||
// mask: true
|
||||
// });
|
||||
// const obj = {
|
||||
// id: scene.order_pre
|
||||
// }
|
||||
// const { order_id } = await this.$api.post(`/v1/order-pre/order`, obj)
|
||||
// uni.hideLoading()
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/order_details/index?id=' + order_id
|
||||
// })
|
||||
// }, 1000)
|
||||
// }
|
||||
if (scene.o) {
|
||||
uni.redirectTo({
|
||||
url: '/pageB/select_product/com_order?id=' + scene.o
|
||||
})
|
||||
}
|
||||
// 默认跳转首页
|
||||
else {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (this.scene.o) {
|
||||
this.getOrder(this.scene.o)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//生成订单
|
||||
async getOrder(id) {
|
||||
uni.redirectTo({
|
||||
url: '/pageB/select_product/com_order?id=' + id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue