Compare commits

..

No commits in common. "e25a0e47366648591a3f5cc9f77cbe9ea5f3bcb3" and "7aa55a7c1cf87835b565dae621df57e7ab088557" have entirely different histories.

3 changed files with 10 additions and 13 deletions

View File

@ -119,7 +119,6 @@ class ResourcesController extends BaseController
$data = [ $data = [
'title' => input('post.title'), 'title' => input('post.title'),
'cate' => input('post.cate'), 'cate' => input('post.cate'),
'desc' => input('post.desc'),
'icon' => input('post.icon'), 'icon' => input('post.icon'),
'images' => input('post.images'), 'images' => input('post.images'),
'url' => input('post.url'), 'url' => input('post.url'),
@ -127,6 +126,7 @@ class ResourcesController extends BaseController
'code' => input('post.code'), 'code' => input('post.code'),
'zipcode' => input('post.zipcode'), 'zipcode' => input('post.zipcode'),
'uploader' => input('post.uploader'), 'uploader' => input('post.uploader'),
'desc' => input('post.desc'),
'content' => input('post.content'), 'content' => input('post.content'),
'number' => input('post.number'), 'number' => input('post.number'),
'status' => input('post.status', 1), 'status' => input('post.status', 1),
@ -136,7 +136,7 @@ class ResourcesController extends BaseController
$insert = Resource::insert($data); $insert = Resource::insert($data);
if (empty($insert)) { if (empty($insert)) {
Log::record('添加资源', 0, '添加资源失败', '资源管理'); Log::record('添加资源', 0, '添加资源失败', '资源管理');
$this->error('添加失败'); return json(['code' => 1, 'msg' => '添加失败', 'data' => []]);
} }
Log::record('添加资源', 1, '', '资源管理'); Log::record('添加资源', 1, '', '资源管理');
return json(['code' => 0, 'msg' => '添加成功', 'data' => []]); return json(['code' => 0, 'msg' => '添加成功', 'data' => []]);
@ -154,11 +154,7 @@ class ResourcesController extends BaseController
View::assign([ View::assign([
'categories' => $categories 'categories' => $categories
]); ]);
return View::fetch(); return View::fetch();
} catch (\Exception $e) {
Log::record('添加资源页面加载', 0, $e->getMessage(), '资源管理');
$this->error('页面加载失败:' . $e->getMessage());
} }
} }
@ -222,9 +218,9 @@ class ResourcesController extends BaseController
if (!empty($resource['images'])) { if (!empty($resource['images'])) {
$domain = request()->domain(); $domain = request()->domain();
$images = explode(',', $resource['images']); $images = explode(',', $resource['images']);
// $images = array_map(function ($image) use ($domain) { $images = array_map(function ($image) use ($domain) {
// return $domain . $image; return $domain . $image;
// }, $images); }, $images);
$resource['images'] = implode(',', $images); $resource['images'] = implode(',', $images);
} }

View File

@ -788,8 +788,8 @@
} }
.delete-image { .delete-image {
/* background: #dc3545; */ background: #dc3545;
/* color: white; */ color: white;
border: none; border: none;
border-radius: 4px; border-radius: 4px;
padding: 8px 12px; padding: 8px 12px;
@ -803,7 +803,7 @@
} }
.delete-image i { .delete-image i {
font-size: 40px; font-size: 14px;
margin-right: 4px; margin-right: 4px;
/* 添加图标右边距 */ /* 添加图标右边距 */
} }

View File

@ -734,7 +734,8 @@
.disclaimers { .disclaimers {
color: #b1b1b1; color: #b1b1b1;
margin: 20px 0; width: 80%;
margin: 20px auto;
margin-bottom: 60px; margin-bottom: 60px;
} }