| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace hd\controllers;
- use bizHd\goods\classes\CategorySettingClass;
- use common\components\util;
- use Yii;
- /**
- * 商品分类配置:商城花材分类设置
- */
- class CategorySettingController extends BaseController
- {
- /**
- * 读取当前门店商城分类设置
- */
- public function actionDetail()
- {
- $info = CategorySettingClass::getOrInit($this->mainId, $this->shopId);
- util::success($info);
- }
- /**
- * 保存商城分类设置
- */
- public function actionSave()
- {
- $post = Yii::$app->request->post();
- $info = CategorySettingClass::saveSetting($this->mainId, $this->shopId, $post);
- util::success($info, '保存成功');
- }
- /**
- * 保存分类广告(仅 advertisement 字段)
- */
- public function actionSaveAdvertisement()
- {
- $post = Yii::$app->request->post();
- $advertisement = $post['advertisement'] ?? '';
- $info = CategorySettingClass::saveAdvertisement($this->mainId, $this->shopId, $advertisement);
- util::success($info, '保存成功');
- }
- }
|