Revert "Merge remote-tracking branch 'origin/master'"

This reverts commit 9e16ad6913, reversing
changes made to 4b3b6cdf16.
This commit is contained in:
yujicun
2023-03-17 17:29:37 +08:00
parent 9e16ad6913
commit f0f86482ac
6 changed files with 53 additions and 62 deletions

14
App.vue
View File

@@ -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() {