123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?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', ''],
- ['latitude', ''],
- ['longitude', ''],
- ['province_id', ''],
- ['city_id', ''],
- ['district_id', ''],
- ['address', ''],
- ['full_address', ''],
- ['business_hours', '']
- ]);
- $this->validate($data, 'app\validate\site\Site.site_set');
- (new SettingService())->setBasicInfo($data);
- return success('EDIT_SUCCESS');
- }
- /**
- * 获取店铺信息
- * @return \think\Response
- */
- public function getShopInfo()
- {
- return success((new SettingService())->getShopInfo());
- }
- }
|