| 12345678910111213141516171819202122232425 |
- <script>
- import { isLoggedIn } from '@/utils/auth'
- export default {
- onLaunch: function() {
- console.log('App Launch')
- // 已登录用户直接跳转首页,无需再进登录页
- if (isLoggedIn()) {
- uni.switchTab({
- url: '/pages/home/index'
- })
- }
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style>
- /*每个页面公共css */
- </style>
|