123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- // +----------------------------------------------------------------------
- // | Niucloud-admin 企业快速开发的saas管理平台
- // +----------------------------------------------------------------------
- // | 官方网址:https://www.niucloud.com
- // +----------------------------------------------------------------------
- // | niucloud团队 版权所有 开源版本可自由商用
- // +----------------------------------------------------------------------
- // | Author: Niucloud Team
- // +----------------------------------------------------------------------
- namespace app\adminapi\controller\web;
- use app\service\admin\web\WebConfigService;
- use core\base\BaseAdminController;
- use think\Response;
- class Config extends BaseAdminController
- {
- /**
- * 获取电脑端设置
- * @return Response
- */
- public function getWebConfig()
- {
- return success((new WebConfigService())->getWebConfig());
- }
- /**
- * 电脑端设置
- * @return Response
- */
- public function setWebConfig()
- {
- $data = $this->request->params([
- [ 'is_show_shop', 0 ], //是否显示甄选好店模块
- [ 'shop_ad_image', '' ], //店铺广告图
- [ 'site_ids', [] ] //选择展示的店铺id
- ]);
- $this->validate($data, 'app\validate\web\WebConfig.set');
- (new WebConfigService())->setWebConfig($data);
- return success('MODIFY_SUCCESS');
- }
- }
|