request->getBodyParam('status'); $data = \Yii::$app->request->getBodyParams(); $data['user'] = true; \Yii::$app->request->setBodyParams($data); $array = ['user_id' => Yii::$app->user->getId()]; if ($status) { $array['status'] = $status; } $filter = ['class' => 'yii\data\ActiveDataFilter', 'filter' => $array, 'searchModel' => ['class' => 'common\models\searchs\OrderSearch']]; return $filter; } public function actionCreate() { $originId = Yii::$app->request->getBodyParam('originId'); $count = Yii::$app->request->getBodyParam('count'); $skuId = Yii::$app->request->getBodyParam('skuId'); return Yii::$app->orderLogic->addGoods($originId, $count, $skuId); } /** * @return mixed * @throws \yii\base\InvalidConfigException */ public function actionUpdate() { $data = Yii::$app->request->getBodyParams(); return Yii::$app->orderLogic->update($data); } }