chengwl %!s(int64=5) %!d(string=hai) anos
pai
achega
b80cb375de
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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(){