You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.4 KiB
Vue

<!-- <template>
<view class="content">
<router-view></router-view>
<view class="text-area">
<text class="title">Hello 芋道</text>
</view>
</view>
</template> -->
<script>
import config from './config'
import store from '@/store'
import {
getAccessToken,
getAccessTokensacacas
} 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 '@/static/scss/index.scss';
</style>
<style>
.gradient-background {
/* 设置渐变背景,从上到下,从浅蓝色到白色 */
background: linear-gradient(to bottom, #0d74d2 0%, #FFFFFF 25%);
width: 100%;
height: 100vh;
/* 如果需要模糊效果,可以添加 backdrop-filter */
backdrop-filter: none;
}
.gradient-backgroundTwo {
/* 设置渐变背景,从上到下,从浅蓝色到白色 */
background: linear-gradient(to bottom, #0d74d2 0%, #ececec 25%);
width: 100%;
height: 100%;
/* 如果需要模糊效果,可以添加 backdrop-filter */
backdrop-filter: none;
}
</style>