12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- // +----------------------------------------------------------------------
- // | Niucloud-admin 企业快速开发的多应用管理平台
- // +----------------------------------------------------------------------
- // | 官方网址:https://www.niucloud.com
- // +----------------------------------------------------------------------
- // | niucloud团队 版权所有 开源版本可自由商用
- // +----------------------------------------------------------------------
- // | Author: Niucloud Team
- // +----------------------------------------------------------------------
- namespace app\adminapi\controller\shop\site;
- use app\service\admin\shop\site\SettingService;
- use core\base\BaseAdminController;
- /**
- * 店铺设置
- */
- class Setting extends BaseAdminController
- {
- /**
- * 获取店铺基本信息
- * @return \think\Response
- */
- public function getBasicInfo()
- {
- return success((new SettingService())->getBasicInfo());
- }
- /**
- * 修改店铺基本信息
- * @return \think\Response
- */
- public function setBasicInfo()
- {
- $data = $this->request->params([
- ['site_name', ''],
- ['phone', ''],
- ['logo', ''],
- ['icon', ''],
- ['keywords', ''],
- ['desc', ''],
- ['front_end_name', ''],
- ['front_end_logo', ''],
- ]);
- $this->validate($data, 'app\validate\site\Site.edit');
- (new SettingService())->setBasicInfo($data);
- return success('EDIT_SUCCESS');
- }
- /**
- * 获取店铺信息
- * @return \think\Response
- */
- public function getShopInfo()
- {
- return success((new SettingService())->getShopInfo());
- }
- }
|