1 Star 0 Fork 4.6K

糖豆 / RuoYi-App

forked from 若依 / RuoYi-App 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
App.vue 715 Bytes
一键复制 编辑 原始数据 按行查看 历史
若依 提交于 2022-08-01 20:59 . 初次进入App时进入登录页
<script>
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 lang="scss">
@import '@/static/scss/index.scss'
</style>
Java
1
https://gitee.com/tangdou89/RuoYi-App.git
git@gitee.com:tangdou89/RuoYi-App.git
tangdou89
RuoYi-App
RuoYi-App
master

搜索帮助