Commit 3d081fa0 by yuzhenWang

修改申请加盟闪烁合并

parents f857cc95 c0c8b1d8
......@@ -178,8 +178,9 @@
if(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.checkToken()
}
// 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&this.userInfo.mobile){
......@@ -190,13 +191,34 @@
if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
// 登录状态
if(this.loginType == 'codelogin'){
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
}
},
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){
api.queryById({id:shareId}).then(res =>{
this.form.nickName = res.data.data.name
......
......@@ -314,10 +314,7 @@
if(uni.getStorageSync('cffp_userId')){
this.userId = uni.getStorageSync('cffp_userId')
}
//分享
this.initShare();
this.getOneProduct()
},
onLoad(options) {
if(options.sharePoster){
......@@ -451,6 +448,8 @@
this.querySystemMessage()
this.queryInfo()
this.courseList()
this.initShare();
this.getOneProduct()
}else {
this.featureLists =[
{
......@@ -504,6 +503,8 @@
this.queryAreaCenterInfo();
this.announcementQuery();
this.courseList();
this.getOneProduct()
this.initShare();
} else {
uni.showToast({
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