Jonlin 6 years ago
parent
commit
3fff830c57

+ 1 - 1
application/admin/controller/Sensitivec.php

@@ -175,7 +175,7 @@ class Sensitivec extends Base
                 }
             }
             db('sensitivewords')->insertAll($info); //批量插入数据
-            return json(['code' => 1, 'data' => url('sensitivec/index'), 'msg' => '插入敏感词成功']);
+            return json(['code' => 1, 'data' => $this->redirect('sensitivec/index'), 'msg' => '插入敏感词成功']);
         } else {
             return json(['code' => -2, 'data' => url('sensitivec/index'), 'msg' => '插入敏感词失败']);
         }

+ 7 - 7
application/admin/view/sensitivec/index.html

@@ -15,12 +15,12 @@
 <div class="wrapper wrapper-content animated fadeInRight">
     <!-- Panel Other -->
     <div class="ibox float-e-margins">
-        <input style="display:none;" type="text" value="1" id="type">
+        <input style="display:none;" type="text" value="2" id="type">
         <div style="display: flex;">
-            <div class="ibox-title" style="width: 100px; cursor:pointer;" id="current1" onclick="current(1)">
+            <div class="ibox-title" style="width: 100px; cursor:pointer;" id="current1" onclick="current(2)">
                 <h5>客服敏感词</h5>
             </div>
-            <div class="ibox-title" id="current2" style="width: 100px; cursor:pointer; background: #eee" onclick="current(2)">
+            <div class="ibox-title" id="current2" style="width: 100px; cursor:pointer; background: #eee" onclick="current(1)">
                 <h5>用户敏感词</h5>
             </div>
             <div class="ibox-title" style="width: calc(100% - 200px); background: #eee;">
@@ -90,11 +90,11 @@
     function current(id) {
         $("#type").val(id);
         if (id == 1) {
-            $("#current1").css("background","#fff");
-            $("#current2").css("background","#eee");
+            $("#current1").css("background","#eee");
+            $("#current2").css("background","#fff");
         } else if (id == 2) {
-            $("#current2").css({"background":"#fff"});
-            $("#current1").css({"background":"#eee"});
+            $("#current2").css({"background":"#eee"});
+            $("#current1").css({"background":"#fff"});
         }
         initTable()
     }