hui.zhou
parent
fdf57f72ce
commit
d7e87b32f0
|
|
@ -29,6 +29,7 @@ export default {
|
|||
// #endif
|
||||
},
|
||||
onShow(option) {
|
||||
console.log('onShowaaa');
|
||||
let invite_code = option.query.invite_code || strToParams(decodeURIComponent(option.query.scene)).invite_code||''
|
||||
uni.setStorageSync('INVITE_CODE',invite_code)
|
||||
/* #ifdef MP-WEIXIN */
|
||||
|
|
|
|||
|
|
@ -98,8 +98,6 @@ export default {
|
|||
// this.$refs.uForm.setRules(this.rules);
|
||||
},
|
||||
async onLoad({ type, phone,redirec}) {
|
||||
|
||||
|
||||
this.redirec = redirec
|
||||
this.form.phone = phone ?? '';
|
||||
/* #ifdef MP-WEIXIN */
|
||||
|
|
@ -119,7 +117,6 @@ export default {
|
|||
const { code } = e.detail;
|
||||
if(!code) return
|
||||
const invite_code = uni.getStorageSync('INVITE_CODE');
|
||||
// const code = await getWxCode();
|
||||
if(!this.$store.getters.token){
|
||||
await wxMnpLogin(invite_code)
|
||||
}
|
||||
|
|
@ -130,9 +127,7 @@ export default {
|
|||
code:code,
|
||||
...params
|
||||
});
|
||||
//invite_code%3D1%26order_pre%3D1
|
||||
await this.LOGIN(resData.token);
|
||||
// await this.LOGIN('555|bZL3mr19Tpgs4jRvpKkguoH865lL2zGLa35WdU7Z')
|
||||
if(!!this.redirec) this.$u.route({
|
||||
type:'redirectTo',
|
||||
url:decodeURIComponent(this.redirec)
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ export default {
|
|||
let code = this.user.code ? this.user.code : '';
|
||||
let shareObj = {
|
||||
title: this.detail.name,
|
||||
path: `/pages/product_details/index?product=${this.productId}&invite_code=${code}`,
|
||||
path: `/pages/product_details/index?skuId=${this.productId}&invite_code=${code}`,
|
||||
imageUrl: this.detail.cover,
|
||||
};
|
||||
return shareObj;
|
||||
|
|
|
|||
|
|
@ -16,11 +16,13 @@
|
|||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
|
||||
const scene = strToParams(decodeURIComponent(e.scene))
|
||||
this.scene=scene
|
||||
// 优先存储 invite_code
|
||||
if (scene.invite_code) {
|
||||
uni.setStorageSync('INVITE_CODE', scene.invite_code)
|
||||
|
||||
}
|
||||
|
||||
// 产品详细页
|
||||
|
|
@ -47,10 +49,10 @@
|
|||
// }, 1000)
|
||||
}
|
||||
// 默认跳转首页
|
||||
else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
else {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue