app验收反馈
This commit is contained in:
17
App.vue
17
App.vue
@@ -1,6 +1,7 @@
|
||||
<script>
|
||||
import { queryDictDataCache } from './common/api/dictionary.js'
|
||||
import encrypt from './common/js/aes.js'
|
||||
import { getImageUrl } from '@/common/api/basic'
|
||||
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
console.log(window)
|
||||
@@ -14,14 +15,24 @@ export default {
|
||||
},
|
||||
})
|
||||
}
|
||||
if (!uni.getStorageSync(this.$cacheKey.userInfo)) {
|
||||
if (!uni.getStorageSync(this.$cacheKey.access_token)) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login',
|
||||
url: '/pages/user/login',
|
||||
})
|
||||
}
|
||||
// 查询字典
|
||||
queryDictDataCache().then((res) => {
|
||||
uni.setStorageSync(this.$cacheKey.dictData, res.data)
|
||||
})
|
||||
|
||||
// 更新用户头像
|
||||
let userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
if (userInfo.headSculpture) {
|
||||
getImageUrl(userInfo.headSculpture).then((res) => {
|
||||
userInfo.avatar = res.data
|
||||
uni.setStorageSync(this.$cacheKey.userInfo, userInfo)
|
||||
})
|
||||
}
|
||||
},
|
||||
onHide: function () {
|
||||
console.log('App Hide')
|
||||
|
||||
Reference in New Issue
Block a user