Browse Source

测试git权限

Qukatie 2 weeks ago
parent
commit
5d16d991df
1 changed files with 13 additions and 5 deletions
  1. 13 5
      App.vue

+ 13 - 5
App.vue

@@ -1,14 +1,22 @@
 <script>
 	export default {
 		onLaunch: function() {
-			console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
-			console.log('App Launch')
+		// uni.reLaunch({
+		// 	url: '/pages/home/index'
+		// });
+		// 判断是否有token 跳转对应的页面
+		if (uni.getStorageSync('accessToken')) {
+			uni.reLaunch({url: '/pages/home/index'})
+			// this.$u.route('/pages/vehicleProtection/detailed');
+		} else {
+			uni.reLaunch({
+				url: '/pages/login/index'
+			});
+		}
 		},
 		onShow: function() {
-			console.log('App Show')
 		},
 		onHide: function() {
-			console.log('App Hide')
 		}
 	}
 </script>
@@ -20,7 +28,7 @@
 	@import '@/static/customicons.css';
 	// 设置整个项目的背景色
 	page {
-		background-color: #f5f5f5;
+		background-color: #F4F4F4;
 	}
 
 	/* #endif */