request->get('style', 0); try { $config = PsMethodClass::getConfig($this->shopId, $this->mainId, $style); util::success($config); } catch (\Exception $e) { util::fail($e->getMessage()); } } /** * 获取所有配送方式的排序与别名(底部预览用) */ public function actionGetSorts() { try { $sorts = PsMethodClass::getSorts($this->mainId); util::success($sorts); } catch (\Exception $e) { util::fail($e->getMessage()); } } /** * 保存指定配送方式配置 */ public function actionSaveConfig() { $post = Yii::$app->request->post(); try { PsMethodClass::saveConfig($this->shopId, $this->mainId, $post); util::complete('保存成功'); } catch (\Exception $e) { util::fail($e->getMessage()); } } }