54 lines
953 B
Vue
54 lines
953 B
Vue
<script>
|
|
import config from './config'
|
|
import store from '@/store'
|
|
import {
|
|
getToken
|
|
} from '@/utils/auth'
|
|
|
|
export default {
|
|
onLaunch: function() {
|
|
this.initApp()
|
|
|
|
},
|
|
onShow() {
|
|
//读取Storage里的字体大小
|
|
let fontsize = uni.getStorageSync("fontSize")
|
|
console.log(fontsize);
|
|
if (fontsize) {
|
|
|
|
|
|
this.$baseFontSize = fontsize
|
|
this.$store.state.vuex_fontsize = fontsize;
|
|
}
|
|
},
|
|
methods: {
|
|
// 初始化应用
|
|
initApp() {
|
|
// 初始化应用配置
|
|
this.initConfig()
|
|
// 检查用户登录状态
|
|
//#ifdef H5
|
|
this.checkLogin()
|
|
//#endif
|
|
},
|
|
initConfig() {
|
|
this.globalData.config = config
|
|
},
|
|
checkLogin() {
|
|
// if (!getToken()) {
|
|
// this.$tab.reLaunch('/pages/loginToken')
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
body {
|
|
font-size: 13px;
|
|
}
|
|
@import "@/uni_modules/uview-ui/index.scss";
|
|
@import '@/static/scss/index.scss'
|
|
|
|
|
|
</style> |