zhuangpeimespda/App.vue
2025-05-05 12:22:51 +08:00

53 lines
774 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>
import config from './config';
import store from '@/store';
import { getToken } from '@/utils/auth';
export default {
onLaunch: function () {
this.initApp();
},
onUnload() {
},
data() {
return {
};
},
methods: {
// 初始化应用
initApp() {
// 初始化应用配置
this.initConfig();
// 检查用户登录状态H5 debug跳过
//#ifdef H5
this.checkLogin();
//#endif
},
initConfig() {
this.globalData.config = config;
},
checkLogin() {
if (!getToken()) {
this.$tab.reLaunch('/pages/login');
}
}
}
};
</script>
<style lang="scss">
@import '@/static/scss/index.scss';
.border {
border: 1px solid #000000;
}
.bottom-box {
width: 100%;
padding: 10px;
position: fixed;
bottom: 0;
}
</style>