From 8866718edafe8f312feb1e7e4c3f9be531c0f7b2 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 26 十二月 2024 11:23:15 +0800
Subject: [PATCH] ll

---
 pda/pages/index/index.vue |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/pda/pages/index/index.vue b/pda/pages/index/index.vue
index 843d90d..ce712bb 100644
--- a/pda/pages/index/index.vue
+++ b/pda/pages/index/index.vue
@@ -1,9 +1,11 @@
 <template>
   <view class="main_app">
 		<view class="main_header">
-			<image src="../../static/back.svg" class="back"></image>
+			<view class="com">
+				<!-- <image src="../../static/back.svg" class="back"></image> -->
+			</view>
 			<view class="title">璋冨害骞冲彴</view>
-			<view class="loginout" @click="loginout">閫�鍑虹櫥褰�</view>
+			<view class="com loginout" @click="loginout">閫�鍑虹櫥褰�</view>
 		</view>
     <view class="main_content">
     	<view class="banner">
@@ -44,7 +46,12 @@
     }
   },
   onLoad() {
-
+		const token = uni.getStorageSync('token')
+		if(!token){
+			uni.redirectTo({
+				url: '/pages/index/login'
+			})
+		}
   },
   methods: {
 		loginout() {
@@ -82,6 +89,11 @@
 		align-items: center;
 		background-color: $uni-color-primary;
 		color: #fff;
+		.com{
+			width: 200rpx;
+			display: flex;
+			align-items: center;
+		}
 		.back{
 			width: 42rpx;
 			height: 42rpx;
@@ -90,6 +102,9 @@
 			font-weight: 500;
 			font-size: 36rpx;
 		}
+		.loginout{
+			justify-content: flex-end;
+		}
 	}
 .main_app {
   min-height: 100vh;

--
Gitblit v1.9.3