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