From 0b2357a173a2bc52f3532bfcf93ff31daf226231 Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: 星期三, 06 九月 2023 14:44:23 +0800
Subject: [PATCH] 导航栏退出登录

---
 pages/tabBar/firstPage/firstPage.vue |  134 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 112 insertions(+), 22 deletions(-)

diff --git a/pages/tabBar/firstPage/firstPage.vue b/pages/tabBar/firstPage/firstPage.vue
index 0e42cb6..aa771bc 100644
--- a/pages/tabBar/firstPage/firstPage.vue
+++ b/pages/tabBar/firstPage/firstPage.vue
@@ -7,36 +7,55 @@
 			<!-- 真正的导航栏内容 -->
 			<view class="navBar">
 				<view class="barText">首页</view>
+				<view >
+					<u-button type="text" @click="loginOut" style="color: blue;margin-right: 5px;">退出</u-button>
+				</view>
 			</view>
 		</view>
 		<view  class="list">
 			<view class="first" @click="goExamine" v-if="role == '审核领导'">
+				<view class="badge">
+					<u-badge type="error" :absolute="true" :offset="[90 + statusBarHeight ,65]" max="99" :value="examineNum" style="line-height: 40px;font-size: 14px;width: 30px;height: 40px;">
+					</u-badge>
+				</view>
+				<view class="text">预警审核</view>
+				<view class="eng">WARNING REVIEW</view>
 				<view class="icon">
-					<image src="../../../static/examine.png" class="img"></image>预警审核
+					<view class="heng"></view>
+					<image src="../../../static/examine.png" class="img"></image>
 				</view>
 			</view>
 			<view class="first" 
 				@click="goCurrent"
-				style="background-color:rgb(249, 130, 180) ;"
+				style="background-color:rgb(255, 160, 235) ;"
 			>
+				<view class="text">信息查看</view>
+				<view class="eng">INFORMATION VIEWING</view>
 				<view class="icon">
-					<image src="../../../static/look.png" class="img"></image>信息查看
+					<view class="heng"></view>
+					<image src="../../../static/look.png" class="img"></image>
 				</view>
 			</view>
 			<view class="first" 
-				style="background-color: rgb(41, 203, 280);"
+				style="background-color: rgb(112,179, 224);"
 				@click="goWeather"
 			>
+				<view class="text">实时气象</view>
+				<view class="eng">RWAL TIME WEATHER</view>
 				<view class="icon">
-					<image src="../../../static/we.png" class="img"></image>实时气象
+					<view class="heng"></view>
+					<image src="../../../static/we.png" class="img"></image>
 				</view>
 			</view>
 			<view class="first" 
-				style="background-color: rgb(11, 246, 158) ;margin-bottom: 35px;"
+				style="background-color: rgb(134, 204, 170) ;margin-bottom: 35px;"
 				@click="goCount"
 			>
+				<view class="text">统计分析</view>
+				<view class="eng">STATISTIC ANALYSIS</view>
 				<view class="icon">
-					<image src="../../../static/count.png" class="img"></image>统计分析
+					<view class="heng"></view>
+					<image src="../../../static/count1.png" class="img"></image>
 				</view>
 			</view>
 			
@@ -47,15 +66,35 @@
 
 <script>
 	import tabBar from '../tabBarIndex.vue'
+	import {getExamine} from '../../../api/examine.js'
+import { Value } from 'sass';
 	export default {
 		components:{
 			tabBar
 		},
 		data() {
 			return {
+				titleList:[
+					{
+						label: '默认排序',
+						value: 1,
+					}
+				],
 				page: 'pages/tabBar/firstPage/firstPage',
 				statusBarHeight: '',
-				leaderType: 'da'
+				leaderType: 'da',
+				examineNum: 0,
+				data: {
+					pageIndex: 1,
+					pageSize: 9999,
+					searchParams: {
+						emergType: null,//1-紧急;2-常规
+						warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警
+						reviewStatus: null//1:未审核,2:已审核,3:审核已驳回	
+					}
+				},
+				role: '',
+				realname:''
 			}
 			
 		},
@@ -63,10 +102,38 @@
 			//获取手机状态栏高度
 			this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
 			uni.hideTabBar();
+			this.realname = uni
+			
+			
+		},
+		onShow(){
 			this.role = uni.getStorageSync('roleName');
-			console.log("role",this.role)
+			this.realname = uni.getStorageSync('user').realName
+			console.log("role",uni.getStorageSync('user'))
+			this.getNum();
 		},
 		methods: {
+			loginOut() {
+				uni.clearStorageSync();
+				uni.clearStorage();
+				uni.navigateTo({
+					url: '/pages/index/index'
+				})
+			},
+			getNum(){
+				this.data.searchParams.reviewStatus = 1;
+				getExamine(this.data).then(res => {
+					if(res.code == 100) {
+						if(res.data && res.data.length > 0){
+							this.examineNum = res.data.length;
+						}else {
+							this.examineNum = 0;
+						}
+					}else{
+						uni.$u.toast(res.msg)
+					}
+				})
+			},
 			goExamine() {
 				uni.switchTab({
 				  url: '/pages/tabBar/examine/examine'
@@ -130,30 +197,53 @@
 .first{
 	width: 100%;
 	height: 110px;
-	background-color: red;
-	text-align: center;
-	line-height: 110px;
-	border-radius: 20px;
-	background-color: rgb(246,191,170);
+	border-radius: 15px;
+	background-color: rgb(241,161,108);
 	border: 1px solid lightgrey;
-	font-size: 18px;
+	
 	margin-top: 40px;
-	color: #2c2c2c;
+	
+}
+.text{
+	font-size: 18px;
+	padding-top: 15px;
+	padding-left: 15px;
+	color: #faf9f4;
+	font-family: '宋体';
 	font-weight: 600;
+}
+.eng{
+	font-size: 14px;
+	padding-left: 15px;
+	color: rgba(250,249,244,0.5);
 }
 .icon{
 	display: flex;
-	align-items: center;
-	justify-content: center;
+	align-items: baseline;
+	justify-content: space-between;
 }
 .barText{
-	text-align: center;
+	/* text-align: center; */
 	font-size: 16px;
 	font-weight: 600;
+	flex: 2;
+	margin-left: 45%;
 }
 .img{
-	width: 20px;
-	height: 20px;
-	margin-right: 6px;
+	width: 45px;
+	height: 45px;
+	margin-right: 16px;
+	margin-bottom: 5px;
+
+}
+.badge span{
+	text-align: center;
+	width: 100%;
+}
+.heng{
+	width: 30px;
+	height: 3px;
+	background-color: rgba(230,230,230,0.5);
+	margin-left: 15px;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.2