| 123456789101112131415161718192021222324 |
- <?php
- namespace addons\Store\client\controllers;
- use addons\Store\common\services\StoreReserveSettingService;
- class ReserveSettingController extends BaseController{
- public function actionIndex()
- {
- $retuest = \Yii::$app->request;
- if ($retuest->isAjax) {
- if ($retuest->isPost) {
- $params = \Yii::$app->request->post();
- (new StoreReserveSettingService(['mall_id'=>$this->mall_id,'store_id'=>$this->store_id]))->edit($params);
- $this->success('获取成功', []);
- } else {
- $setting = (new StoreReserveSettingService(['mall_id'=>$this->mall_id,'store_id'=>$this->store_id]))->detail();
- $this->success('获取成功', ['setting'=>$setting??[]]);
- }
- }
- return $this->render($this->action->id);
- }
- }
|