This commit is contained in:
fz
2023-09-05 16:14:07 +08:00
parent 3004bd234a
commit fa8c21a1fc
510 changed files with 40385 additions and 28169 deletions
+30 -17
View File
@@ -1,21 +1,34 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
import config from './config'
import store from '@/store'
import { getToken } from '@/utils/auth'
export default {
onLaunch: function() {
this.initApp()
},
methods: {
// 初始化应用
initApp() {
// 初始化应用配置
this.initConfig()
// 检查用户登录状态
//#ifdef H5
this.checkLogin()
//#endif
},
initConfig() {
this.globalData.config = config
},
checkLogin() {
if (!getToken()) {
this.$tab.reLaunch('/pages/login')
}
}
}
}
</script>
<style>
/*每个页面公共css */
uni-page-body,page{
height: 100%;
background-color: #ECEDF4;
}
<style lang="scss">
@import '@/static/scss/index.scss'
</style>