mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 02:46:46 +08:00
加更多的打印日志
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
let token=getToken();
|
let token=getToken();
|
||||||
let $this=this;
|
let $this=this;
|
||||||
//console.log(token,'得到token');
|
console.log(token,'得到token');
|
||||||
if(!token){
|
if(!token){
|
||||||
console.log('未获得token,转向登录');
|
console.log('未获得token,转向登录');
|
||||||
//this.$router.push({ path: process.env.VUE_APP_LOGIN_URL })
|
//this.$router.push({ path: process.env.VUE_APP_LOGIN_URL })
|
||||||
@@ -34,8 +34,10 @@
|
|||||||
title:'获取用户信息',
|
title:'获取用户信息',
|
||||||
content:openUrl
|
content:openUrl
|
||||||
})
|
})
|
||||||
|
console.log('获取用户信息');
|
||||||
apiLogin.boeLogin(token).then(rs=>{
|
apiLogin.boeLogin(token).then(rs=>{
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
|
console.log('获取用户信息成功');
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title:'获取用户成功',
|
title:'获取用户成功',
|
||||||
content:openUrl
|
content:openUrl
|
||||||
@@ -51,6 +53,7 @@
|
|||||||
uni.setStorageSync("boe_new_login",1);//记录新登录
|
uni.setStorageSync("boe_new_login",1);//记录新登录
|
||||||
let openUrl=$this.toUrl;
|
let openUrl=$this.toUrl;
|
||||||
if(openUrl){
|
if(openUrl){
|
||||||
|
console.log('跳转url='+openUrl);
|
||||||
if(openUrl.startsWith('http')){
|
if(openUrl.startsWith('http')){
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title:'跳转url0',
|
title:'跳转url0',
|
||||||
@@ -75,12 +78,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
console.log('跳转到首页');
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url:'/pages/index/index'
|
url:'/pages/index/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
console.log('加载用户信息错误:',error);
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title:'错误',
|
title:'错误',
|
||||||
content:error
|
content:error
|
||||||
|
|||||||
Reference in New Issue
Block a user