OfficeSystem/App.vue
2025-11-06 09:07:22 +08:00

28 lines
816 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script>
export default {
onLaunch: function() {
console.log('App Launch')
// TODO: 测试用 - 临时设置 token测试完成后删除此代码
// #ifdef VUE3
// 如果还没有 token则设置一个测试 token
const token = uni.getStorageSync('token')
if (!token) {
const testToken = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdlMmE1MjgwLTllYWQtNDVhMS04ZTA0LWYyNWRkZmEzMDYwMiJ9.sJH7nZEzqbfPqTFZYF8FrzT7GwlTO7OggGkxd7381naSfcaflEBgeCoV2xSVUAoKpAl4xeH0vT-e1cr5abcu9A'
uni.setStorageSync('token', testToken)
console.log('已设置测试 token:', testToken)
}
// #endif
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
@import '@climblee/uv-ui/index.scss';
</style>