4 Star 1 Fork 880

星辰/yudao-ui-admin-uniapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
App.vue 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
星辰 提交于 2024-01-21 23:08 +08:00 . 初始化
<script>
import config from './config'
import store from '@/store'
import { getAccessToken } 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 (!getAccessToken()) {
this.$tab.reLaunch('/pages/login')
}
}
}
}
</script>
<style lang="scss">
@import "uview-ui/index.scss";
@import "common/demo.scss";
@import '@/static/scss/index.scss';
page {
width: 100vw;
// height: calc(100% - var(--status-bar-height));
height: 100vh;
display: flex;
flex-direction: column;
box-sizing: border-box;
color: #333333;
font-size: 28rpx;
line-height: 40rpx;
image {
display: block;
}
}
::v-deep .uni-toast .uni-toast__content{
text-align: center!important;
}
view {
box-sizing: border-box;
}
uni-page-body {
width: 100vw;
height: 100vh;
}
</style>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jn_code/yudao-ui-admin-uniapp.git
git@gitee.com:jn_code/yudao-ui-admin-uniapp.git
jn_code
yudao-ui-admin-uniapp
yudao-ui-admin-uniapp
master

搜索帮助