From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 06 六月 2025 19:19:34 +0800
Subject: [PATCH] 开发更新

---
 h5/pages/index.vue |   85 ++++++++++++++++++++++++++++++++++++------
 1 files changed, 73 insertions(+), 12 deletions(-)

diff --git a/h5/pages/index.vue b/h5/pages/index.vue
index 3970282..f64142b 100644
--- a/h5/pages/index.vue
+++ b/h5/pages/index.vue
@@ -1,6 +1,6 @@
 <template>
 	<view class="main_app">
-		<view class="hone_name title">{{ userInfo.name }}锛屾杩庣櫥褰�</view>
+		<view class="hone_name title">{{ userInfo.realname }}锛屾杩庣櫥褰曪綖</view>
 		<view class="home_con">
 			<image class="bg" src="@/static/home/home_bg.jpg" mode=""></image>
 			<view class="h1">闃滃畞鏂囦綋涓績</view>
@@ -17,22 +17,27 @@
 		<view class="list">
 			<view v-for="item in list2" class="item" @click="itemClick(item)">
 				<image :src="item.img"></image>
-				<view class="name">{{item.name}}</view>
+				<view class="name">{{item.name}}</view>
+				<view v-if="item.name == '寰呭姙涓績' && taskNum" class="superscript">{{taskNum}}</view>
 			</view>
 		</view>
+		<view class="loginout" @click="loginOut">閫�鍑虹櫥闄�</view>
 	</view>
-
 </template>
 
 <script>
+	import {
+		logoutPost,
+		myNoticesH5
+	} from '@/api'
 	export default {
 		data() {
 			return {
 				userInfo: uni.getStorageSync('userInfo') || {},
 				list1: [{
-						name: '鎵爜宸℃',
-						url: '',
-						img: require('@/static/home/ic_fangkebaobei@2x.png'),
+						name: '鏂板宸ュ崟',
+						url: '/pages/workOrder/edit',
+						img: require('@/static/home/ic_xinzenggongdan@2x.png'),
 						auth: 'weixin:menu:visitcar'
 					},
 					{
@@ -46,6 +51,12 @@
 						url: '/pages/operation/device',
 						img: require('@/static/home/ic_fangkebaobe@2x.png'),
 						auth: 'weixin:menu:visitcar'
+					},
+					{
+						name: '搴撳瓨鐩樼偣',
+						url: '/pages/inventory/index',
+						img: require('@/static/home/ic_pandian@2x.png'),
+						auth: 'weixin:menu:visitcar'
 					},
 				],
 				list2: [{
@@ -59,12 +70,21 @@
 						url: '/pages/operation/record',
 						img: require('@/static/home/ic_wodehuiyi@2x.png'),
 						auth: 'weixin:menu:visitcar'
+					},
+					{
+						name: '寰呭姙涓績',
+						url: '/pages/workOrder/wait',
+						img: require('@/static/home/ic_daiban@2x.png'),
+						auth: 'weixin:menu:visitcar'
 					},
-				]
+				],
+				taskNum: 0
 			}
 		},
-		onLoad() {
-
+		onShow() {
+			myNoticesH5({ page: 1, capacity: 1,model: {status: 0}}).then(res => {
+				this.taskNum = res.data.total
+			})
 		},
 		methods: {
 			itemClick(item) {
@@ -72,7 +92,18 @@
 					url: item.url
 				})
 			},
-			
+			loginOut() {
+				logoutPost().then(res => {
+					this.$store.commit('empty')
+					setTimeout(() => {
+						uni.redirectTo({
+							url: '/pages/login'
+						})
+					}, 300)
+				})
+				// window.location.href= 'https://zhcg.fnwtzx.com/fn_h5'
+			},
+
 		}
 	}
 </script>
@@ -118,8 +149,8 @@
 				display: flex;
 				flex-direction: column;
 				align-items: center;
-				width: 25%;
-
+				width: 25%;
+				position: relative;
 				image {
 					width: 88rpx;
 					height: 88rpx;
@@ -129,7 +160,37 @@
 				.name {
 					font-size: 26rpx;
 				}
+				.superscript{
+					height: 40rpx;
+					width: 40rpx;
+					position: absolute;
+					top: -16rpx;
+					right: 24rpx;
+					background-color: red;
+					color: #fff;
+					font-size: 24rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					border-radius: 50%;
+				}
 			}
 		}
+
+		.loginout {
+			position: fixed;
+			bottom: 88rpx;
+			left: 50%;
+			transform: translate(-50%, 0);
+			width: 152rpx;
+			height: 60rpx;
+			border-radius: 30rpx;
+			border: 1rpx solid $primaryColor;
+			color: $primaryColor;
+			font-size: 26rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3