app验收反馈

This commit is contained in:
仲么了
2023-08-11 11:03:31 +08:00
parent f395da8f93
commit 792e1ce7d7
24 changed files with 357 additions and 98 deletions

17
App.vue
View File

@@ -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')