|
|
@@ -469,8 +469,11 @@
|
|
|
|
|
|
this.getWebviewUrl()
|
|
|
uni.$on('usercode', (data) => {
|
|
|
- console.log('huoqu ', data)
|
|
|
- this.goLogin(data)
|
|
|
+ console.log('huoqu ',data)
|
|
|
+ if(data) {
|
|
|
+ this.code=data.code
|
|
|
+ this.goLogin(data)
|
|
|
+ }
|
|
|
})
|
|
|
uni.$on('vipMsg', (data) => {
|
|
|
console.log(4444, data)
|
|
|
@@ -532,32 +535,19 @@
|
|
|
this.getH5CourseByVideo()
|
|
|
}
|
|
|
const AppToken = uni.getStorageSync('TOKEN_WEXIN')
|
|
|
- console.log(AppToken)
|
|
|
- // if (AppToken) {
|
|
|
- // console.log("console.log(AppToken,this.userinfo)===",this.userinfo)
|
|
|
- // // this.isLogin=true
|
|
|
- // this.getUserInfoLooks()
|
|
|
- // if (this.isAddKf == 1 && this.userinfo.userId) {
|
|
|
- // console.log(1233)
|
|
|
- // this.getH5CourseVideoDetails()
|
|
|
- // } else {
|
|
|
- // // this.checkUserInfoA()
|
|
|
- // this.getIsAddKf()
|
|
|
- // }
|
|
|
- // }
|
|
|
- this.$isLoginCourse().then(res=>{
|
|
|
- if(res) {
|
|
|
- this.isLogin = true
|
|
|
- this.getUserInfoLooks()
|
|
|
- if (this.isAddKf == 1 && this.userinfo.userId) {
|
|
|
- console.log(1233)
|
|
|
- this.getH5CourseVideoDetails()
|
|
|
- } else {
|
|
|
- // this.checkUserInfoA()
|
|
|
- this.getIsAddKf()
|
|
|
- }
|
|
|
+ console.log(this.code,AppToken)
|
|
|
+ if (AppToken&&!this.code) {
|
|
|
+ console.log("console.log(AppToken,this.userinfo)===",this.userinfo)
|
|
|
+ this.isLogin=true
|
|
|
+ this.getUserInfoLooks()
|
|
|
+ if (this.isAddKf == 1 && this.userinfo.userId) {
|
|
|
+ console.log(1233)
|
|
|
+ this.getH5CourseVideoDetails()
|
|
|
+ } else {
|
|
|
+ // this.checkUserInfoA()
|
|
|
+ this.getIsAddKf()
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
// if(this.sortLink){
|
|
|
// this.getLink()
|
|
|
// } else {
|
|
|
@@ -634,6 +624,7 @@
|
|
|
})
|
|
|
},
|
|
|
goLogin(data) {
|
|
|
+ this.isAddKf = 0
|
|
|
if (data) {
|
|
|
console.log('huoqu1222', data)
|
|
|
uni.showLoading({
|
|
|
@@ -660,9 +651,10 @@
|
|
|
uni.getStorageSync('TOKEN_WEXIN');
|
|
|
this.userInfo = uni.getStorageSync('userInfo');
|
|
|
this.isLogin = true
|
|
|
+ this.code = ''
|
|
|
// this.getH5CourseVideoDetails()
|
|
|
// setTimeout(()=>{
|
|
|
- // this.getIsAddKf()
|
|
|
+ this.getIsAddKf()
|
|
|
// },200)
|
|
|
} else if (res.code == 406) {
|
|
|
uni.hideLoading();
|
|
|
@@ -1266,6 +1258,7 @@
|
|
|
title: '已清除缓存,请重新进入页面!',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
+ this.goLogin()
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -1509,7 +1502,6 @@
|
|
|
// {videoId: this.videoId,qwUserId: this.qwUserId,corpId: this.corpId}
|
|
|
getIsAddKf(data).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.isLogin = true
|
|
|
if (res.data) {
|
|
|
this.isAddKf = 1
|
|
|
if (this.userInfo.userId) {
|