This commit is contained in:
2026-06-02 15:28:25 +08:00
commit b271b84f70
249 changed files with 42240 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
<script>
export default {
onLaunch() {
console.log('App Launch')
// 从本地存储恢复登录状态
const token = uni.getStorageSync('token')
const userInfo = uni.getStorageSync('userInfo')
const deviceUuid = uni.getStorageSync('deviceUuid')
if (token) {
this.$store.commit('user/SET_TOKEN', token)
this.$store.commit('user/SET_DEVICE_UUID', deviceUuid || '')
if (userInfo) {
this.$store.commit('user/SET_USER_INFO', userInfo)
}
this.$store.commit('user/SET_LOGIN', true)
// 启动 Token 自动续期定时器
this.$store.dispatch('user/startTokenRefresh')
// 初始化打印机配置
this.$store.dispatch('print/initPrinterConfig')
// 初始化扫码模式配置
this.$store.dispatch('scan/initScanMode')
}
}
}
</script>
<style lang="scss">
@import './styles/index.scss';
// 引入字体图标
@import './static/iconfont/font_5178893_r4lrriz2ngn/iconfont.css';
page {
height: 100%;
}
</style>