From 01fa158740467ca0db83b131249beeeb515a73c2 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期二, 01 四月 2025 16:03:57 +0800
Subject: [PATCH] test

---
 pages/login/index.vue |   47 ++++++++++++++++++++++-------------------------
 1 files changed, 22 insertions(+), 25 deletions(-)

diff --git a/pages/login/index.vue b/pages/login/index.vue
index de15e2d..de2efe3 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -8,12 +8,6 @@
 
 				<a href="javascript:;" class="SetServer" @click="inputDialogToggle">{{translateSys('set')}}</a>
 				<a href="javascript:;" class="SetServer" @click="clickSetLanguage">{{translateSys('language')}}</a>
-
-				<!-- <div class="mui-input-row">
-					<label class="la_icon"><image class="logo_input" src="../../images/login/svr_30.png"></image></label>
-					<input type="text" class="mui-input" v-model="userServer" placeholder="鏈嶅姟鍣ㄥ湴鍧�>
-					<label class="mui-navigate-right" id="sersel"><image class="logo_icon" src="../../images/login/sel_left.png" ></image></label>
-				</div> -->
 				<div class="mui-input-row">
 					<label class="la_icon">
 						<image class="logo_input" src="../../images/login/person_30.png"></image>
@@ -35,7 +29,8 @@
 					</label>
 				</checkbox-group>
 			</form>
-			<button id='login' type="default" @tap="logind" class="btn_login">{{translateSys("start_login")}}</button>
+			<button id='login' :disabled="btnLoading" type="default" @tap="onClickLogin"
+				class="btn_login">{{translateSys("start_login")}}</button>
 			<p style="float:right; margin: 10px 10px;color:#c8c7cc">
 				<span>{{translateSys('version')}}锛�/span>
 				<span>{{version}}</span>
@@ -91,9 +86,11 @@
 		login,
 		getApkVersionInfo
 	} from "@/api/index.js"
+	import buttonClickMixin from '@/mixins/button-click.js';
 
 	import utils from "@/js/utils.js"
 	export default {
+		mixins: [buttonClickMixin],
 		components: {
 			cmdProgress
 		},
@@ -148,7 +145,7 @@
 							title: this.translateSys("tip"),
 							content: this.translate("tip_no_web_server"),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return;
 					}
@@ -174,7 +171,7 @@
 						title: this.translateSys("error"),
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys("cancel")
+						confirmText: this.translateSys('close')
 					});
 				}
 
@@ -312,7 +309,7 @@
 				console.log(e.target);
 				utils.session.setValue('account', '');
 				utils.session.setValue('password', '');
-				if (e.target.value[0] == '1') {
+				if (e.detail.value[0] == '1') {
 					utils.session.setValue('account', this.userName);
 					utils.session.setValue('password', this.userPwd);
 				}
@@ -336,6 +333,14 @@
 			// 	((expiredays==null)?'':';expires='+exdate.toGMTString());
 
 			// },
+			onClickLogin() {
+				this.handleButtonClick((done) => {
+					this.logind()
+					setTimeout(() => {
+						done(); // 閲嶇疆鐘舵�
+					}, 1000);
+				});
+			},
 			async logind() {
 				try {
 					if (!this.userServer) {
@@ -343,7 +348,7 @@
 							title: this.translateSys('tip'),
 							content: this.translate('tip_no_web_server'),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return;
 					}
@@ -352,7 +357,7 @@
 							title: this.translateSys('tip'),
 							content: this.translate('tip_no_user_account'),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return;
 					}
@@ -361,7 +366,7 @@
 							title: this.translateSys('tip'),
 							content: this.translate('tip_no_user_password'),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return;
 					}
@@ -398,13 +403,12 @@
 						title: this.translateSys("error"),
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys("cancel")
+						confirmText: this.translateSys('close')
 					});
 				}
 
 			},
-			onClickWms()
-			{
+			onClickWms() {
 				let otherAppSchemeURL = "testapp://pages/index/index"; // 鏇挎崲涓虹洰鏍嘺pp鐨剆cheme URL
 				plus.runtime.openURL(otherAppSchemeURL, function(error) {
 					console.error('鎵撳紑搴旂敤澶辫触: ', error);
@@ -421,14 +425,7 @@
 		},
 		onLoad(options) {
 			//鑾峰彇mac鍦板潃
-			let tip=`login:account:${options.account || ""},password:${options.password || ""}`
-			// console.log(options);
-			uni.showModal({
-				title: "鍙傛暟",
-				content: tip,
-				showCancel: false,
-				confirmText:"cancel"
-			});
+
 			var url = utils.session.getValue('server');
 			var username = utils.session.getValue('account');
 			var userpwd = utils.session.getValue('password');
@@ -465,7 +462,7 @@
 			console.log('Android璁惧鐨刣eviceId:', deviceId);
 			plus.runtime.getProperty(plus.runtime.appid, (info) => {
 				// console.log(info);
-				this.$data.version = info.version;
+				this.version = info.version;
 			});
 		}
 	}

--
Gitblit v1.9.1