From c7a1916fdba8c347f31d2101492929e6d5d3a74f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Jan 2022 11:27:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E5=91=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../x_component_ThreeMember/PasswordView.js | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/o2web/source/x_component_ThreeMember/PasswordView.js b/o2web/source/x_component_ThreeMember/PasswordView.js index 690b81fb77..072ed71881 100644 --- a/o2web/source/x_component_ThreeMember/PasswordView.js +++ b/o2web/source/x_component_ThreeMember/PasswordView.js @@ -144,14 +144,14 @@ MWF.xApplication.ThreeMember.PasswordView = new Class({ }, saveForm: function(data){ var actions = []; - if( data.adminPassword ){ - actions.push( - o2.Actions.load("x_program_center").ConfigAction.setToken({ - password: data.adminPassword - }) - ); - delete data.adminPassword; - } + // if( data.adminPassword ){ + // actions.push( + // o2.Actions.load("x_program_center").ConfigAction.setToken({ + // password: data.adminPassword + // }) + // ); + // delete data.adminPassword; + // } if( data.systemManagerPassword || data.securityManagerPassword || data.auditManagerPassword ) { var d = {}; if (data.systemManagerPassword) { @@ -181,10 +181,17 @@ MWF.xApplication.ThreeMember.PasswordView = new Class({ this.form.changeMode(true); this.loadReadModeAction(); }.bind(this)).catch(function (json) { - if (json.type === "error") { - this.app.notice(json.message, "error"); + if (json.text) { + this.app.notice(json.text, "error"); + }else if(json.xhr){ + var responseJSON = JSON.parse( json.xhr.responseText ); + if( responseJSON.message ){ + this.app.notice( responseJSON.message, "error" ); + }else{ + this.app.notice( this.lp.saveFailure, "error" ); + } }else{ - this.app.notice( this.lp.saveFailure ); + this.app.notice( this.lp.saveFailure, "error" ); } }.bind(this)) } @@ -197,13 +204,13 @@ MWF.xApplication.ThreeMember.PasswordView = new Class({ loadData: function( callback ){ var personAction = o2.Actions.load("x_program_center").ConfigAction.getPerson(); var TMAction = o2.Actions.load("x_program_center").ConfigAction.getTernaryManagement(); - var tokenAction = o2.Actions.load("x_program_center").ConfigAction.getToken(); - Promise.all([personAction, TMAction, tokenAction]).then(function (args) { + // var tokenAction = o2.Actions.load("x_program_center").ConfigAction.getToken(); + Promise.all([personAction, TMAction]).then(function (args) { this.personData = args[0].data; this.TMData = args[1].data; - this.tokenData = args[2].data; + // this.tokenData = args[2].data; var data = Object.clone(this.personData); - data.adminPassword = this.tokenData.password; + // data.adminPassword = this.tokenData.password; data.systemManagerPassword = ""; data.securityManagerPassword = ""; data.auditManagerPassword = ""; @@ -224,7 +231,7 @@ MWF.xApplication.ThreeMember.PasswordView = new Class({ itemTemplate: { password: { "text": lp.password, tType : "text", notEmpty: true, attr: {"autocomplete": "off"} }, passwordPeriod: { "text": lp.passwordPeriod, tType : "number", attr: {"autocomplete": "off"} }, - adminPassword: { "text": lp.adminPassword, type : "password", notEmpty: true, attr: {"autocomplete": "off"} }, + // adminPassword: { "text": lp.adminPassword, type : "password", notEmpty: true, attr: {"autocomplete": "off"} }, passwordRegex: { "text": lp.passwordRegex, tType : "text", notEmpty: true, attr: {"autocomplete": "off"} }, passwordRegexHint: { "text": lp.passwordRegexHint, tType : "text", notEmpty: true, attr: {"autocomplete": "off"} }, failureCount: { "text": lp.failureCount, tType : "number", attr: {"autocomplete": "off"} }, @@ -266,9 +273,9 @@ MWF.xApplication.ThreeMember.PasswordView = new Class({ ""+lp.failureIntervalNote+"" + "" + - ""+lp.adminPassword+"" + - ""+lp.adminPasswordNote+"" + - "" + + // ""+lp.adminPassword+"" + + // ""+lp.adminPasswordNote+"" + + // "" + ""+ "" + -- GitLab