28 lines
569 B
Vue
28 lines
569 B
Vue
<script>
|
|
import { useConfigStore } from './store/config.js'
|
|
import { useUserStore } from './store/user.js'
|
|
|
|
export default {
|
|
onLaunch: function() {
|
|
console.log('App Launch')
|
|
// 恢复用户状态
|
|
const userStore = useUserStore()
|
|
userStore.restoreFromStorage()
|
|
|
|
// 加载所有配置(一次请求)
|
|
const configStore = useConfigStore()
|
|
configStore.loadAppConfig()
|
|
},
|
|
onShow: function() {
|
|
console.log('App Show')
|
|
},
|
|
onHide: function() {
|
|
console.log('App Hide')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
/*每个页面公共css */
|
|
</style>
|