26 lines
723 B
JavaScript
26 lines
723 B
JavaScript
export default {
|
|
onLoad(options) {
|
|
if (options.invite_code) {
|
|
uni.setStorageSync('invite_code', options.invite_code);
|
|
}
|
|
},
|
|
onShow(){
|
|
let userInfoGet = uni.getStorageSync('user')
|
|
if(userInfoGet && userInfoGet.pemType == 1){
|
|
this.mpShare.path = `/pages/index/index?invite_code=${userInfoGet.shareCode}`
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
mpShare: {
|
|
title: '', // 默认为小程序名称
|
|
path: `/pages/index/index?invite_code=`, // 默认为当前页面路径
|
|
imageUrl: '' // 默认为当前页面的截图
|
|
}
|
|
}
|
|
},
|
|
onShareAppMessage() {
|
|
this.mpShare.path = `/pages/index/index?invite_code=${uni.getStorageSync('user') ? uni.getStorageSync('user').shareCode :''}`
|
|
return this.mpShare;
|
|
}
|
|
} |