[ 'class' => VerbFilter::className(), 'actions' => [ 'delete' => ['POST'], ], ], ]; } /** * Lists all AfterSale models. * @return mixed * @throws \yii\web\ServerErrorHttpException */ public function actionCustomMenu() { $wxPublicAccountConfig = WxPublicAccountConfig::find()->one(); if (Yii::$app->request->isPost) { Yii::$app->response->format = 'json'; $data = Yii::$app->request->post('data'); $res = PublicAccountManager::dealCustomMenuData($data, $wxPublicAccountConfig); if ($res) { return ['status' => true]; } else { return ['status' => false, 'info' => $res['info']]; } } return $this->render('custom_menu', [ 'customPageList' => [], 'data' => $wxPublicAccountConfig->menu_setting ?: '[]' ]); } }