|
@@ -14,7 +14,7 @@
|
|
|
<u-popup :show="userlogo" mode="bottom" round='12'>
|
|
<u-popup :show="userlogo" mode="bottom" round='12'>
|
|
|
<view class="userlogo column">
|
|
<view class="userlogo column">
|
|
|
<view class="mtb30 justify-start align-center ml20">
|
|
<view class="mtb30 justify-start align-center ml20">
|
|
|
- <u-avatar :src="imgPath+'/app/image/logo.png'" size="50"></u-avatar>
|
|
|
|
|
|
|
+ <u-avatar src="/static/logo.png'" size="50"></u-avatar>
|
|
|
<view class="bold mlr20">丝路佳选</view>
|
|
<view class="bold mlr20">丝路佳选</view>
|
|
|
<view>申请</view>
|
|
<view>申请</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -118,6 +118,7 @@
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
this.urlOption = option.link ? JSON.parse(decodeURIComponent(option.link)) : {},
|
|
this.urlOption = option.link ? JSON.parse(decodeURIComponent(option.link)) : {},
|
|
|
this.sortLink = this.urlOption.link || ''
|
|
this.sortLink = this.urlOption.link || ''
|
|
|
|
|
+ this.chatId = this.urlOption.chatId
|
|
|
console.log(this.sortLink)
|
|
console.log(this.sortLink)
|
|
|
uni.$on('usercode',(data)=>{
|
|
uni.$on('usercode',(data)=>{
|
|
|
if(data) {
|
|
if(data) {
|
|
@@ -217,66 +218,96 @@
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- uni.showLoading({
|
|
|
|
|
- title: '报名中'
|
|
|
|
|
- })
|
|
|
|
|
- getRealLink({sortLink:this.sortLink}).then(res=>{
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- if(res.code == 200) {
|
|
|
|
|
- let linkurl=JSON.parse(res.realLink.split('?link=')[1])
|
|
|
|
|
- this.chatId=linkurl.chatId
|
|
|
|
|
- console.log(this.chatId)
|
|
|
|
|
- if(res.config&&res.config.userCourseAuthDomain) {
|
|
|
|
|
- uni.setStorageSync('weixinOauth',res.config.userCourseAuthDomain)
|
|
|
|
|
- if(this.isLoginH5==0) {
|
|
|
|
|
- this.utils.isLoginCourse().then(
|
|
|
|
|
- isLogin => {
|
|
|
|
|
- this.isLogin = isLogin
|
|
|
|
|
- if(this.isLogin) {
|
|
|
|
|
- // this.editUserA()
|
|
|
|
|
- if(this.chatId!=''||this.chatId){
|
|
|
|
|
- this.userlogo=true
|
|
|
|
|
- }else{
|
|
|
|
|
- this.getAddCompanyUser()
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.goLogin()
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- rej => {}
|
|
|
|
|
- );
|
|
|
|
|
- }else {
|
|
|
|
|
- this.utils.isLoginResCourse().then(
|
|
|
|
|
- isLogin => {
|
|
|
|
|
- this.isLogin = isLogin
|
|
|
|
|
- if(this.isLogin) {
|
|
|
|
|
- this.getAddCompanyUser()
|
|
|
|
|
- } else {
|
|
|
|
|
- this.goLogin()
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- rej => {}
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ if(this.isLoginH5==0) {
|
|
|
|
|
+ this.utils.isLoginCourse().then(
|
|
|
|
|
+ isLogin => {
|
|
|
|
|
+ this.isLogin = isLogin
|
|
|
|
|
+ if(this.isLogin) {
|
|
|
|
|
+ // this.editUserA()
|
|
|
|
|
+ if(this.chatId!=''||this.chatId){
|
|
|
|
|
+ this.userlogo=true
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.getAddCompanyUser(1)
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.goLogin()
|
|
|
}
|
|
}
|
|
|
- }else {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '授权地址错误',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: res.msg,
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(err=>{
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '发生错误,请稍后再试',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ rej => {}
|
|
|
|
|
+ );
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.utils.isLoginResCourse().then(
|
|
|
|
|
+ isLogin => {
|
|
|
|
|
+ this.isLogin = isLogin
|
|
|
|
|
+ if(this.isLogin) {
|
|
|
|
|
+ this.getAddCompanyUser(1)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.goLogin()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ rej => {}
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ // uni.showLoading({
|
|
|
|
|
+ // title: '报名中'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // getRealLink({sortLink:this.sortLink}).then(res=>{
|
|
|
|
|
+ // uni.hideLoading()
|
|
|
|
|
+ // if(res.code == 200) {
|
|
|
|
|
+ // let linkurl=JSON.parse(res.realLink.split('?link=')[1])
|
|
|
|
|
+ // this.chatId=linkurl.chatId
|
|
|
|
|
+ // console.log(this.chatId)
|
|
|
|
|
+ // if(res.config&&res.config.userCourseAuthDomain) {
|
|
|
|
|
+ // uni.setStorageSync('weixinOauth',res.config.userCourseAuthDomain)
|
|
|
|
|
+ // if(this.isLoginH5==0) {
|
|
|
|
|
+ // this.utils.isLoginCourse().then(
|
|
|
|
|
+ // isLogin => {
|
|
|
|
|
+ // this.isLogin = isLogin
|
|
|
|
|
+ // if(this.isLogin) {
|
|
|
|
|
+ // // this.editUserA()
|
|
|
|
|
+ // if(this.chatId!=''||this.chatId){
|
|
|
|
|
+ // this.userlogo=true
|
|
|
|
|
+ // }else{
|
|
|
|
|
+ // this.getAddCompanyUser()
|
|
|
|
|
+ // }
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.goLogin()
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // rej => {}
|
|
|
|
|
+ // );
|
|
|
|
|
+ // }else {
|
|
|
|
|
+ // this.utils.isLoginResCourse().then(
|
|
|
|
|
+ // isLogin => {
|
|
|
|
|
+ // this.isLogin = isLogin
|
|
|
|
|
+ // if(this.isLogin) {
|
|
|
|
|
+ // this.getAddCompanyUser()
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.goLogin()
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // rej => {}
|
|
|
|
|
+ // );
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }else {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '授权地址错误',
|
|
|
|
|
+ // icon: 'none'
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: res.msg,
|
|
|
|
|
+ // icon: 'none'
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }).catch(err=>{
|
|
|
|
|
+ // uni.hideLoading()
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '发生错误,请稍后再试',
|
|
|
|
|
+ // icon: 'none'
|
|
|
|
|
+ // });
|
|
|
|
|
+ // })
|
|
|
},
|
|
},
|
|
|
goLogin(data) {
|
|
goLogin(data) {
|
|
|
if(this.isLoginH5==0) {
|
|
if(this.isLoginH5==0) {
|
|
@@ -334,8 +365,14 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- getAddCompanyUser() {
|
|
|
|
|
|
|
+ getAddCompanyUser(type) {
|
|
|
|
|
+ if(type==1) {
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
|
+ title: '报名中'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
isAddCompanyUser(this.urlOption).then(res=>{
|
|
isAddCompanyUser(this.urlOption).then(res=>{
|
|
|
|
|
+ uni.hideLoading()
|
|
|
if(res.code==200) {
|
|
if(res.code==200) {
|
|
|
this.isRegister = 1
|
|
this.isRegister = 1
|
|
|
} else {
|
|
} else {
|
|
@@ -344,6 +381,8 @@
|
|
|
icon: 'none'
|
|
icon: 'none'
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ }).catch(()=>{
|
|
|
|
|
+ uni.hideLoading()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
goWXLogin() {
|
|
goWXLogin() {
|