6
0
Fork 0
hui.zhou
h30830569 2022-06-10 17:52:50 +08:00
parent fdf57f72ce
commit d7e87b32f0
4 changed files with 8 additions and 10 deletions

View File

@ -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 */

View File

@ -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)

View File

@ -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;

View File

@ -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() {