From 17efddc6a667670dca682bf36b51a43e99615e6d Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 16 十月 2024 15:59:38 +0800
Subject: [PATCH] 代码初始化

---
 pda/pages/index/index.vue |  137 +++++++++++++++++++++++++++++++--------------
 1 files changed, 93 insertions(+), 44 deletions(-)

diff --git a/pda/pages/index/index.vue b/pda/pages/index/index.vue
index 0d7f78b..843d90d 100644
--- a/pda/pages/index/index.vue
+++ b/pda/pages/index/index.vue
@@ -1,31 +1,38 @@
 <template>
-  <view class="main_app">
-    <view class="banner">
-      <image src="@/static/banner_diaodu@2x.png" mode=""></image>
-    </view>
-    <view class="module">
-      <view class="item">
-        <image src="@/static/ic_yuetaidiaodu@2x.png" mode=""></image>
-        <view class="text">鏈堝彴璋冨害涓績</view>
-      </view>
-      <view class="item">
-        <image src="@/static/ic_cheliangpaidui@2x.png" mode=""></image>
-        <view class="text">杞﹂槦鎺掗槦鎯呭喌</view>
-      </view>
-      <view class="item">
-        <image src="@/static/ic_qiyong@2x.png" mode=""></image>
-        <view class="text">鏈堝彴鍚敤鍋滅敤</view>
-      </view>
-      <view class="item">
-        <image src="@/static/ic_peizhiyuetai@2x.png" mode=""></image>
-        <view class="text">閰嶇疆鏄剧ず鏈堝彴</view>
-      </view>
-    </view>
-    <!-- footer -->
-    <view class="main_footer">
-			<image src="@/static/logo@2x.png" mode=""></image>
-			<text>瀹夊窘瀹夋嘲鐗╂祦鏈夐檺璐d换鍏徃鐗堟潈鎵�鏈�</text>
+  <view class="main_app">
+		<view class="main_header">
+			<image src="../../static/back.svg" class="back"></image>
+			<view class="title">璋冨害骞冲彴</view>
+			<view class="loginout" @click="loginout">閫�鍑虹櫥褰�</view>
 		</view>
+    <view class="main_content">
+    	<view class="banner">
+    	  <image src="@/static/banner_diaodu@2x.png" mode=""></image>
+    	</view>
+    	<view class="module">
+    	  <view class="item" @click="jump('/pages/index/center')">
+    	    <image src="@/static/ic_yuetaidiaodu@2x.png" mode=""></image>
+    	    <view class="text">鏈堝彴璋冨害涓績</view>
+    	  </view>
+    	  <view class="item" @click="jump('/pages/index/queueup')">
+    	    <image src="@/static/ic_cheliangpaidui@2x.png" mode=""></image>
+    	    <view class="text">杞﹂槦鎺掗槦鎯呭喌</view>
+    	  </view>
+    	  <view class="item" @click="jump('/pages/index/control')">
+    	    <image src="@/static/ic_qiyong@2x.png" mode=""></image>
+    	    <view class="text">鏈堝彴鍚敤鍋滅敤</view>
+    	  </view>
+    	  <view class="item" @click="jump('/pages/index/set')">
+    	    <image src="@/static/ic_peizhiyuetai@2x.png" mode=""></image>
+    	    <view class="text">閰嶇疆鏄剧ず鏈堝彴</view>
+    	  </view>
+    	</view>
+    	<!-- footer -->
+    	<view class="main_footer">
+    	  <image src="@/static/logo@2x.png" mode=""></image>
+    	  <text>瀹夊窘瀹夋嘲鐗╂祦鏈夐檺璐d换鍏徃鐗堟潈鎵�鏈�</text>
+    	</view>
+    </view>
   </view>
 </template>
 
@@ -39,16 +46,58 @@
   onLoad() {
 
   },
-  methods: {
-
+  methods: {
+		loginout() {
+			uni.showModal({
+				title: '鎻愮ず',
+				content: '纭瑕侀��鍑虹櫥褰曞悧',
+				success: (res) => {
+					if (res.confirm) {
+						uni.clearStorageSync({})
+						uni.redirectTo({
+							url: '/pages/index/login'
+						})
+					} else if (res.cancel) {
+						console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+					}
+				}
+			});
+			
+		},
+    jump(path) {
+      uni.navigateTo({
+        url: path
+      })
+    },
   }
 }
 </script>
-<style lang="scss">
+<style lang="scss">
+	.main_header{
+		width: 100%;
+		height: 176rpx;
+		padding: 88rpx 30rpx 0;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		background-color: $uni-color-primary;
+		color: #fff;
+		.back{
+			width: 42rpx;
+			height: 42rpx;
+		}
+		.title{
+			font-weight: 500;
+			font-size: 36rpx;
+		}
+	}
 .main_app {
-  padding: 30rpx;
   min-height: 100vh;
-  background: #f7f7f7;
+  background: #f7f7f7;
+	padding: 0;
+	.main_content{
+		padding: 30rpx;
+	}
   .banner {
     width: 100%;
     height: 270rpx;
@@ -87,18 +136,18 @@
       }
     }
   }
-	.main_footer{
-		width: 100%;
-		position: fixed;
-		bottom: 84rpx;
-		display: flex;
-		justify-content: center;
-		font-size: 24rpx;
-		color: #666666;
-		image{
-			width: 40rpx;
-			height: 40rpx;
-		}
-	}
+  .main_footer {
+    width: 100%;
+    position: fixed;
+    bottom: 84rpx;
+    display: flex;
+    justify-content: center;
+    font-size: 24rpx;
+    color: #666666;
+    image {
+      width: 40rpx;
+      height: 40rpx;
+    }
+  }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3