shish 6 лет назад
Родитель
Сommit
441864bb92
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      app/business/controllers/GoodsController.php

+ 4 - 4
app/business/controllers/GoodsController.php

@@ -93,15 +93,15 @@ class GoodsController extends BaseController
 	//上下架 shish 2019.12.8
 	public function actionChangeStatus()
 	{
-		$get = Yii::$app->request->get();
-		$id = isset($get['id']) ? $get['id'] : 0;
-		$status = isset($get['status']) ? $get['status'] : 1;
+		$post = Yii::$app->request->post();
+		$id = isset($post['id']) ? $post['id'] : 0;
+		$status = isset($post['status']) ? $post['status'] : 1;
 		$info = GoodsService::getById($id);
 		GoodsService::valid($info, $this->merchantId);
 		GoodsService::changeStatus($id, $status);
 		util::ok();
 	}
-	
+
 	//发送短链接到手机上 shish 2019.12.8
 	public function actionSendShortUrl()
 	{