| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <script>
- export default {
- onLaunch: function() {
- //解除跳转时闪过的登录页
- let userInfo = uni.getStorageSync('userInfo');
- let token = uni.getStorageSync('token');
- console.log(userInfo)
- if (!userInfo || !token) {
- uni.reLaunch({
- url: "/pages/login/index",
- success: () => {
- //跳转完页面后再关闭启动页
- // #ifdef APP-PLUS
- plus.navigator.closeSplashscreen();
- // #endif
- }
- })
- } else {
- // #ifdef APP-PLUS
- plus.navigator.closeSplashscreen();
- // #endif
- }
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style>
- /*每个页面公共css */
- .uni-tabbar-bottom .uni-tabbar {
- /* border-radius: 19998rpx;
- box-shadow: 0rpx -6rpx 16rpx 0rpx rgba(47, 126, 243, 0.2);
- bottom: 20rpx;
- margin: 0 20rpx; */
- }
- .user-custom-btn {
- background: #DCE8F9;
- color: #2D74E7;
- }
- </style>
|