From dcaddd08c699a87b099811e9a7a73bb358edef5d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 27 八月 2021 16:24:41 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/waitMatin/waitMatin.js |   61 +++++++++---------------------
 1 files changed, 19 insertions(+), 42 deletions(-)

diff --git a/src/main/webapp/static/js/waitMatin/waitMatin.js b/src/main/webapp/static/js/waitMatin/waitMatin.js
index 6c2059d..c00edbf 100644
--- a/src/main/webapp/static/js/waitMatin/waitMatin.js
+++ b/src/main/webapp/static/js/waitMatin/waitMatin.js
@@ -166,49 +166,26 @@
                         layer.msg('鍗曟嵁鏄庣粏鏁伴噺涓嶅悎娉�', {icon: 2});
                         return false;
                     }
-                    if (isExpAdd) {
-                        layer.load(2);
-                        $.ajax({
-                            url: baseUrl+"/waitMatin/add/auth",
-                            headers: {'token': localStorage.getItem('token')},
-                            data: JSON.stringify(param),
-                            contentType:'application/json;charset=UTF-8',
-                            method: 'POST',
-                            success: function (res) {
-                                layer.closeAll('loading');
-                                if (res.code === 200){
-                                    layer.close(dIndex);
-                                    insTb.reload({page: {curr: 1}});
-                                    layer.msg(res.msg, {icon: 1});
-                                } else if (res.code === 403){
-                                    top.location.href = baseUrl+"/";
-                                }else {
-                                    layer.msg(res.msg, {icon: 2});
-                                }
+                    layer.load(2);
+                    $.ajax({
+                        url: baseUrl+"/waitMatin/" + (isExpAdd?"add":"modify") + "/auth",
+                        headers: {'token': localStorage.getItem('token')},
+                        data: JSON.stringify(param),
+                        contentType:'application/json;charset=UTF-8',
+                        method: 'POST',
+                        success: function (res) {
+                            layer.closeAll('loading');
+                            if (res.code === 200){
+                                layer.close(dIndex);
+                                insTb.reload({page: {curr: 1}});
+                                layer.msg(res.msg, {icon: 1});
+                            } else if (res.code === 403){
+                                top.location.href = baseUrl+"/";
+                            }else {
+                                layer.msg(res.msg, {icon: 2});
                             }
-                        })
-                    } else {
-                        layer.load(2);
-                        $.ajax({
-                            url: baseUrl+"/waitMatin/modify/auth",
-                            headers: {'token': localStorage.getItem('token')},
-                            data: JSON.stringify(param),
-                            contentType:'application/json;charset=UTF-8',
-                            method: 'POST',
-                            success: function (res) {
-                                layer.closeAll('loading');
-                                if (res.code === 200){
-                                    layer.close(dIndex);
-                                    insTb.reload({page: {curr: 1}});
-                                    layer.msg(res.msg, {icon: 1});
-                                } else if (res.code === 403){
-                                    top.location.href = baseUrl+"/";
-                                }else {
-                                    layer.msg(res.msg, {icon: 2});
-                                }
-                            }
-                        })
-                    }
+                        }
+                    })
                     return false;
                 });
                 // 鏄庣粏琛ㄦ牸

--
Gitblit v1.9.1