6
0
Fork 0
hui.zhou
panliang 2022-11-07 11:52:19 +08:00
parent c93fe4adbd
commit 4a489c04cf
1 changed files with 21 additions and 22 deletions

View File

@ -18,38 +18,37 @@
}; };
}, },
onLoad(e) { onLoad(e) {
console.log(111111111111111, e);
const scene = strToParams(decodeURIComponent(e.scene)) const scene = strToParams(decodeURIComponent(e.scene))
this.scene = scene this.scene = scene
// invite_code // invite_code
if (scene.invite_code) { if (scene.i) {
uni.setStorageSync('INVITE_CODE', scene.invite_code) uni.setStorageSync('INVITE_CODE', scene.i)
} }
// //
if (scene.product) { if (scene.p) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/product_details/index?skuId=' + scene.product url: '/pages/product_details/index?skuId=' + scene.product
}) })
} }
// //
else if (scene.order_pre) { // else if (scene.o) {
// setTimeout(async () => { // setTimeout(async () => {
// uni.showLoading({ // uni.showLoading({
// title: '', // title: '',
// mask: true // mask: true
// }); // });
// const obj = { // const obj = {
// id: scene.order_pre // id: scene.order_pre
// } // }
// const { order_id } = await this.$api.post(`/v1/order-pre/order`, obj) // const { order_id } = await this.$api.post(`/v1/order-pre/order`, obj)
// uni.hideLoading() // uni.hideLoading()
// uni.redirectTo({ // uni.redirectTo({
// url: '/pages/order_details/index?id=' + order_id // url: '/pages/order_details/index?id=' + order_id
// }) // })
// }, 1000) // }, 1000)
} // }
// //
else { else {
uni.switchTab({ uni.switchTab({
@ -58,8 +57,8 @@
} }
}, },
onShow() { onShow() {
if (this.scene.order_pre) { if (this.scene.o) {
this.getOrder(this.scene.order_pre) this.getOrder(this.scene.o)
} }
}, },
methods: { methods: {