From 646b4b5dac450305e3c0a4e100426c05276c65d4 Mon Sep 17 00:00:00 2001
From: whycq <you@example.com>
Date: 星期日, 19 三月 2023 16:27:10 +0800
Subject: [PATCH] #

---
 pages/login/login.vue |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/pages/login/login.vue b/pages/login/login.vue
index a84f4af..b5fa6e5 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -50,7 +50,7 @@
 		<!-- 鐧诲綍鎸夐挳 -->
 		<view class="submit">
 			<view class="" style="width: 400rpx;">
-				<button type="primary" size="default">鐧诲綍</button>
+				<button type="primary" @click="onLogin()" :loading="load.loading">{{load.btnText}}</button>
 			</view>
 		
 		</view>
@@ -95,7 +95,11 @@
 		data() {
 			return {
 				version: '',
-				value: ''
+				value: '',
+				load: {
+					loading: false,
+					btnText: '鐧诲綍'
+				},
 			}
 		},
 		onLoad() {
@@ -119,6 +123,19 @@
 			// 璁剧疆绐楀彛鍏抽棴鎸夐挳
 			close() {
 				this.$refs.inputDialog.close()
+			},
+			onLogin() {
+				let that = this
+				that.load.loading = true;
+				that.load.btnText = '鐧诲綍涓�';
+				setTimeout(()=> {
+					uni.showToast({title: '鐧诲綍鎴愬姛'})
+					setTimeout(()=> {
+						uni.reLaunch({
+							url: '../home/home'
+						});
+					},300)
+				},700)
 			}
 		}
 	}

--
Gitblit v1.9.1