get_store_id()]); if (!$list) { $list = new SmsSetting(); } if (\Yii::$app->request->isPost) { $form->store_id = get_store_id(); $form->sms = $list; $post = post_params(); if ($post['status'] == 1) { $form->scenario = 'SUCCESS'; } $form->attributes = $post; return $this->asJson($form->save()); } return $this->asJson([ 'code' => 0, 'msg' => 'success', 'data' => [ 'sms' => $list, ] ]); } }