Files
klp-mono/apps/hand-factory/App.vue
砂糖 348e0eedab feat(update): 启用应用启动时的更新检查功能
refactor(update): 重构更新检查逻辑,优化代码结构和错误处理

feat(easycode): 新增移库和发货功能按钮及弹窗表单

chore: 更新应用版本号至1.3.10
2025-11-07 14:38:18 +08:00

47 lines
911 B
Vue

<script>
import config from './config'
import { getToken } from '@/utils/auth'
import updateManager from "@/utils/update.js";
export default {
onLaunch: function() {
this.initApp()
updateManager.checkUpdate();
},
methods: {
// 初始化应用
initApp() {
// 初始化应用配置
this.initConfig()
// 检查用户登录状态
//#ifdef H5
this.checkLogin()
//#endif
// uni.hideTabBar()
},
// mounted() {
// uni.hideTabBar()
// },
// onShow() {
// uni.hideTabBar()
// },
initConfig() {
this.globalData.config = config
},
checkLogin() {
if (!getToken()) {
this.$tab.reLaunch('/pages/login')
return;
}
}
}
}
uni.$updateManager = updateManager;
</script>
<style lang="scss">
@import '@/static/scss/index.scss'
</style>