mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-08 18:36:47 +08:00
Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/mobile
This commit is contained in:
@@ -30,18 +30,10 @@
|
||||
window.open(this.$config.loginPath)
|
||||
// #endif
|
||||
}else{
|
||||
uni.showModal({
|
||||
title:'获取用户信息',
|
||||
content:''
|
||||
})
|
||||
console.log('获取用户信息');
|
||||
apiLogin.boeLogin(token).then(rs=>{
|
||||
if(rs.status==200){
|
||||
console.log('获取用户信息成功');
|
||||
uni.showModal({
|
||||
title:'获取用户成功',
|
||||
content:rs.status
|
||||
})
|
||||
//setToken(rs.result.access_token);
|
||||
//加载用户信息
|
||||
this.$store.dispatch("InitData").then(res => {
|
||||
@@ -55,21 +47,22 @@
|
||||
if(openUrl){
|
||||
console.log('跳转url='+openUrl);
|
||||
if(openUrl.startsWith('http')){
|
||||
alert('跳转url0='+openUrl)
|
||||
//alert('跳转url0='+openUrl)
|
||||
location.href=openUrl
|
||||
}else{
|
||||
if(openUrl=='/pages/index/index' || openUrl=='/pages/study/index' || openUrl=='/pages/plus/index' || openUrl=='/pages/my/index'){
|
||||
alert('跳转url1='+openUrl)
|
||||
//alert('跳转url1='+openUrl)
|
||||
uni.switchTab({
|
||||
url:openUrl
|
||||
})
|
||||
}else{
|
||||
alert('跳转url2='+openUrl)
|
||||
//alert('跳转url2='+openUrl)
|
||||
uni.navigateTo({url:openUrl})
|
||||
}
|
||||
}
|
||||
}else{
|
||||
console.log('跳转到首页');
|
||||
alert('跳转到首页')
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
@@ -77,12 +70,14 @@
|
||||
|
||||
}).catch(error => {
|
||||
console.log('加载用户信息错误:',error);
|
||||
alert('加载用户信息错误')
|
||||
uni.showModal({
|
||||
title:'错误',
|
||||
content:error
|
||||
})
|
||||
})
|
||||
}else{
|
||||
alert('加载用户错误')
|
||||
console.log(rs.message+','+rs.error);
|
||||
//#ifdef APP-PLUS
|
||||
plus.runtime.openURL(this.$config.loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开
|
||||
@@ -94,6 +89,7 @@
|
||||
}
|
||||
}).catch(err=>{
|
||||
//
|
||||
alert('请求超时')
|
||||
uni.showToast({
|
||||
title:'请求超时'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user