Commit 3d081fa0 by yuzhenWang

修改申请加盟闪烁合并

parents f857cc95 c0c8b1d8
...@@ -178,8 +178,9 @@ ...@@ -178,8 +178,9 @@
if(uni.getStorageSync('cffp_userId')){ if(uni.getStorageSync('cffp_userId')){
this.userId = uni.getStorageSync('cffp_userId') this.userId = uni.getStorageSync('cffp_userId')
} }
if(!uni.getStorageSync('loginType')){ if(!uni.getStorageSync('loginType') || this.loginType == 'visitor'){
this.loginType = 'visitor' this.loginType = 'visitor'
this.checkToken()
} }
// 非邀请状态 // 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&this.userInfo.mobile){ if(!this.inviteUserId&&this.loginType == 'codelogin'&&this.userInfo.mobile){
...@@ -190,13 +191,34 @@ ...@@ -190,13 +191,34 @@
if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){ if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){
this.queryInfo() this.queryInfo()
} }
// #ifdef H5 // 登录状态
initJssdkShare(() => { if(this.loginType == 'codelogin'){
setWechatShare(); // #ifdef H5
}, window.location.href); initJssdkShare(() => {
// #endif setWechatShare();
}, window.location.href);
// #endif
}
}, },
methods: { methods: {
// 未登录状态下需要重新获取token
checkToken(){
api.checkToken().then(res=>{
if(res['success']){}else{
api.obtainToken().then(res=>{
if(res.success){
uni.setStorageSync('uni-token',res.data['token']);
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
}
})
}
})
},
getqueryById(shareId){ getqueryById(shareId){
api.queryById({id:shareId}).then(res =>{ api.queryById({id:shareId}).then(res =>{
this.form.nickName = res.data.data.name this.form.nickName = res.data.data.name
......
...@@ -314,10 +314,7 @@ ...@@ -314,10 +314,7 @@
if(uni.getStorageSync('cffp_userId')){ if(uni.getStorageSync('cffp_userId')){
this.userId = uni.getStorageSync('cffp_userId') this.userId = uni.getStorageSync('cffp_userId')
} }
//分享
this.initShare();
this.getOneProduct()
}, },
onLoad(options) { onLoad(options) {
if(options.sharePoster){ if(options.sharePoster){
...@@ -451,6 +448,8 @@ ...@@ -451,6 +448,8 @@
this.querySystemMessage() this.querySystemMessage()
this.queryInfo() this.queryInfo()
this.courseList() this.courseList()
this.initShare();
this.getOneProduct()
}else { }else {
this.featureLists =[ this.featureLists =[
{ {
...@@ -504,6 +503,8 @@ ...@@ -504,6 +503,8 @@
this.queryAreaCenterInfo(); this.queryAreaCenterInfo();
this.announcementQuery(); this.announcementQuery();
this.courseList(); this.courseList();
this.getOneProduct()
this.initShare();
} else { } else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment