From 93ec8c50adfce76322d55b785c7ed08b83bf4654 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 18 十一月 2020 10:54:59 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/common.js |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index fa66fe0..a2f6af8 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -1,8 +1,6 @@
-// 鐢熶骇
-// var baseUrl = "/wcs";
-// 娴嬭瘯
-var baseUrl = "";
+var baseUrl = "/jswcs";
 
+// 璧嬪��
 function setVal(el, val) {
     if (el.text() !== val){
         el.html(val);
@@ -85,7 +83,7 @@
                         (child?parent:window).$('.'+res.data[i].code).css("display", "inline-block");
                     }
                 } else if (res.code === 403){
-                    top.location.href = baseUrl;
+                    window.location.href = baseUrl;
                 } else {
                     layer.msg(res.msg)
                 }
@@ -142,9 +140,9 @@
                     if (res.code === 200){
                         callback(res);
                     } else if (res.code === 403){
-                        top.location.href = baseUrl+"/login";
+                        parent.location.href = baseUrl+"/login";
                     }  else {
-                        alert(res.msg);
+                        layer.msg(res.msg, {icon: 2});
                     }
                 },
                 error: function (res, type) {
@@ -159,3 +157,15 @@
         return http
     }) : "object" == typeof module && module.exports ? module.exports = http : n.http = http
 }(this);
+
+/**
+ * 鑾峰彇url閿�煎
+ */
+function getUrlVal(key) {
+    var reg = new RegExp('(^|&)' + key + '=([^&]*)(&|$)', 'i');
+    var r = window.location.search.substr(1).match(reg);
+    if (r != null) {
+        return unescape(r[2]);
+    }
+    return null;
+}
\ No newline at end of file

--
Gitblit v1.9.1