44 lines
721 B
Vue
Raw Permalink Normal View History

2024-11-28 17:07:44 +08:00
<script>
import config from './config';
import store from '@/store';
import { getToken } from '@/utils/auth';
export default {
onLaunch: function () {
this.initApp();
},
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>