Merge branch 'master' of https://git.yunzer.cn/yunzerwebsite/yunzer
This commit is contained in:
commit
48829a5e2a
@ -119,6 +119,7 @@ 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'),
|
||||||
@ -126,7 +127,6 @@ 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, '添加资源失败', '资源管理');
|
||||||
return json(['code' => 1, 'msg' => '添加失败', 'data' => []]);
|
$this->error('添加失败');
|
||||||
}
|
}
|
||||||
Log::record('添加资源', 1, '', '资源管理');
|
Log::record('添加资源', 1, '', '资源管理');
|
||||||
return json(['code' => 0, 'msg' => '添加成功', 'data' => []]);
|
return json(['code' => 0, 'msg' => '添加成功', 'data' => []]);
|
||||||
@ -154,7 +154,11 @@ 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,9 +222,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -813,8 +813,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;
|
||||||
@ -828,7 +828,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.delete-image i {
|
.delete-image i {
|
||||||
font-size: 14px;
|
font-size: 40px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
/* 添加图标右边距 */
|
/* 添加图标右边距 */
|
||||||
}
|
}
|
||||||
|
|||||||
@ -734,8 +734,7 @@
|
|||||||
|
|
||||||
.disclaimers {
|
.disclaimers {
|
||||||
color: #b1b1b1;
|
color: #b1b1b1;
|
||||||
width: 80%;
|
margin: 20px 0;
|
||||||
margin: 20px auto;
|
|
||||||
margin-bottom: 60px;
|
margin-bottom: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user