songxingwei 2 年之前
父節點
當前提交
745c922aa4
共有 2 個文件被更改,包括 28 次插入1 次删除
  1. 28 0
      app/admin/controller/BestKnowledge.php
  2. 0 1
      app/admin/controller/TeachingKnowledge.php

+ 28 - 0
app/admin/controller/BestKnowledge.php

@@ -158,4 +158,32 @@ class BestKnowledge extends Controller
     public function edit(){
         DataBestKnowledge::mForm('form');
     }
+    public function _form_filter($vo){
+
+        if ($this->request->isGet()) {
+            if (isset($vo['id'])){
+                if (isset($vo['imgs'])){
+                    $vo['imgs']= implode('|',explode(',',implode(',',$vo['imgs'])));
+                }
+
+                $this->assign('vo',$vo);
+                $this->fetch('form');
+            }
+
+        }elseif ($this->request->isPost()){
+            $vo['imgs'] = implode(',',explode('|',$vo['imgs']));
+            $vo['audit'] =2;
+        }
+    }
+    /**
+     * 删除
+     * @auth true
+     * @menu true
+     */
+    public function del($id){
+        DataTeachingKnowledge::whereIn('id',$id)->save([
+            'is_del'=>0,
+        ]);
+        $this->success('删除成功');
+    }
 }

+ 0 - 1
app/admin/controller/TeachingKnowledge.php

@@ -89,7 +89,6 @@ class TeachingKnowledge extends Controller
         }elseif ($this->request->isPost()){
             $vo['imgs'] = implode(',',explode('|',$vo['imgs']));
             $vo['audit'] =2;
-            dump($vo);
         }
     }
     /**