|
@@ -76,18 +76,18 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
{
|
|
|
var_dump("网站数据:", $data);
|
|
|
$insertData = [
|
|
|
- 'website_name' => $data['website_name'],
|
|
|
- 'logo' => $data['logo'] ?? '',
|
|
|
- 'website_url' => $data['website_url'] ?? '',
|
|
|
- 'city_id' => $data['city_id'] ?? 0,
|
|
|
- 'website_column_id' => $data['website_column_id'],
|
|
|
- 'title' => $data['title'] ?? '',
|
|
|
- 'keywords' => $data['keywords'] ?? '',
|
|
|
- 'description' => $data['description'] ?? '',
|
|
|
- 'status' => $data['status'] ?? 0,
|
|
|
- 'website_column_arr_id' => $data['website_column_arr_id'],
|
|
|
- 'city_arr_id' => $data['city_arr_id'] ?? [0],
|
|
|
- 'template_id' => $data['template_id'] ?? 0,
|
|
|
+ 'website_name'=>$data['website_name'],
|
|
|
+ 'logo'=>$data['logo']??'',
|
|
|
+ 'website_url'=>$data['website_url']??'',
|
|
|
+ // 'city_id'=>$data['city_id']??0,
|
|
|
+ 'website_column_id'=>$data['website_column_id'],
|
|
|
+ 'title'=>$data['title']??'',
|
|
|
+ 'keywords'=>$data['keywords']??'',
|
|
|
+ 'description'=>$data['description']??'',
|
|
|
+ 'status'=>$data['status']??0,
|
|
|
+ 'website_column_arr_id'=>$data['website_column_arr_id'],
|
|
|
+ // 'city_arr_id'=>$data['city_arr_id']??[0],
|
|
|
+ 'template_id' =>$data['template_id']??0,
|
|
|
];
|
|
|
$result = Website::insertGetId($insertData);
|
|
|
if (empty($result)) {
|
|
@@ -105,18 +105,18 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
public function updateWebsite(int $id, array $data): array
|
|
|
{
|
|
|
$insertData = [
|
|
|
- 'website_name' => $data['website_name'],
|
|
|
- 'logo' => $data['logo'] ?? '',
|
|
|
- 'website_url' => $data['website_url'] ?? '',
|
|
|
- 'city_id' => $data['city_id'] ?? 0,
|
|
|
- 'website_column_id' => $data['website_column_id'],
|
|
|
- 'title' => $data['title'] ?? '',
|
|
|
- 'keywords' => $data['keywords'] ?? '',
|
|
|
- 'description' => $data['description'] ?? '',
|
|
|
- 'status' => $data['status'] ?? 0,
|
|
|
- 'website_column_arr_id' => $data['website_column_arr_id'],
|
|
|
- 'city_arr_id' => $data['city_arr_id'] ?? [0],
|
|
|
- 'template_id' => $data['template_id'] ?? 0,
|
|
|
+ 'website_name'=>$data['website_name'],
|
|
|
+ 'logo'=>$data['logo']??'',
|
|
|
+ 'website_url'=>$data['website_url']??'',
|
|
|
+ // 'city_id'=>$data['city_id']??0,
|
|
|
+ 'website_column_id'=>$data['website_column_id'],
|
|
|
+ 'title'=>$data['title']??'',
|
|
|
+ 'keywords'=>$data['keywords']??'',
|
|
|
+ 'description'=>$data['description']??'',
|
|
|
+ 'status'=>$data['status']??0,
|
|
|
+ 'website_column_arr_id'=>$data['website_column_arr_id'],
|
|
|
+ // 'city_arr_id'=>$data['city_arr_id']??[0],
|
|
|
+ 'template_id' =>$data['template_id']??0,
|
|
|
];
|
|
|
$result = Website::where('id', $id)->update($insertData);
|
|
|
var_dump("更新站点", $result);
|