feat : site
This commit is contained in:
@@ -219,13 +219,14 @@ class SiteService extends BaseService
|
|||||||
$id = (int)$this->request->input('id');
|
$id = (int)$this->request->input('id');
|
||||||
$name = $this->request->input('name');
|
$name = $this->request->input('name');
|
||||||
$status = (int)$this->request->input('status');
|
$status = (int)$this->request->input('status');
|
||||||
|
$this->cityId = (int)$this->request->input('city_id');
|
||||||
|
|
||||||
$info = $this->siteModel->getInfoById($id);
|
$info = $this->siteModel->getInfoById($id);
|
||||||
$nameInfo = $this->siteModel->getInfoByName($name);
|
$nameInfo = $this->siteModel->getInfoByName($name);
|
||||||
|
|
||||||
if (empty($info)) throw new ErrException('数据不存在');
|
if (empty($info)) throw new ErrException('数据不存在');
|
||||||
if ($info->id != $nameInfo->id) 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);
|
$this->cityInfo = $this->systemCityModel->getInfoByCityId($info->cityId);
|
||||||
|
|
||||||
if ($status != SiteCode::SITE_DISABLE) {
|
if ($status != SiteCode::SITE_DISABLE) {
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ class OssCallbackService
|
|||||||
'admin_avatar',
|
'admin_avatar',
|
||||||
'avatar',
|
'avatar',
|
||||||
'menu',
|
'menu',
|
||||||
|
'site',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user