|
@@ -1,8 +1,9 @@
|
|
|
|
|
+import store from '@/store'
|
|
|
import { mapGetters,mapActions } from 'vuex'
|
|
import { mapGetters,mapActions } from 'vuex'
|
|
|
import { pageTo, isLogin } from '@/utils/util.js'
|
|
import { pageTo, isLogin } from '@/utils/util.js'
|
|
|
import { getUser, uniLoginFn } from '@/utils/auth'
|
|
import { getUser, uniLoginFn } from '@/utils/auth'
|
|
|
import { postWxCode, getDictionaries } from '@/api/mini'
|
|
import { postWxCode, getDictionaries } from '@/api/mini'
|
|
|
-import { getStaffApi } from '@/api/common'
|
|
|
|
|
|
|
+import { getStaffApi,appReGetLoginInfo } from '@/api/common'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -83,10 +84,25 @@ export default {
|
|
|
// #endif
|
|
// #endif
|
|
|
|
|
|
|
|
//#ifdef APP-PLUS
|
|
//#ifdef APP-PLUS
|
|
|
- this.show_login_model = true
|
|
|
|
|
- //uni.hideTabBar()
|
|
|
|
|
- // #endif
|
|
|
|
|
-
|
|
|
|
|
|
|
+ //有token重新获取登陆信息!!!
|
|
|
|
|
+ const appToken = uni.getStorageSync('token')
|
|
|
|
|
+ if(this.$util.isEmpty(appToken)){
|
|
|
|
|
+ this.show_login_model = true
|
|
|
|
|
+ uni.hideTabBar()
|
|
|
|
|
+ }else{
|
|
|
|
|
+ appReGetLoginInfo().then(subRes=>{
|
|
|
|
|
+ store.commit('setLoginInfo', {
|
|
|
|
|
+ ...subRes.data.admin,
|
|
|
|
|
+ ...subRes.data
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ uni.showTabBar()
|
|
|
|
|
+ this.setUserShopAll()
|
|
|
|
|
+ if (this.init) {
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|