From f47ce70afac05ce941b5eafb2d9114c7a017f774 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期二, 06 九月 2022 20:01:27 +0800
Subject: [PATCH] 新增微信账号快捷登录、账号绑定、换绑功能,及页面更新。

---
 pages/home/home.vue |  104 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 71 insertions(+), 33 deletions(-)

diff --git a/pages/home/home.vue b/pages/home/home.vue
index d370212..e3b171d 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -2,16 +2,12 @@
 	<view class="home">
 		<!-- 杞挱鍥� -->
 		<view class="home_swipe"><u-swiper :list="list3" indicator indicatorMode="line" circular></u-swiper></view>
+
 		<!-- 鍥捐〃 -->
 		<combined-title title="鐓や粨搴撳瓨鏄庣粏"></combined-title>
 		<view class="charts-box">
 			<qiun-data-charts type="pie" :opts="opts" :chartData="chartData" v-if="uchartsData.length > 0" />
-			<u-empty
-			        mode="data"
-			        icon="http://cdn.uviewui.com/uview/empty/data.png"
-							v-if="uchartsData.length == 0" 
-			>
-			</u-empty>
+			<u-empty mode="data" iconSize="200" textSize="25" width="350" height="350" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="uchartsData.length == 0"></u-empty>
 		</view>
 		<!-- 鎴戠殑鐢宠 -->
 		<combined-title title="鎴戠殑鐢宠" detailsPath="/pages/my-application/my-application" v-if="shenqingMenu"></combined-title>
@@ -62,7 +58,7 @@
 								<image src="@/static/home/jindu.png" mode=""></image>
 								<view>鏌ョ湅杩涘害</view>
 							</view>
-							<view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2) && (item.procDefId == 'WAY_BILL:4:87504')">
+							<view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2) && item.procDefId == 'WAY_BILL:4:87504'">
 								<image src="@/static/home/biaodan.png" mode=""></image>
 								<view>琛ㄥ崟鏁版嵁</view>
 							</view>
@@ -218,7 +214,7 @@
 
 		<!-- 鏃ヨ鍒� -->
 		<combined-title title="鏃ュ彂杩愯鍒�" detailsPath="/pages/jihua/jihua" v-if="rijihuaMenu"></combined-title>
-		<view class="card-group">
+		<view class="card-group bottomChild" >
 			<combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id" v-if="rijihuaMenu">
 				<template v-slot:top></template>
 				<template v-slot:center>
@@ -306,6 +302,20 @@
 
 		<!-- 鑿滃崟鏍� -->
 		<!-- <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> -->
+		<u-gap height="15" bgColor="#eeeeee"></u-gap>
+		<view class="utils">
+			<view class="utils-container">
+				<view class="utils-container-body" @click="redirectLogin">
+					<view class="top"><u-icon name="backspace" color="#FF4233" size="70"></u-icon></view>
+					<view class="bottom-text"><text>閫�鍑�</text></view>
+				</view>
+				<view class="utils-container-body" @click="huanBang">
+					<view class="top"><u-icon name="lock-open" color="#1987FF" size="70"></u-icon></view>
+					<view class="bottom-text"><text>鎹㈢粦</text></view>
+				</view>
+			</view>
+		</view>
+		<u-gap height="60" bgColor="#eeeeee"></u-gap>
 	</view>
 </template>
 
@@ -315,7 +325,7 @@
 // import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
 import combinedTitle from '@/components/common/combined-title/combined-title.vue';
 import combinationCard from '@/components/common/combination-card/combination-card.vue';
-import { setAccessToken } from '@/utils/status.js';
+import { setAccessToken, redirectLogin } from '@/utils/status.js';
 
 export default {
 	name: 'home',
@@ -432,27 +442,31 @@
 	// },
 	// 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗
 	onNavigationBarButtonTap(e) {
-		console.log('閫�鍑哄鑸爮鎸夐挳浜嬩欢',e);
+		console.log('閫�鍑哄鑸爮鎸夐挳浜嬩欢', e);
 		// this.$refs.menuRef.menuClick();
 	},
 	// 鐩戝惉宸︿笂瑙掔殑鍥為��浜嬩欢
-	onUnload(event){ //澶氬眰绾ц烦杞箣鍚庯紝鐩戝惉宸︿笂瑙掕繑鍥炰簨浠讹紝鐩存帴閫�鍥炲埌index
-		console.log('鐩戝惉宸︿笂瑙�',event);
-		uni.request({
-		  url: `${BaseUrl}/auth/token/logout`,
-		  method: 'DELETE',
-		  header: {
-		    'TENANT-ID': 5,
-		    Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
-		    VERSION: 'zzl'
-		  }
-		}).then(res=>{
-			console.log('缂撳瓨娓呯悊鎴愬姛');
-		}).catch(err => {
-		  uni.showToast({
-		    title: '缂撳瓨娓呯悊澶辫触锛�',
-		  })
-		})
+	onUnload(event) {
+		//澶氬眰绾ц烦杞箣鍚庯紝鐩戝惉宸︿笂瑙掕繑鍥炰簨浠讹紝鐩存帴閫�鍥炲埌index
+		console.log('鐩戝惉宸︿笂瑙�', event);
+		uni
+			.request({
+				url: `${BaseUrl}/auth/token/logout`,
+				method: 'DELETE',
+				header: {
+					'TENANT-ID': 5,
+					Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
+					VERSION: 'zzl'
+				}
+			})
+			.then(res => {
+				console.log('缂撳瓨娓呯悊鎴愬姛');
+			})
+			.catch(err => {
+				uni.showToast({
+					title: '缂撳瓨娓呯悊澶辫触锛�'
+				});
+			});
 	},
 	onShow() {
 		// 鑿滃崟娉ㄩ噴锛坅pp寰呯敤锛�
@@ -486,7 +500,7 @@
 			});
 		},
 		getServerData() {
-			console.log('鍔犺浇鍥捐〃',this.uchartsData);
+			console.log('鍔犺浇鍥捐〃', this.uchartsData);
 			//妯℃嫙浠庢湇鍔″櫒鑾峰彇鏁版嵁鏃剁殑寤舵椂
 			setTimeout(() => {
 				//妯℃嫙鏈嶅姟鍣ㄨ繑鍥炴暟鎹紝濡傛灉鏁版嵁鏍煎紡鍜屾爣鍑嗘牸寮忎笉鍚岋紝闇�鑷鎸変笅闈㈢殑鏍煎紡鎷兼帴
@@ -783,6 +797,14 @@
 			this.deleteApplicationModalShow = true;
 			this.procInstId = id;
 			console.log(id);
+		},
+		redirectLogin() {
+			redirectLogin();
+		},
+		huanBang() {
+			uni.navigateTo({
+				url: '/pages/register/register'
+			});
 		}
 	}
 };
@@ -793,7 +815,20 @@
 	width: 100%;
 	display: flex;
 	flex-direction: column;
-	padding-bottom: vww(20);
+
+	// 妯悜鑿滃崟鏍�
+	.utils {
+		.utils-container {
+			display: flex;
+			justify-content: space-between;
+			width: 66%;
+			margin: 0 auto;
+			.utils-container-body {
+				display: flex;
+				align-items: center;
+			}
+		}
+	}
 
 	.home_swipe {
 		width: 100%;
@@ -820,8 +855,8 @@
 		width: 91%;
 		height: vww(330);
 		margin: 0 auto;
-		.u-empty{
-			height:100%;
+		.u-empty {
+			height: 100%;
 		}
 	}
 
@@ -839,6 +874,9 @@
 				}
 			}
 		}
+	}
+	.bottomChild{
+		margin-bottom: vww(20);
 	}
 
 	// 鍗$墖涓棿
@@ -925,7 +963,7 @@
 		// width:100%;
 		// height:vww(244);
 		.slot-content {
-      width:vww(330);
+			width: vww(330);
 			.rejectMesaage {
 				display: flex;
 				padding: vww(3);
@@ -1062,4 +1100,4 @@
 		}
 	}
 }
-</style>
+</style>

--
Gitblit v1.9.1