From 05c387985a7e2bc58f95831fd1f175f36cfde027 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Thu, 12 Dec 2019 15:44:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BF=AE=E6=94=B9=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=99=A8=E5=A4=84=E7=90=86=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=96=B9=E6=B3=95=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/modules/shop/controllers/AfterSaleController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/modules/shop/controllers/AfterSaleController.php b/backend/modules/shop/controllers/AfterSaleController.php index 6b6bfad..36176aa 100644 --- a/backend/modules/shop/controllers/AfterSaleController.php +++ b/backend/modules/shop/controllers/AfterSaleController.php @@ -8,6 +8,8 @@ use backend\modules\shop\models\searchs\AfterSaleSearch; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; +use iron\widget\Excel; +use yii\web\Response; /** * AfterSaleController implements the CRUD actions for AfterSale model. @@ -105,7 +107,7 @@ class AfterSaleController extends Controller */ public function actionDelete($id) { - $this->findModel($id)->delete(); + $this->findModel($id); return $this->redirect(['index']); } @@ -138,7 +140,7 @@ class AfterSaleController extends Controller } else { $dataProvider = $searchModel->search($params); } - \iron\widget\Excel::export([ + Excel::export([ 'models' => $dataProvider->getModels(), 'format' => 'Xlsx', 'asAttachment' => true, @@ -150,7 +152,7 @@ class AfterSaleController extends Controller /** * @param $status * @param $id - * @return \yii\web\Response + * @return Response * 处理售后申请 */ public function actionHandle($status, $id)