123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <script>
- import {
- getToken
- } from './utils/auth.js'
- export default {
- onLaunch: function() {
- console.log('App Launch')
- const token = getToken()
- if (token) {
- // #ifdef APP-PLUS
- uni.reLaunch({
- // url: "/pages/reportForm/index",
- url: "/pages/homePage/index",
- success: () => {
- // #ifdef APP-PLUS
- plus.navigator.closeSplashscreen();
- // #endif
- }
- })
- // #endif
- } else {
- uni.reLaunch({
- url: "/pages/login/index",
- success: () => {
- // #ifdef APP-PLUS
- plus.navigator.closeSplashscreen();
- // #endif
- }
- })
- }
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style>
- /*每个页面公共css */
- @import '@/uni_modules/uview-ui/theme.scss';
- uni-button:after {
- border: none;
- }
- uni-page-head .uni-page-head__title{
- font-size: 18px !important;
- }
- </style>
|