mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 19:06:46 +08:00
Revert "Merge remote-tracking branch 'origin/master'"
This reverts commit9e16ad6913, reversing changes made to4b3b6cdf16.
This commit is contained in:
14
App.vue
14
App.vue
@@ -1,6 +1,5 @@
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import apiUserbasic from '@/api/boe/userbasic.js'
|
||||
export default {
|
||||
name: 'App',
|
||||
onLaunch: function() {
|
||||
@@ -19,21 +18,22 @@
|
||||
//console.log(this.$width,'$width');
|
||||
}
|
||||
});
|
||||
|
||||
//获取或加载一次用户信息
|
||||
//console.log('App Launch');
|
||||
//登录页面不需要,此页面用于本地测试
|
||||
//console.log(location.href,'location.href');
|
||||
var href=location.href;
|
||||
//不包含登录页和加载页
|
||||
if(href.indexOf('/pages/login/login')==-1 && href.indexOf('/pages/login/loading')==-1){
|
||||
//先做登录校验
|
||||
//每次加载,增加一次对token的验证,直接调用用户中心的接口,如果token不对,这里会直接返回登录
|
||||
apiUserbasic.getUserInfo();
|
||||
if(href.indexOf('/pages/login/login')==-1){
|
||||
this.$store.dispatch('GetUserInfo');
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
|
||||
onShow: function() {
|
||||
|
||||
|
||||
},
|
||||
onHide: function() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user