From f85b5202dc73340ba40a0b4512e606b574a92518 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 15 May 2019 19:03:54 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=93=8D=E5=BA=94=E5=AE=8C?=
 =?UTF-8?q?=E6=88=90=E5=90=8E=E7=9A=84=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 README.md                                     |  2 +-
 .../main/resources/static/ruoyi/js/common.js  |  8 +++---
 .../main/resources/static/ruoyi/js/ry-ui.js   | 26 ++++++++++++++-----
 .../system/user/profile/profile.html          |  5 ----
 4 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/README.md b/README.md
index 9ba7ca80..5fc0c050 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
 
 性别男,若依是给还没有出生女儿取的名字(寓意:你若不离不弃,我必生死相依)
 
-若依基于hplus和inspinia两套后台系统模板开发。有需要可自行到群内下载。
+若依参考后台模板。有需要可自行到群内下载。
 
 > 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast)  `(保持同步更新)`,如需Oracle版本,请移步 [RuoYi-oracle](http://doc.ruoyi.vip/#/standard/xmkz)  `(不定时更新)`
 
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
index f5e227fe..e7994b50 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
@@ -238,10 +238,12 @@ var log = {
 $.ajaxSetup({
     complete: function(XMLHttpRequest, textStatus) {
         if (textStatus == 'timeout') {
-            $.modal.alertWarning("服务器超时,请稍后再试!");
+        	$.modal.alertWarning("服务器超时,请稍后再试!");
+        	$.modal.enable();
             $.modal.closeLoading();
-        } else if (textStatus == "parsererror") {
-            $.modal.alertWarning("服务器错误,请联系管理员!");
+        } else if (textStatus == "parsererror" || textStatus == "error") {
+        	$.modal.alertWarning("服务器错误,请联系管理员!");
+        	$.modal.enable();
             $.modal.closeLoading();
         }
     }
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
index ba31cb76..2eaf401b 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
@@ -688,7 +688,7 @@
         // 操作封装处理
         operate: {
         	// 提交数据
-        	submit: function(url, type, dataType, data) {
+        	submit: function(url, type, dataType, data, callback) {
             	var config = {
         	        url: url,
         	        type: type,
@@ -698,18 +698,21 @@
         	        	$.modal.loading("正在处理中,请稍后...");
         	        },
         	        success: function(result) {
+        	        	if (typeof callback == "function") {
+        	        	    callback(result);
+        	        	}
         	        	$.operate.ajaxSuccess(result);
         	        }
         	    };
         	    $.ajax(config)
             },
             // post请求传输
-            post: function(url, data) {
-            	$.operate.submit(url, "post", "json", data);
+            post: function(url, data, callback) {
+            	$.operate.submit(url, "post", "json", data, callback);
             },
             // get请求传输
             get: function(url) {
-            	$.operate.submit(url, "get", "json", "");
+            	$.operate.submit(url, "get", "json", "", callback);
             },
             // 详细信息
             detail: function(id, width, height) {
@@ -834,7 +837,7 @@
                 return url;
             },
             // 保存信息 刷新表格
-            save: function(url, data) {
+            save: function(url, data, callback) {
             	var config = {
         	        url: url,
         	        type: "post",
@@ -845,13 +848,16 @@
         	        	$.modal.disable();
         	        },
         	        success: function(result) {
+        	        	if (typeof callback == "function") {
+        	        	    callback(result);
+        	        	}
         	        	$.operate.successCallback(result);
         	        }
         	    };
         	    $.ajax(config)
             },
             // 保存信息 弹出提示框
-            saveModal: function(url, data) {
+            saveModal: function(url, data, callback) {
             	var config = {
         	        url: url,
         	        type: "post",
@@ -861,6 +867,9 @@
         	        	$.modal.loading("正在处理中,请稍后...");
         	        },
         	        success: function(result) {
+        	        	if (typeof callback == "function") {
+        	        	    callback(result);
+        	        	}
         	        	if (result.code == web_status.SUCCESS) {
 	                        $.modal.alertSuccess(result.msg)
 	                    } else if (result.code == web_status.WARNING) {
@@ -874,7 +883,7 @@
         	    $.ajax(config)
             },
             // 保存选项卡信息
-            saveTab: function(url, data) {
+            saveTab: function(url, data, callback) {
             	var config = {
         	        url: url,
         	        type: "post",
@@ -884,6 +893,9 @@
         	        	$.modal.loading("正在处理中,请稍后...");
         	        },
         	        success: function(result) {
+        	        	if (typeof callback == "function") {
+        	        	    callback(result);
+        	        	}
         	        	$.operate.successTabCallback(result);
         	        }
         	    };
diff --git a/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html b/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html
index c8180644..3a0ea270 100644
--- a/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html
+++ b/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html
@@ -2,10 +2,6 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <head>
 	<th:block th:include="include :: header('用户个人信息')" />
-    <style type="text/css">
-    
-    
-    </style>
 </head>
 
 <body class="gray-bg" style="font: 14px Helvetica Neue, Helvetica, PingFang SC, 微软雅黑, Tahoma, Arial, sans-serif !important;">
@@ -220,7 +216,6 @@
 	        }
 	    }
 	    
-	    
 	    /*用户管理-修改密码*/
 	    $("#form-user-resetPwd").validate({
 	    	onkeyup: false,