From bb6bc1f4030cf813e128f021ccecd42420f35628 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 06 六月 2025 13:38:10 +0800
Subject: [PATCH] *
---
src/main/webapp/views/index.html | 44 +++++++++++++++++++++++++++++++-------------
1 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 7f035d3..34863fd 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -454,6 +454,22 @@
}, 1000)
},
+
+ verifyPassword(callback) {
+ this.$prompt('璇疯緭鍏ョ鐞嗗憳瀵嗙爜', '楠岃瘉', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ inputType: 'password',
+ inputPattern: /^root$/,
+ inputErrorMessage: '瀵嗙爜閿欒'
+ }).then(({ value }) => {
+ if (value === 'root') {
+ callback();
+ }
+ }).catch(() => {
+ this.$message.info('宸插彇娑堟搷浣�');
+ });
+ },
handleChange(val) {
console.log(val);
if (val.length === 0){
@@ -586,20 +602,22 @@
},
upDateValueSystem(){
let that = this;
- let operatorTypeI = 0;
- if (that.valueSystem){
- operatorTypeI = 1;
- }
- $.ajax({
- url: baseUrl + "/console/system/switch",
- headers: {'token': localStorage.getItem('token')},
- data: {operatorType : operatorTypeI},
- method: 'POST',
- success: function (res) {
- if (res.code === 200) {
- that.valueSystem = res.data.status;
- }
+ this.verifyPassword(() => {
+ let operatorTypeI = 0;
+ if (that.valueSystem){
+ operatorTypeI = 1;
}
+ $.ajax({
+ url: baseUrl + "/console/system/switch",
+ headers: {'token': localStorage.getItem('token')},
+ data: {operatorType : operatorTypeI},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ that.valueSystem = res.data.status;
+ }
+ }
+ });
});
},
getTableDataLeft() {
--
Gitblit v1.9.1