chengwl 5 năm trước cách đây
mục cha
commit
b80cb375de
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      controllers/SiteController.php

+ 2 - 2
controllers/SiteController.php

@@ -133,9 +133,9 @@ class SiteController extends Controller
         $id = $request->post('id');   
         if(is_array($id)){
             $ids=implode(',',$id);
+            $model = new Orderreturn(); 
+            $model->deleteAll('id in (' . $ids . ')');
         }
-        $model = new Orderreturn(); //你要批量删除的表
-        $model->deleteAll('id in (' . $ids . ')');
         return $this->redirect(['index']);
     }
     public function actionExport(){