From 7662665a4f88da0f8afa804bd4a34dfbefc1fb56 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 29 八月 2025 15:17:59 +0800
Subject: [PATCH] get_pre_page_subtable_next_row
---
pages/login/index.vue | 99 +++++++++++--------------------------------------
1 files changed, 23 insertions(+), 76 deletions(-)
diff --git a/pages/login/index.vue b/pages/login/index.vue
index 0406e93..1ee1a4f 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -88,7 +88,8 @@
import cmdProgress from "@/components/cmd-progress/cmd-progress.vue"
import {
showModal,
- showToast,
+ showInfo,
+ showError,
showLoading,
hideLoading
} from "@/js/Page.js"
@@ -159,12 +160,9 @@
async check(version) {
try {
if (!this.userServer) {
- uni.showModal({
- title: this.translateSys("tip"),
- content: this.translate("tip_no_web_server"),
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+
+ showInfo( this.translate('tip_no_web_server'));
+
return;
}
// var ser = this.userServer.toLowerCase().split('/');
@@ -181,16 +179,8 @@
} catch (ex) {
// console.log(ex);
- let exStr = JSON.stringify(ex)
- if (exStr == "{}")
- exStr = ex
- let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
- uni.showModal({
- title: this.translateSys("error"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ showError(ex,this.translateSys("error"));
+
}
@@ -254,18 +244,12 @@
//涓嬭浇鎴愬姛,d.filename鏄枃浠跺湪淇濆瓨鍦ㄦ湰鍦扮殑鐩稿璺緞锛屼娇鐢ㄤ笅闈㈢殑API鍙浆涓哄钩鍙扮粷瀵硅矾寰� var fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
plus.runtime.openFile(d.filename); //閫夋嫨杞欢鎵撳紑鏂囦欢
- uni.showToast({
- icon: 'none',
- title: this.translate('update_success')
- });
+ showInfo( this.translate('update_success'));
_this.$refs.promotion.close();
} else {
//涓嬭浇澶辫触
plus.downloader.clear(); //娓呴櫎涓嬭浇浠诲姟
- uni.showToast({
- icon: 'none',
- title: this.translate('update_fail')
- });
+ showInfo( this.translate('update_fail'));
_this.showBtns = false;
}
})
@@ -290,15 +274,15 @@
inputDialogToggle() {
// this.$refs.inputDialog.open()
const $this = this
-
+
uni.navigateTo({
url: "./set",
events: {
exitSetEvent(val) {
$this.userServer = val;
$this.query(); //鐗堟湰鍗囩骇
- $this.largeMode = getApp().globalData.largeMode
-
+ $this.largeMode = getApp().globalData.largeMode
+
}
}
})
@@ -366,30 +350,16 @@
async logind() {
try {
if (!this.userServer) {
- uni.showModal({
- title: this.translateSys('tip'),
- content: this.translate('tip_no_web_server'),
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ showInfo(this.translate('tip_no_web_server'));
return;
}
if (!this.userName) {
- uni.showModal({
- title: this.translateSys('tip'),
- content: this.translate('tip_no_user_account'),
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ showInfo(this.translate('tip_no_user_account'))
return;
}
if (!this.userPwd) {
- uni.showModal({
- title: this.translateSys('tip'),
- content: this.translate('tip_no_user_password'),
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ showInfo(this.translate('tip_no_user_password'));
+
return;
}
var rootUrl = 'http://' + this.userServer
@@ -429,16 +399,7 @@
} catch (ex) {
hideLoading()
- let exStr = JSON.stringify(ex)
- if (exStr == "{}")
- exStr = ex
- let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
- uni.showModal({
- title: this.translateSys("error"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ showError(ex,this.translateSys("error"));
}
},
@@ -465,12 +426,7 @@
});
if (list.length == 0) {
- uni.showModal({
- title: this.translate("get_classes_fail"),
- content: this.translate("page.please_login_after_admin_add_classes"),
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ showInfo(this.translate("page.please_login_after_admin_add_classes"));
this.selectedClasses = ""
} else {
if (this.selectedClasses) {
@@ -488,17 +444,8 @@
} catch (ex) {
- let exStr = JSON.stringify(ex)
- if (exStr == "{}")
- exStr = ex
- let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
- uni.showModal({
- title: this.translate("get_classes_fail"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
-
+ showError(ex,this.translateSys("error"));
+
this.selectedClasses = ""
this.classesLst = []
// {
@@ -524,6 +471,7 @@
clickSelectClass(item) {
this.selectedClasses = item.text
},
+
translate(t) {
if (typeof this.$t == "function") return this.$t(`page.${t}`)
else return t;
@@ -711,12 +659,11 @@
}
}
-
- .uni-page-login.large-mode{
+
+ .uni-page-login.large-mode {
.logo_input {
height: 54rpx;
width: 54rpx;
}
}
-
</style>
\ No newline at end of file
--
Gitblit v1.9.1