调整 入口页面跳转逻辑
parent
4a489c04cf
commit
9740568620
|
|
@ -23,9 +23,7 @@
|
||||||
// 优先存储 invite_code
|
// 优先存储 invite_code
|
||||||
if (scene.i) {
|
if (scene.i) {
|
||||||
uni.setStorageSync('INVITE_CODE', scene.i)
|
uni.setStorageSync('INVITE_CODE', scene.i)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 产品详细页
|
// 产品详细页
|
||||||
if (scene.p) {
|
if (scene.p) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
|
|
@ -33,45 +31,17 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 扫码下单
|
// 扫码下单
|
||||||
// else if (scene.o) {
|
if (scene.o) {
|
||||||
// setTimeout(async () => {
|
uni.redirectTo({
|
||||||
// uni.showLoading({
|
url: '/pageB/select_product/com_order?id=' + scene.o
|
||||||
// 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)
|
|
||||||
// }
|
|
||||||
// 默认跳转首页
|
// 默认跳转首页
|
||||||
else {
|
else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/index/index'
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue