Эх сурвалжийг харах

Merge branch 'master' of http://git.bocai108.com:10180/Ethan/Customer-Service

Jonlin 6 жил өмнө
parent
commit
691a9d99b7

+ 13 - 3
application/admin/view/kfnotice/add.html

@@ -90,6 +90,11 @@
 <script src="__JS__/layui/layui.js"></script>
 <script src="__JS__/jquery.form.js"></script>
 <script type="text/javascript">
+    var ifuid = {$userid};
+
+    function getifuid() {
+        return ifuid;
+    }
 
     layui.use(['form', 'upload'], function () {
         var form = layui.form;
@@ -107,9 +112,14 @@
         layer.ready(function () {
             layer.close(index);
             if (1 == res.code) {
-                layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function () {
-                    window.location.href = '/admin/kfnotice/index.html';
-                });
+                if (!getifuid()) {
+                    layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function () {
+                        window.location.href = '/admin/kfnotice/index.html';
+                    });
+                } else {
+                    var index = parent.layer.getFrameIndex(window.name);
+                    parent.layer.close(index);
+                }
             } else if (111 == res.code) {
                 window.location.reload();
             } else {