feat : site

This commit is contained in:
2024-11-22 14:58:21 +08:00
parent 693b15cd3f
commit f2744910df
2 changed files with 3 additions and 1 deletions

View File

@@ -219,13 +219,14 @@ class SiteService extends BaseService
$id = (int)$this->request->input('id');
$name = $this->request->input('name');
$status = (int)$this->request->input('status');
$this->cityId = (int)$this->request->input('city_id');
$info = $this->siteModel->getInfoById($id);
$nameInfo = $this->siteModel->getInfoByName($name);
if (empty($info)) throw new ErrException('数据不存在');
if ($info->id != $nameInfo->id) throw new ErrException('数据已存在');
if ($this->request->input('city_id') != $info->city_id) throw new ErrException('城市不可更改');
if ($this->cityId != $info->city_id) throw new ErrException('城市不可更改');
$this->cityInfo = $this->systemCityModel->getInfoByCityId($info->cityId);
if ($status != SiteCode::SITE_DISABLE) {

View File

@@ -105,6 +105,7 @@ class OssCallbackService
'admin_avatar',
'avatar',
'menu',
'site',
];
/**