mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 16:43:55 +08:00
fix: 修复刷新页面菜单、页脚闪动的问题
This commit is contained in:
@@ -60,6 +60,11 @@ export default {
|
||||
isCDNEnabled: process.env.VUE_APP_USE_CDN === 'true'
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 挂载 store 状态
|
||||
this.$store.commit('setUserInfo', JSON.parse(localStorage.getItem('userInfo') || '{}'));
|
||||
this.$store.commit('setPubConfig', JSON.parse(localStorage.getItem('pubConfig') || '{}'));
|
||||
},
|
||||
mounted() {
|
||||
// 检测是否为移动设备且VUE_APP_H5_URL不为空,如果两个条件都满足则跳转到H5页面
|
||||
if (this.isMobileDevice() && process.env.VUE_APP_H5_URL) {
|
||||
|
||||
Reference in New Issue
Block a user