From e8b665122cf256caae4993534c696d029883f0d5 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期三, 05 三月 2025 10:52:03 +0800
Subject: [PATCH] showmodal cancal 改成 close

---
 pages/login/index.vue |   55 ++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 38 insertions(+), 17 deletions(-)

diff --git a/pages/login/index.vue b/pages/login/index.vue
index c05f07b..bba6b7e 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -70,7 +70,10 @@
 			</uni-popup>
 			<!-- 鐗堟湰鍗囩骇寮圭獥缁撴潫 -->
 		</view>
-
+		<!-- <button @click="onClickWms">鐧诲綍wms</button>
+		<view class="webview">
+			<web-view ref="webview" src="http://115.29.185.26:5000/mobox3/#/"></web-view>
+		</view> -->
 	</view>
 
 </template>
@@ -145,19 +148,22 @@
 							title: this.translateSys("tip"),
 							content: this.translate("tip_no_web_server"),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return;
 					}
 					// var ser = this.userServer.toLowerCase().split('/');
 					const res = await getApkVersionInfo(this.userServer)
 					this.downloadUrl = res.dldUrl || ""
-					var isver = this.compare(res.verNum, version);
-					if (isver) {
-						this.$refs.promotion.open();
-					} else {
-						console.log('褰撳墠宸叉槸鏈�柊鐗堟湰')
+					if (this.downloadUrl) {
+						var isver = this.compare(res.verNum || "", version);
+						if (isver) {
+							this.$refs.promotion.open();
+						} else {
+							console.log('褰撳墠宸叉槸鏈�柊鐗堟湰')
+						}
 					}
+
 				} catch (ex) {
 					// console.log(ex);
 					let exStr = JSON.stringify(ex)
@@ -168,11 +174,11 @@
 						title: this.translateSys("error"),
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys("cancel")
+						confirmText: this.translateSys('close')
 					});
 				}
 
-	
+
 			},
 			compare(curV, reqV) {
 				var arr1 = curV.toString().split('.');
@@ -337,7 +343,7 @@
 							title: this.translateSys('tip'),
 							content: this.translate('tip_no_web_server'),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return;
 					}
@@ -346,7 +352,7 @@
 							title: this.translateSys('tip'),
 							content: this.translate('tip_no_user_account'),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return;
 					}
@@ -355,7 +361,7 @@
 							title: this.translateSys('tip'),
 							content: this.translate('tip_no_user_password'),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return;
 					}
@@ -377,7 +383,7 @@
 						pwd: this.userPwd
 					}
 					hideLoading()
-		
+
 					uni.navigateTo({
 						url: '../index/index?args=9999999999'
 					})
@@ -392,10 +398,17 @@
 						title: this.translateSys("error"),
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys("cancel")
+						confirmText: this.translateSys('close')
 					});
 				}
-	
+
+			},
+			onClickWms()
+			{
+				let otherAppSchemeURL = "testapp://pages/index/index"; // 鏇挎崲涓虹洰鏍嘺pp鐨剆cheme URL
+				plus.runtime.openURL(otherAppSchemeURL, function(error) {
+					console.error('鎵撳紑搴旂敤澶辫触: ', error);
+				}, "uni.TeatApp");
 			},
 			translate(t) {
 				if (typeof this.$t == "function") return this.$t(`page.${t}`)
@@ -406,12 +419,20 @@
 				else return t;
 			},
 		},
-		onLoad() {
+		onLoad(options) {
 			//鑾峰彇mac鍦板潃
+			let tip=`login:account:${options.account || ""},password:${options.password || ""}`
+			// console.log(options);
+			uni.showModal({
+				title: "鍙傛暟",
+				content: tip,
+				showCancel: false,
+				confirmText:'close'
+			});
 			var url = utils.session.getValue('server');
 			var username = utils.session.getValue('account');
 			var userpwd = utils.session.getValue('password');
-			
+
 			var ischecked = false;
 			if (!this.userServer)
 				this.userServer = url;

--
Gitblit v1.9.1