阶段更新
This commit is contained in:
@@ -45,19 +45,23 @@ class IndexController extends AdminController
|
||||
* Make a form builder.
|
||||
* @return Form
|
||||
*/
|
||||
protected function form()
|
||||
protected function form(): Form
|
||||
{
|
||||
$form = new Form(new Advert);
|
||||
|
||||
$form->text('title', '广告名称')->required();
|
||||
$form->select('category_id', '所属分类')
|
||||
->options(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)->where('type', Category::TYPE_ADVERT);
|
||||
}, '选择分类'))
|
||||
->options(function () {
|
||||
return Category::query()
|
||||
->where('status', 1)
|
||||
->where('type', Category::TYPE_ADVERT)
|
||||
->pluck('title', 'id');
|
||||
})
|
||||
->rules('required|min:1', [
|
||||
'required' => '必须选择所属分类',
|
||||
'min' => '必须选择所属分类',
|
||||
]);
|
||||
|
||||
$form->image('cover', '封面图片')
|
||||
->rules(function ($form) {
|
||||
if ($form->model()->cover != []) {
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Admin\Controllers\Article;
|
||||
use App\Admin\Selectable\CategorySelectAble;
|
||||
use App\Models\Article;
|
||||
use App\Models\Category;
|
||||
use App\Models\CategoryOld;
|
||||
use Encore\Admin\Controllers\AdminController;
|
||||
use Encore\Admin\Form;
|
||||
use Encore\Admin\Grid;
|
||||
@@ -24,6 +25,7 @@ class IndexController extends AdminController
|
||||
$filter->equal('category_id', '所属分类')->select(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)->whereIn('type', [Category::TYPE_ARTICLE, Category::TYPE_SHOW]);
|
||||
}, '所有分类'));
|
||||
|
||||
});
|
||||
|
||||
$filter->disableIdFilter();
|
||||
@@ -32,6 +34,7 @@ class IndexController extends AdminController
|
||||
$grid->column('id', '#ID#');
|
||||
$grid->column('cover', '封面图片')->image('', 100);
|
||||
$grid->column('category.title', '所属分类');
|
||||
$grid->column('category_old.title', '所属老分类');
|
||||
$grid->column('title', '文章标题');
|
||||
$states = [
|
||||
'on' => ['value' => 1, 'text' => '打开', 'color' => 'primary'],
|
||||
@@ -50,10 +53,11 @@ class IndexController extends AdminController
|
||||
|
||||
$form->text('title', '文章标题')->rules('min:2');
|
||||
$form->text('remark', '子标题');
|
||||
$form->select('category_id', '上级分类')
|
||||
$form->select('category_id', '所属分类')
|
||||
->options(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)->whereIn('type', [Category::TYPE_ARTICLE, Category::TYPE_SHOW]);
|
||||
}, '一级分类'));
|
||||
|
||||
$form->textarea('description', '内容简介');
|
||||
$form->image('cover', '封面')
|
||||
->move('images/' . date('Y/m/d'))
|
||||
|
||||
82
app/Admin/Controllers/Article/OldController.php
Normal file
82
app/Admin/Controllers/Article/OldController.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
namespace App\Admin\Controllers\Article;
|
||||
|
||||
use App\Admin\Selectable\CategorySelectAble;
|
||||
use App\Models\ArticleOld;
|
||||
use App\Models\Category;
|
||||
use Encore\Admin\Controllers\AdminController;
|
||||
use Encore\Admin\Form;
|
||||
use Encore\Admin\Grid;
|
||||
|
||||
class OldController extends AdminController
|
||||
{
|
||||
|
||||
protected $title = '内容管理';
|
||||
|
||||
public function grid()
|
||||
{
|
||||
$grid = new Grid(new ArticleOld);
|
||||
$grid->model()->orderBy('id', 'desc');
|
||||
$grid->filter(function ($filter) {
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
$filter->like('title', '文章标题');
|
||||
$filter->equal('category_id', '所属分类')->select(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)
|
||||
->whereIn('type', [Category::TYPE_ARTICLE, Category::TYPE_SHOW]);
|
||||
}, '所有分类'));
|
||||
});
|
||||
|
||||
$filter->disableIdFilter();
|
||||
});
|
||||
|
||||
$grid->column('id', '#ID#');
|
||||
$grid->column('cover', '封面图片')->image('', 100);
|
||||
$grid->column('category.title', '所属分类');
|
||||
$grid->column('title', '文章标题');
|
||||
$states = [
|
||||
'on' => ['value' => 1, 'text' => '打开', 'color' => 'primary'],
|
||||
'off' => ['value' => 2, 'text' => '关闭', 'color' => 'default'],
|
||||
];
|
||||
$grid->column('status', '状态')->switch($states);
|
||||
$grid->column('sort', '序号');
|
||||
$grid->column('测试')->display(function () {
|
||||
$cids = $this->categories()->pluck('id')->toArray();
|
||||
if (empty($this->category_id) && !empty($cids)) {
|
||||
$this->category_id = $cids[0];
|
||||
$this->save();
|
||||
}
|
||||
});
|
||||
$grid->column('created_at', '创建时间');
|
||||
|
||||
return $grid;
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
$form = new Form(new ArticleOld);
|
||||
|
||||
$form->text('title', '文章标题')->rules('min:2');
|
||||
$form->text('remark', '子标题');
|
||||
$form->select('category_id', '上级分类')
|
||||
->options(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)->whereIn('type', [Category::TYPE_ArticleOld, Category::TYPE_SHOW]);
|
||||
}, '一级分类'));
|
||||
$form->textarea('description', '内容简介');
|
||||
$form->image('cover', '封面')
|
||||
->move('images/' . date('Y/m/d'))
|
||||
->removable()
|
||||
->uniqueName();
|
||||
$form->ueditor('content', '文章内容')->rules('required', ['required' => '详情不能为空']);
|
||||
$form->number('sort', '序号')->default(0)->rules('required', ['required' => '序号必须填写'])->help('倒序优先');
|
||||
$states = [
|
||||
'on' => ['value' => 1, 'text' => '打开', 'color' => 'success'],
|
||||
'off' => ['value' => 0, 'text' => '关闭', 'color' => 'danger'],
|
||||
];
|
||||
$form->datetime('created_at', '发布时间');
|
||||
$form->switch('status', '状态')->states($states)->default(1);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class IndexController extends AdminController
|
||||
->when('show', function (WidgetsForm $form) {
|
||||
$form->select('article_id', '关联文章')
|
||||
->options(function ($option, $info) {
|
||||
return Article::whereHas('categories', function ($q) {
|
||||
return Article::whereHas('category', function ($q) {
|
||||
$q->where('type', 'show');
|
||||
})->pluck('title', 'id');
|
||||
})->help('当分类类型是文章详情的时候需要选择关联文章');
|
||||
@@ -109,7 +109,7 @@ class IndexController extends AdminController
|
||||
->when('show', function (Form $form) {
|
||||
$form->select('article_id', '关联文章')
|
||||
->options(function ($option, $info) {
|
||||
return Article::whereHas('categories', function ($q) {
|
||||
return Article::whereHas('category', function ($q) {
|
||||
$q->where('type', 'show');
|
||||
})->pluck('title', 'id');
|
||||
})->help('当分类类型是文章详情的时候需要选择关联文章');
|
||||
|
||||
155
app/Admin/Controllers/Category/OldController.php
Normal file
155
app/Admin/Controllers/Category/OldController.php
Normal file
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
|
||||
namespace App\Admin\Controllers\Category;
|
||||
|
||||
use App\Models\Article;
|
||||
use App\Models\CategoryOld;
|
||||
use Encore\Admin\Controllers\AdminController;
|
||||
use Encore\Admin\Form;
|
||||
use Encore\Admin\Layout\Column;
|
||||
use Encore\Admin\Layout\Row;
|
||||
use Encore\Admin\Tree;
|
||||
use Encore\Admin\Widgets\Box;
|
||||
use Encore\Admin\Widgets\Form as WidgetsForm;
|
||||
|
||||
class OldController extends AdminController
|
||||
{
|
||||
|
||||
protected $title = '分类管理';
|
||||
|
||||
/**
|
||||
* Index interface.
|
||||
* @return \Closure
|
||||
*/
|
||||
public function grid()
|
||||
{
|
||||
return function (Row $row) {
|
||||
$row->column(6, $this->treeView());
|
||||
|
||||
$row->column(6, function (Column $column) {
|
||||
$form = new WidgetsForm();
|
||||
|
||||
$form->select('parent_id', '上级分类')->options(CategoryOld::selectOptions(function ($model) {
|
||||
return $model->where('status', 1);
|
||||
}, '一级分类'));
|
||||
$form->text('title', '分类名称')->rules('required');
|
||||
$form->text('alias', '别名');
|
||||
$form->select('type', '分类类型')
|
||||
->options(CategoryOld::TYPES)
|
||||
->when('show', function (WidgetsForm $form) {
|
||||
$form->select('article_id', '关联文章')
|
||||
->options(function ($option, $info) {
|
||||
return Article::whereHas('categories', function ($q) {
|
||||
$q->where('type', 'show');
|
||||
})->pluck('title', 'id');
|
||||
})->help('当分类类型是文章详情的时候需要选择关联文章');
|
||||
})
|
||||
->required();
|
||||
$form->textarea('description', '分类简介')
|
||||
->rules('nullable');
|
||||
$form->image('logo', 'Logo')
|
||||
->move('logos/' . date('Y/m/d'))
|
||||
->removable()
|
||||
->uniqueName();
|
||||
$form->image('cover', '封面')
|
||||
->move('images/' . date('Y/m/d'))
|
||||
->removable()
|
||||
->uniqueName();
|
||||
$form->text('template', '模板');
|
||||
$form->number('order', '排序')->default(0);
|
||||
$form->switch('top_show', '顶部导航显示')->states()->default(0);
|
||||
$form->switch('status', '显示')->states()->default(1);
|
||||
$form->action(admin_url('categories'));
|
||||
|
||||
$column->append((new Box('新增分类', $form))->style('success'));
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Tree
|
||||
*/
|
||||
protected function treeView()
|
||||
{
|
||||
return CategoryOld::tree(function (Tree $tree) {
|
||||
$tree->disableCreate();
|
||||
|
||||
$tree->branch(function ($branch) {
|
||||
if ($branch['status'] == 1) {
|
||||
$payload = "<i class='fa fa-eye text-primary'></i> ";
|
||||
} else {
|
||||
$payload = "<i class='fa fa-eye text-gray'></i> ";
|
||||
}
|
||||
$payload .= " [ID:{$branch['id']}] - ";
|
||||
$payload .= " <strong>{$branch['title']}</strong> ";
|
||||
$payload .= " <strong>{$branch['alias']}</strong> ";
|
||||
$payload .= " <small>{$branch['type']}</small> ";
|
||||
$payload .= " <small style='color:#999'>{$branch['template']}</small>";
|
||||
|
||||
return $payload;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a form builder.
|
||||
* @return Form
|
||||
*/
|
||||
protected function form(): Form
|
||||
{
|
||||
$form = new Form(new CategoryOld);
|
||||
|
||||
$form->select('parent_id', '上级分类')->options(CategoryOld::selectOptions(function ($model) {
|
||||
return $model->where('status', 1);
|
||||
}, '一级分类'));
|
||||
$form->text('title', '分类名称')->rules('required');
|
||||
$form->text('alias', '别名');
|
||||
$form->select('type', '分类类型')
|
||||
->options(CategoryOld::TYPES)
|
||||
->when('show', function (Form $form) {
|
||||
$form->select('article_id', '关联文章')
|
||||
->options(function ($option, $info) {
|
||||
return Article::whereHas('categories', function ($q) {
|
||||
$q->where('type', 'show');
|
||||
})->pluck('title', 'id');
|
||||
})->help('当分类类型是文章详情的时候需要选择关联文章');
|
||||
})
|
||||
->required()
|
||||
->rules('required');
|
||||
$form->textarea('description', '分类简介')->rows(4)->rules('nullable');
|
||||
$form->image('logo', 'Logo')
|
||||
->move('logos/' . date('Y/m/d'))
|
||||
->removable()
|
||||
->uniqueName();
|
||||
$form->image('cover', '封面')
|
||||
->move('images/' . date('Y/m/d'))
|
||||
->removable()
|
||||
->uniqueName();
|
||||
$form->text('template', '模板');
|
||||
$form->number('order', '排序')->default(0)->help('正序优先');
|
||||
$form->switch('top_show', '顶部导航显示')->states()->default(0);
|
||||
$form->switch('status', '显示')->states()->default(1);
|
||||
$form->saving(function (Form $form) {
|
||||
|
||||
if (request()->has('title')) {
|
||||
// if (request()->type == CategoryOld::TYPE_SHOW && empty(request()->article_id)) {
|
||||
// $error = new MessageBag([
|
||||
// 'title' => '错误',
|
||||
// 'message' => '文章类型是文章详情的时候需要选择关联文章',
|
||||
// ]);
|
||||
//
|
||||
// return back()->withInput()->with(compact('error'));
|
||||
// }
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return $this->form()->destroy($id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,9 +50,12 @@ class IndexController extends AdminController
|
||||
$form->text('title', '视频名称')->required();
|
||||
|
||||
$form->select('category_id', '所属分类')
|
||||
->options(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1);
|
||||
}, '选择分类'))
|
||||
->options(function () {
|
||||
return Category::query()
|
||||
->where('status', 1)
|
||||
->where('type', Category::TYPE_VIDEO)
|
||||
->pluck('title', 'id');
|
||||
})
|
||||
->rules('required|min:1', [
|
||||
'required' => '必须选择所属分类',
|
||||
'min' => '必须选择所属分类',
|
||||
|
||||
@@ -8,5 +8,6 @@ Route::group([
|
||||
'middleware' => config('admin.route.middleware'),
|
||||
], function (Router $router) {
|
||||
$router->resource('categories', 'IndexController');
|
||||
$router->resource('categorie_olds', 'OldController');
|
||||
|
||||
});
|
||||
|
||||
@@ -84,7 +84,7 @@ function getCateChild($categoryId)
|
||||
{
|
||||
return Category::where('status', 1)
|
||||
->where('parent_id', $categoryId)
|
||||
->orderBy('order', 'asc')
|
||||
->orderBy('order', 'desc')
|
||||
->get();
|
||||
}
|
||||
|
||||
@@ -126,6 +126,14 @@ function getOneAdvertByCate($categoryId, $result = '')
|
||||
}
|
||||
}
|
||||
|
||||
function getAdvertsByCate($categoryId, $take = '8')
|
||||
{
|
||||
return Advert::where('category_id', $categoryId)
|
||||
->latest()
|
||||
->take($take)
|
||||
->get();
|
||||
}
|
||||
|
||||
function getVideoByCate($categoryId, $result = '')
|
||||
{
|
||||
$video = Video::where('category_id', $categoryId)
|
||||
@@ -151,3 +159,24 @@ function getVideosByCate($categoryId, $take = '8')
|
||||
->get();
|
||||
}
|
||||
|
||||
function dateLocalMonth($m)
|
||||
{
|
||||
$months = [
|
||||
'1' => '一月',
|
||||
'2' => '二月',
|
||||
'3' => '三月',
|
||||
'4' => '四月',
|
||||
'5' => '五月',
|
||||
'6' => '六月',
|
||||
'7' => '七月',
|
||||
'8' => '八月',
|
||||
'9' => '九月',
|
||||
'10' => '十月',
|
||||
'11' => '十一月',
|
||||
'12' => '十二月',
|
||||
];
|
||||
|
||||
return $months[$m] ?? $m;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Advert;
|
||||
use App\Models\Category;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
@@ -11,7 +12,7 @@ class CategoryController extends Controller
|
||||
/**
|
||||
* 显示分类
|
||||
* @param Category $category [description]
|
||||
* @return [type] [description]
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View [type] [description]
|
||||
*/
|
||||
public function index(Category $category)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Models\Advert;
|
||||
use App\Models\Article;
|
||||
use App\Models\Category;
|
||||
use App\Models\Link;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
@@ -24,15 +25,12 @@ class IndexController extends Controller
|
||||
return view('index.index', compact('top_adverts', 'top_adverts'));
|
||||
}
|
||||
|
||||
//通用获取文章
|
||||
public function getArticle($category_ids, $take = 3)
|
||||
public function search(Request $request)
|
||||
{
|
||||
return Article::where('status', 1)
|
||||
->ByCategory($category_ids)
|
||||
->select('id', 'description', 'title', 'created_at', 'cover', 'content')
|
||||
->orderBy('created_at', 'desc')
|
||||
->take($take)
|
||||
->get();
|
||||
$title = $request->title;
|
||||
$articles = Article::query()->where('title', 'like', "%{$title}%")->paginate();
|
||||
|
||||
return view('index.search', compact('articles'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -76,6 +76,11 @@ class Article extends Model
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
|
||||
public function category_old(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CategoryOld::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: description
|
||||
* @Author: 玄尘
|
||||
|
||||
100
app/Models/ArticleOld.php
Normal file
100
app/Models/ArticleOld.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Traits\BelongsToCategory;
|
||||
use App\Models\Traits\HasCovers;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class ArticleOld extends Model
|
||||
{
|
||||
|
||||
use HasCovers, BelongsToCategory;
|
||||
|
||||
public function getLinkAttribute(): string
|
||||
{
|
||||
return route('article.show', $this);
|
||||
}
|
||||
|
||||
/***
|
||||
* Notes: 获取详情内图片
|
||||
* @Author: 玄尘
|
||||
* @Date : 2021/10/8 11:58
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function get_content_cover()
|
||||
{
|
||||
preg_match("/<img.*?src=\"([^\"]+)\"[^>].*?>/isU", str_ireplace("\\", "", $this->content), $matches);
|
||||
|
||||
if (isset($matches[1])) {
|
||||
return $matches[1];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 获取一个默认图片
|
||||
* @Author: 玄尘
|
||||
* @Date : 2020/6/3 16:29
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function get_one_cover()
|
||||
{
|
||||
if ($this->cover_url) {
|
||||
$path = $this->cover_url;
|
||||
} else {
|
||||
$path = $this->get_content_cover();
|
||||
if ($path) {
|
||||
$this->cover = str_replace("/storage", "", $path);
|
||||
$this->save();
|
||||
$path = config('app.url') . $path;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $path;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 关联分类
|
||||
* @Author: 玄尘
|
||||
* @Date : 2021/4/2 9:11
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function categories(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(CategoryOld::class, 'article_old_category')
|
||||
->using(ArticleOldCategory::class);
|
||||
}
|
||||
|
||||
public function category(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CategoryOld::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: description
|
||||
* @Author: 玄尘
|
||||
* @Date : 2021/4/2 9:17
|
||||
* @param $query
|
||||
* @param $ids
|
||||
* @return mixed
|
||||
*/
|
||||
public function scopeByCategory($query, $ids)
|
||||
{
|
||||
if (!is_array($ids)) {
|
||||
$ids = [$ids];
|
||||
}
|
||||
|
||||
return $query->whereIn('category_id', $ids);
|
||||
//
|
||||
// return $query->whereHas('categories', function ($q) use ($ids) {
|
||||
// $q->whereIN('id', $ids);
|
||||
// });
|
||||
}
|
||||
|
||||
}
|
||||
11
app/Models/ArticleOldCategory.php
Normal file
11
app/Models/ArticleOldCategory.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
|
||||
class ArticleOldCategory extends Pivot
|
||||
{
|
||||
|
||||
//
|
||||
}
|
||||
@@ -6,10 +6,8 @@ use App\Models\Traits\HasCovers;
|
||||
use Encore\Admin\Traits\AdminBuilder;
|
||||
use Encore\Admin\Traits\ModelTree;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Category extends Model
|
||||
{
|
||||
@@ -114,8 +112,6 @@ class Category extends Model
|
||||
public function getDescriptionHtmlAttribute(): string
|
||||
{
|
||||
return str_replace("\n", "</br>", $this->description);
|
||||
|
||||
return Str::replaceArray('\n', ['</br>'], $this->description);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
119
app/Models/CategoryOld.php
Normal file
119
app/Models/CategoryOld.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Traits\HasCovers;
|
||||
use Encore\Admin\Traits\AdminBuilder;
|
||||
use Encore\Admin\Traits\ModelTree;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class CategoryOld extends Model
|
||||
{
|
||||
|
||||
use AdminBuilder, ModelTree, HasCovers;
|
||||
|
||||
public const TYPE_SHOW = 'show';
|
||||
public const TYPE_ARTICLE = 'article';
|
||||
public const TYPE_ADVERT = 'advert';
|
||||
public const TYPE_VIDEO = 'video';
|
||||
public const TYPES = [
|
||||
self::TYPE_ARTICLE => '文章列表',
|
||||
self::TYPE_SHOW => '文章详情',
|
||||
self::TYPE_ADVERT => '图片列表',
|
||||
self::TYPE_VIDEO => '视频列表',
|
||||
];
|
||||
|
||||
public $cover_field = 'cover';
|
||||
|
||||
public function getLogoUrlAttribute(): string
|
||||
{
|
||||
return $this->parseImageUrl($this->logo);
|
||||
}
|
||||
|
||||
public function getLinkAttribute(): string
|
||||
{
|
||||
return route('category.show', $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联的数据
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany|\Illuminate\Database\Eloquent\Relations\HasMany|\Illuminate\Database\Eloquent\Relations\HasOne|null [type] [description]
|
||||
*/
|
||||
public function relations()
|
||||
{
|
||||
switch ($this->type) {
|
||||
case self::TYPE_SHOW:
|
||||
return $this->hasOne(Article::class)->where('id', $this->article_id);
|
||||
break;
|
||||
case self::TYPE_ARTICLE:
|
||||
return $this->belongsToMany(Article::class);
|
||||
break;
|
||||
case self::TYPE_ADVERT:
|
||||
return $this->hasMany(Advert::class);
|
||||
break;
|
||||
case self::TYPE_VIDEO:
|
||||
return $this->hasMany(Video::class);
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function childrens(): HasMany
|
||||
{
|
||||
return $this->hasMany(self::class, 'parent_id');
|
||||
}
|
||||
|
||||
public function parent(): HasOne
|
||||
{
|
||||
return $this->hasOne(self::class, 'id', 'parent_id');
|
||||
}
|
||||
|
||||
public function article(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Article::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 获取当前分类及子分类ID
|
||||
* @Author: <C.Jason>
|
||||
* @Date : 2020/4/6 3:12 下午
|
||||
* @return array
|
||||
*/
|
||||
public function getAllChildrenId(): array
|
||||
{
|
||||
$ids = array_keys($this->buildSelectOptions([], $this->id));
|
||||
if ($ids) {
|
||||
array_unshift($ids, $this->id);
|
||||
|
||||
return $ids;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
// public function articles(): BelongsToMany
|
||||
// {
|
||||
// return $this->belongsToMany(Article::class);
|
||||
// }
|
||||
|
||||
public function articles(): HasMany
|
||||
{
|
||||
return $this->hasMany(Article::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 格式化description
|
||||
* @Author: 玄尘
|
||||
* @Date : 2021/10/8 15:24
|
||||
*/
|
||||
public function getDescriptionHtmlAttribute(): string
|
||||
{
|
||||
return str_replace("\n", "</br>", $this->description);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
a:hover, a:link {
|
||||
text-decoration:none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
img {
|
||||
@@ -26,11 +26,11 @@ a, button {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
input,button,a, select {
|
||||
outline:none
|
||||
input, button, a, select {
|
||||
outline: none
|
||||
}
|
||||
|
||||
select:focus{
|
||||
select:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ body {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.ce-img>span {
|
||||
.ce-img > span {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -136,7 +136,7 @@ body {
|
||||
|
||||
/*logo */
|
||||
.navHead {
|
||||
background-image: linear-gradient(6deg, rgba(237,246,248,.8), transparent);
|
||||
background-image: linear-gradient(6deg, rgba(237, 246, 248, .8), transparent);
|
||||
}
|
||||
|
||||
.navHead-search {
|
||||
@@ -157,7 +157,7 @@ body {
|
||||
width: calc(100% - 52px);
|
||||
}
|
||||
|
||||
.navHead-search input::-webkit-input-placeholder{
|
||||
.navHead-search input::-webkit-input-placeholder {
|
||||
color: #449942;
|
||||
font-size: 15px;
|
||||
}
|
||||
@@ -420,9 +420,9 @@ body {
|
||||
|
||||
.modularThree-back {
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 0 20px rgba(0,0,0,.1);
|
||||
box-shadow: 0px 0 20px rgba(0, 0, 0, .1);
|
||||
padding: 15px;
|
||||
border-radius:4px;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -580,7 +580,7 @@ body {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
background-color: rgba(0,0,0,.5);
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -592,7 +592,7 @@ body {
|
||||
background-color: #f1f2f7;
|
||||
text-align: center;
|
||||
height: 110px;
|
||||
display:table;
|
||||
display: table;
|
||||
width: 100%;
|
||||
font-size: 17px;
|
||||
margin-bottom: 20px;
|
||||
@@ -601,7 +601,7 @@ body {
|
||||
|
||||
.modularSix-padding:nth-child(13) .modularSix-label,
|
||||
.modularSix-padding:nth-child(14) .modularSix-label,
|
||||
.modularSix-padding:nth-child(15) .modularSix-label{
|
||||
.modularSix-padding:nth-child(15) .modularSix-label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -610,7 +610,7 @@ body {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.modularSix-padding:last-child .modularSix-label img{
|
||||
.modularSix-padding:last-child .modularSix-label img {
|
||||
filter: grayscale(100) brightness(200%);
|
||||
}
|
||||
|
||||
@@ -627,8 +627,8 @@ body {
|
||||
}
|
||||
|
||||
.modularSix-label-cont {
|
||||
display:table-cell;
|
||||
vertical-align:middle
|
||||
display: table-cell;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.modularSix-padding {
|
||||
@@ -703,7 +703,7 @@ body {
|
||||
/*首页-模块八*/
|
||||
.modularEight-label {
|
||||
background-position: center;
|
||||
background-size:cover;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
@@ -723,7 +723,7 @@ body {
|
||||
text-align: center;
|
||||
padding: 15px 0;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(255,255,255,.3);
|
||||
background-color: rgba(255, 255, 255, .3);
|
||||
}
|
||||
|
||||
|
||||
@@ -740,7 +740,7 @@ body {
|
||||
/*二级页面-左侧内容*/
|
||||
.levelLeft {
|
||||
width: 100%;
|
||||
background-image: url(../image/levelLeft-back.jpg);
|
||||
background-image: url(/assets/index/images/levelLeft-back.jpg);
|
||||
background-repeat: repeat-y;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
@@ -983,7 +983,7 @@ body {
|
||||
}
|
||||
|
||||
.briefResearch-label:hover {
|
||||
box-shadow: 0 0 15px rgba(0,0,0,.2);
|
||||
box-shadow: 0 0 15px rgba(0, 0, 0, .2);
|
||||
color: #b9000e;
|
||||
}
|
||||
|
||||
@@ -1020,6 +1020,7 @@ body {
|
||||
|
||||
.briefHistoy-right-tool {
|
||||
text-align: right;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.briefHistoy-right-tool div {
|
||||
@@ -1041,7 +1042,7 @@ body {
|
||||
|
||||
.briefHistoy-right-tool div.briefHistoy-yellow {
|
||||
border-radius: 4px;
|
||||
padding: 0 30px;
|
||||
padding: 0 10px;
|
||||
background-color: #e7ad00;
|
||||
}
|
||||
|
||||
@@ -1108,7 +1109,7 @@ body {
|
||||
width: 100%;
|
||||
line-height: 34px;
|
||||
height: 34px;
|
||||
background-color: rgba(0,0,0,.5);
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
}
|
||||
@@ -1145,12 +1146,12 @@ body {
|
||||
}
|
||||
|
||||
.briefSwiper .swiper-button-next {
|
||||
background-image: url(../image/briefIcon/briefAlbum_right.jpg);
|
||||
background-image: url(/assets/index/images/briefIcon/briefAlbum_right.jpg);
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.briefSwiper .swiper-button-prev {
|
||||
background-image: url(../image/briefIcon/briefAlbum_left.jpg);
|
||||
background-image: url(/assets/index/images/briefIcon/briefAlbum_left.jpg);
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
@@ -1172,7 +1173,7 @@ body {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
top: calc(50% - 7px);
|
||||
background-image: url(../image/briefIcon/briefAlbum_title_icon.png);
|
||||
background-image: url(/assets/index/images/briefIcon/briefAlbum_title_icon.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
@@ -1196,7 +1197,7 @@ body {
|
||||
padding: 0 20px;
|
||||
height: 66px;
|
||||
line-height: 66px;
|
||||
box-sizing:border-box;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
@@ -1328,7 +1329,7 @@ body {
|
||||
.srBuildOther-back::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: rgba(0,0,0,.4);
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
@@ -1421,7 +1422,7 @@ body {
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
background-size: 100%;
|
||||
box-shadow: 0 0 15px rgba(0,0,0,.1);
|
||||
box-shadow: 0 0 15px rgba(0, 0, 0, .1);
|
||||
cursor: pointer;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
@@ -1845,7 +1846,7 @@ body {
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
flex: 3;
|
||||
text-shadow: 2px 2px 2px rgba(2,84,0,1);
|
||||
text-shadow: 2px 2px 2px rgba(2, 84, 0, 1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -1967,8 +1968,8 @@ body {
|
||||
z-index: 5;
|
||||
width: 50%;
|
||||
padding: 20px;
|
||||
box-sizing:border-box;
|
||||
background-color:rgba(246,246,246, .9);
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(246, 246, 246, .9);
|
||||
}
|
||||
|
||||
.educateStudent-cont {
|
||||
@@ -1996,7 +1997,7 @@ body {
|
||||
bottom: 0;
|
||||
width: 18px;
|
||||
height: 10px;
|
||||
background: url(../image/educateIcon.png) no-repeat center;
|
||||
background: url(/assets/index/images/educateIcon.png) no-repeat center;
|
||||
}
|
||||
|
||||
.educateStudent-cont-name span {
|
||||
@@ -2142,7 +2143,7 @@ body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.terraceHome-left{
|
||||
.terraceHome-left {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 200%;
|
||||
@@ -2158,7 +2159,7 @@ body {
|
||||
.terraceHome-right-img {
|
||||
position: relative;
|
||||
width: 50%;
|
||||
padding-top:50%;
|
||||
padding-top: 50%;
|
||||
}
|
||||
|
||||
.terraceHome-label li {
|
||||
@@ -2249,8 +2250,8 @@ body {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.terraceHome-cont>div::after,
|
||||
.terraceHome-left-cont>div::after {
|
||||
.terraceHome-cont > div::after,
|
||||
.terraceHome-left-cont > div::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: calc(50% - 20px);
|
||||
@@ -2361,7 +2362,7 @@ body {
|
||||
|
||||
.party-title span {
|
||||
width: 230px;
|
||||
background: url(../image/partyTitle.png) no-repeat left;
|
||||
background: url(/assets/index/images/partyTitle.png) no-repeat left;
|
||||
background-size: 100% 100%;
|
||||
display: inline-block;
|
||||
padding: 0 20px;
|
||||
@@ -2428,7 +2429,7 @@ body {
|
||||
|
||||
/*精神文明建设*/
|
||||
.partyBuild-left {
|
||||
box-shadow: 0px 0 20px rgba(0,0,0,.1);
|
||||
box-shadow: 0px 0 20px rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
.partyBuild-left-img {
|
||||
@@ -2540,7 +2541,7 @@ body {
|
||||
.partyVideo-text {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
padding-top:100%;
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
.partyVideo-text span {
|
||||
@@ -2573,7 +2574,7 @@ body {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.learn-title>span {
|
||||
.learn-title > span {
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
@@ -2583,7 +2584,7 @@ body {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.learn-title>span::after {
|
||||
.learn-title > span::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
@@ -2842,7 +2843,7 @@ body {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.pagination>li {
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
@@ -2869,21 +2870,31 @@ body {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.pagination>li>a {
|
||||
.pagination > li > a {
|
||||
padding: 8px 18px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span, .pagination>.active>span:focus, .pagination>.active>span:hover{
|
||||
.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover {
|
||||
background-color: #449942;
|
||||
border-color: #449942;
|
||||
}
|
||||
|
||||
.pagination>li>a, .pagination>li>span,
|
||||
.pagination>li>a:focus,
|
||||
.pagination>li>a:hover{
|
||||
.pagination > li > a, .pagination > li > span,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > a:hover {
|
||||
color: #449942;
|
||||
}
|
||||
|
||||
.no-searchCont {padding: 120px 0; text-align: center; font-size: 22px; color: #999;}
|
||||
.no-searchCont img {width: 200px; display: block; margin: 0 auto 20px;}
|
||||
.no-searchCont {
|
||||
padding: 120px 0;
|
||||
text-align: center;
|
||||
font-size: 22px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.no-searchCont img {
|
||||
width: 200px;
|
||||
display: block;
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
|
||||
@@ -17,55 +17,29 @@
|
||||
<!-- start 党团活动 -->
|
||||
<div class="partyActivity">
|
||||
<div class="party-title">
|
||||
<span>党团活动</span>
|
||||
<div class="party-title-more">更多>></div>
|
||||
<span>{{ getOneCategory(60,'title') }}</span>
|
||||
<div class="party-title-more" data-href="{{ getOneCategory(60,'url') }}">更多>></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (getArticlesBYCate(60,3)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(60,3) as $info)
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="partyActivity-label">
|
||||
<div class="ce-img partyActivity-img">
|
||||
<!-- 图片比例4:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_00.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
<div class="partyActivity-cont">
|
||||
<div class="ce-nowrap partyActivity-cont-name">三江平原湿地生物多样性定位研究站</div>
|
||||
<div class="partyActivity-cont-time">2021-07-09</div>
|
||||
<div class="ce-nowrap partyActivity-cont-name">{{ $info->title }}</div>
|
||||
<div class="partyActivity-cont-time">{{ $info->created_at->toDateString() }}</div>
|
||||
<div class="ce-nowrap-multi partyActivity-cont-text">
|
||||
黑龙江省科学院生物多样性重点实验室于1999年由黑龙江省科学院批准成立,实验室隶属于黑龙江省科学院自然与生态研究所。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="partyActivity-label">
|
||||
<div class="ce-img partyActivity-img">
|
||||
<!-- 图片比例4:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_19.jpg);"></span>
|
||||
</div>
|
||||
<div class="partyActivity-cont">
|
||||
<div class="ce-nowrap partyActivity-cont-name">三江平原湿地生物多样性定位研究站</div>
|
||||
<div class="partyActivity-cont-time">2021-07-09</div>
|
||||
<div class="ce-nowrap-multi partyActivity-cont-text">
|
||||
黑龙江省科学院生物多样性重点实验室于1999年由黑龙江省科学院批准成立,实验室隶属于黑龙江省科学院自然与生态研究所。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="partyActivity-label">
|
||||
<div class="ce-img partyActivity-img">
|
||||
<!-- 图片比例4:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_20.jpg);"></span>
|
||||
</div>
|
||||
<div class="partyActivity-cont">
|
||||
<div class="ce-nowrap partyActivity-cont-name">三江平原湿地生物多样性定位研究站</div>
|
||||
<div class="partyActivity-cont-time">2021-07-09</div>
|
||||
<div class="ce-nowrap-multi partyActivity-cont-text">
|
||||
黑龙江省科学院生物多样性重点实验室于1999年由黑龙江省科学院批准成立,实验室隶属于黑龙江省科学院自然与生态研究所。
|
||||
{{ $info->description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 党团活动 -->
|
||||
@@ -73,61 +47,52 @@
|
||||
<!-- start 精神文明建设 -->
|
||||
<div class="partyBuild briefMargin">
|
||||
<div class="party-title">
|
||||
<span>精神文明建设</span>
|
||||
<div class="party-title-more">更多>></div>
|
||||
<span>{{ getOneCategory(61,'title') }}</span>
|
||||
<div class="party-title-more" data-href="{{ getOneCategory(61,'url') }}">更多>></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (getArticlesBYCate(61,3)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(61,3) as $info)
|
||||
@if($loop->iteration==1)
|
||||
<div class="col-xs-12 col-md-5">
|
||||
<div class="publicHover partyBuild-left">
|
||||
<div class="ce-img partyBuild-left-img">
|
||||
<!-- 图片比例4:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_20.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
<div class="partyBuild-left-cont">
|
||||
<div class="partyBuild-left-time">
|
||||
五月<span>06</span>
|
||||
{{ dateLocalMonth($info->created_at->format('m')) }}
|
||||
<span>{{ $info->created_at->format('d') }}</span>
|
||||
</div>
|
||||
<div class="ce-nowrap partyBuild-left-name">庆祝中国共产党成立100周年</div>
|
||||
<div class="ce-nowrap partyBuild-left-name">{{ $info->title }}</div>
|
||||
<div class="ce-nowrap-multi partyBuild-left-text">
|
||||
2021年7月1日上午8时,庆祝中国共产党成立100周年大会在北京天安门广场隆重举行。
|
||||
{{ $info->description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
@endif
|
||||
<div class="col-xs-12 col-md-7">
|
||||
<div class="partyBuild-right">
|
||||
@if (getArticlesBYCate(61,3)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(61,3) as $info)
|
||||
@if($loop->iteration>1)
|
||||
<div class="publicHover partyBuild-label">
|
||||
<div class="ce-nowrap-multi partyBuild-right-time">
|
||||
五月<span>01</span>
|
||||
</div>
|
||||
<div class="ce-nowrap-multi partyBuild-right-name">黑龙江黑河国家森林生态系统定位观测研究站</div>
|
||||
</div>
|
||||
<div class="publicHover partyBuild-label">
|
||||
<div class="ce-nowrap-multi partyBuild-right-time">
|
||||
五月<span>05</span>
|
||||
</div>
|
||||
<div class="ce-nowrap-multi partyBuild-right-name">黑龙江省林下经济资源研发与利用协同创新中心</div>
|
||||
</div>
|
||||
<div class="publicHover partyBuild-label">
|
||||
<div class="ce-nowrap-multi partyBuild-right-time">
|
||||
五月<span>06</span>
|
||||
{{ dateLocalMonth($info->created_at->format('m')) }}
|
||||
<span>{{ $info->created_at->format('d') }}</span>
|
||||
</div>
|
||||
<div class="ce-nowrap-multi partyBuild-right-name">
|
||||
联合国教科文组织国际自然与文化遗产空间技术中心哈尔滨分中心
|
||||
{{ $info->title }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="publicHover partyBuild-label">
|
||||
<div class="ce-nowrap-multi partyBuild-right-time">
|
||||
五月<span>07</span>
|
||||
</div>
|
||||
<div class="ce-nowrap-multi partyBuild-right-name">黑龙江省特色动植物利用工程技术研究中心</div>
|
||||
</div>
|
||||
<div class="publicHover partyBuild-label">
|
||||
<div class="ce-nowrap-multi partyBuild-right-time">
|
||||
五月<span>08</span>
|
||||
</div>
|
||||
<div class="ce-nowrap-multi partyBuild-right-name">黑龙江省中国科学院马克平生物多样性工作室</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,22 +102,24 @@
|
||||
<!-- start 党建风采视频 -->
|
||||
<div class="partyVideo">
|
||||
<div class="party-title">
|
||||
<span>党建风采视频</span>
|
||||
<div class="party-title-more">更多>></div>
|
||||
<span>{{ getOneCategory(62,'title') }}</span>
|
||||
<div class="party-title-more" data-href="{{ getOneCategory(62,'link') }}">更多>></div>
|
||||
</div>
|
||||
<div class="partyVideo-cont">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-8 partyVideo-padding">
|
||||
<div class="partyVideo-video">
|
||||
<video width="100%" height="100%" controls="" autoplay="" src="movie.mp4"
|
||||
poster="/assets/index/images/text/textImg_00.jpg"
|
||||
style="object-fit: fill;"></video>
|
||||
<video width="100%" height="100%" controls=""
|
||||
src="{{ getVideoByCate(62,'cover_url') }}"
|
||||
style="object-fit: fill;">
|
||||
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 partyVideo-padding">
|
||||
<div class="partyVideo-text"
|
||||
style="background-image: url(/assets/index/images/partyVide_back.jpg);">
|
||||
<span>党建风采视频</span>
|
||||
<span>{{ getOneCategory(62,'title') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
data-href="{{ $info->link }}"
|
||||
>
|
||||
{{ $info->title }}
|
||||
<img src="{{ $info->cover_url }}"/>
|
||||
<img src="/assets/index/images/briefIcon/briefHistoy-icon.png"/>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
@@ -176,18 +176,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (getAdvertsByCate(16,10)->isNotEmpty())
|
||||
|
||||
<div class="briefAlbum">
|
||||
<div class="briefAlbum-title"><span>四十周年所庆纪念册</span></div>
|
||||
<div class="swiper-container briefSwiper"
|
||||
style="background-image: url(image/briefIcon/briefAlbum_back.jpg);">
|
||||
style="background-image: url(/assets/index/images/briefIcon/briefAlbum_back.jpg);">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach (getAdvertsByCate(16,10) as $info)
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<div class="swiper-slide" data-href="">
|
||||
<div class="ce-img briefSwiper-img">
|
||||
<span style="background-image: url(image/text/textImg_00.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
<div class="briefSwiper-cont">
|
||||
<div class="ce-nowrap briefSwiper-cont-name">
|
||||
四十周年所庆图片册
|
||||
{{ $info->title }}
|
||||
</div>
|
||||
<div class="ce-nowrap briefSwiper-cont-more">
|
||||
<span>查看详情</span>
|
||||
@@ -196,42 +200,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<div class="swiper-slide" data-href="">
|
||||
<div class="ce-img briefSwiper-img">
|
||||
<span style="background-image: url(image/text/textImg_05.jpg);"></span>
|
||||
<div class="briefSwiper-cont">
|
||||
<div class="ce-nowrap briefSwiper-cont-name">
|
||||
四十周年所庆图片册
|
||||
</div>
|
||||
<div class="ce-nowrap briefSwiper-cont-more">
|
||||
<span>查看详情</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<div class="swiper-slide" data-href="">
|
||||
<div class="ce-img briefSwiper-img">
|
||||
<span style="background-image: url(image/text/textImg_03.jpg);"></span>
|
||||
<div class="briefSwiper-cont">
|
||||
<div class="ce-nowrap briefSwiper-cont-name">
|
||||
四十周年所庆图片册
|
||||
</div>
|
||||
<div class="briefSwiper-cont-more">
|
||||
<span>查看详情</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<!-- Add Arrows -->
|
||||
<div class="swiper-button-next"></div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- end 四十年所庆 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,114 +17,102 @@
|
||||
<!-- start 国际平台 -->
|
||||
<div class="terraceInter">
|
||||
<div class="terrace-title">
|
||||
<span style="background-image: url(/assets/index/images/terraceTitle_back.png);">国际平台</span>
|
||||
<span style="background-image: url(/assets/index/images/terraceTitle_back.png);">
|
||||
{{ getOneCategory(55,'title') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
@if (getArticlesBYCate(55,5)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(55,5) as $info)
|
||||
@if($loop->iteration<5)
|
||||
<div class="col-xs-12 col-md-6 terraceInter-padding">
|
||||
<div class="publicHover terraceInter-list" data-href="">
|
||||
<div class="publicHover terraceInter-list"
|
||||
data-href="{{ $info->link }}">
|
||||
<div class="ce-nowrap-multi terraceInter-left-name">
|
||||
国际森林生物多样性检测网络寒温带森林样区
|
||||
{{ $info->title }}
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_18.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@if (getArticlesBYCate(55,5)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(55,5) as $info)
|
||||
@if($loop->iteration>4)
|
||||
<div class="col-xs-12 col-md-6 terraceInter-padding">
|
||||
<div class="publicHover terraceInter-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceInter-left-name">
|
||||
中国-芬兰浆果研究技术中心
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_19.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 terraceInter-padding">
|
||||
<div class="publicHover terraceInter-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceInter-left-name">
|
||||
国际森林生物多样性检测网络寒温带森林样区
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_20.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 terraceInter-padding">
|
||||
<div class="publicHover terraceInter-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceInter-left-name">
|
||||
中俄五大连池-贝加尔湖新生代火山与环境研究中心
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_21.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 terraceInter-padding">
|
||||
<div class="publicHover terraceInter-list" data-href="">
|
||||
<div class="publicHover terraceInter-list" data-href="{{ $info->link }}">
|
||||
<div class="ce-nowrap-multi terraceInter-right-name">
|
||||
联合国教科文组织国际自然与文化遗产空间技术中心哈尔滨分中心
|
||||
{{ $info->title }}
|
||||
</div>
|
||||
<div class="ce-img terraceInter-right-img">
|
||||
<!-- 图片为4:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_22.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 国际平台 -->
|
||||
|
||||
<!-- start 国家平台 -->
|
||||
<div class="terraceHome briefMargin">
|
||||
<div class="terrace-title"><span
|
||||
style="background-image: url(/assets/index/images/terraceTitle_back.png);">国家平台</span>
|
||||
<div class="terrace-title">
|
||||
<span style="background-image: url(/assets/index/images/terraceTitle_back.png);">
|
||||
{{ getOneCategory(56,'title') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (getArticlesBYCate(56,3)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(56,3) as $info)
|
||||
@if($loop->iteration==1)
|
||||
<div class="col-xs-12 col-md-4 terraceHome-nopadding">
|
||||
<div class="terraceHome-left">
|
||||
<div class="terraceHome-left" data-href="{{ $info->link }}">
|
||||
<div class="ce-img terraceHome-left-img">
|
||||
<!-- 图片为1:1 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_19.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
<div class="terraceHome-left-cont">
|
||||
<div class="terraceHome-left-webkit">
|
||||
<span class="ce-nowrap-multi">湿地与生态保育国家地方联合工程实验室</span>
|
||||
<span class="ce-nowrap-multi">{{ $info->title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<div class="col-xs-12 col-md-8 terraceHome-nopadding">
|
||||
<ul class="terraceHome-label">
|
||||
<li class="" data-href="">
|
||||
@if (getArticlesBYCate(56,3)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(56,3) as $info)
|
||||
@if($loop->iteration>1)
|
||||
<li class="" data-href="{{ $info->link }}">
|
||||
<div class="ce-img terraceHome-right-img">
|
||||
<!-- 图片为1:1 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_20.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
<div class="terraceHome-cont">
|
||||
<div class="terraceHome-webkit">
|
||||
<span class="ce-nowrap-multi">国家博士后科研工作站</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="" data-href="">
|
||||
<div class="ce-img terraceHome-right-img">
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_21.jpg);"></span>
|
||||
</div>
|
||||
<div class="terraceHome-cont">
|
||||
<div class="terraceHome-webkit">
|
||||
<span class="ce-nowrap-multi">黑龙江黑河(五大连池)国家森林定位观测研究站</span>
|
||||
<span class="ce-nowrap-multi">{{ $info->title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,177 +121,84 @@
|
||||
|
||||
<!-- start 省级平台 -->
|
||||
<div class="terraceSave">
|
||||
<div class="terrace-title"><span
|
||||
style="background-image: url(/assets/index/images/terraceTitle_back.png);">省级平台</span>
|
||||
<div class="terrace-title">
|
||||
<span style="background-image: url(/assets/index/images/terraceTitle_back.png);">
|
||||
{{ getOneCategory(57,'title') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (getArticlesBYCate(57,6)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(57,6) as $info)
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceSave-list" data-href="">
|
||||
<div class="publicHover terraceSave-list" data-href="{{ $info->link }}">
|
||||
<div class="ce-nowrap-multi terraceSave-left-name">
|
||||
黑龙江省湿地与恢复生态学重点实验室
|
||||
{{ $info->title }}
|
||||
</div>
|
||||
<div class="terraceSave-left-tips">
|
||||
省级
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_18.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceSave-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceSave-left-name">
|
||||
黑龙江省花卉中试基地
|
||||
</div>
|
||||
<div class="terraceSave-left-tips">
|
||||
省级
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_19.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceSave-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceSave-left-name">
|
||||
国际森林生物多样性检测网络寒温带森林样区
|
||||
</div>
|
||||
<div class="terraceSave-left-tips">
|
||||
省级
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_20.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceSave-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceSave-left-name">
|
||||
国际森林生物多样性检测网络寒温带森林样区
|
||||
</div>
|
||||
<div class="terraceSave-left-tips">
|
||||
省级
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_04.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceSave-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceSave-left-name">
|
||||
国际森林生物多样性检测网络寒温带森林样区
|
||||
</div>
|
||||
<div class="terraceSave-left-tips">
|
||||
省级
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_05.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 省级平台 -->
|
||||
|
||||
<!-- start 院级平台 -->
|
||||
<div class="terraceYard briefMargin">
|
||||
<div class="terrace-title"><span
|
||||
style="background-image: url(/assets/index/images/terraceTitle_back.png);">院级平台</span>
|
||||
<div class="terrace-title">
|
||||
<span style="background-image: url(/assets/index/images/terraceTitle_back.png);">
|
||||
{{ getOneCategory(58,'title') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (getArticlesBYCate(58,3)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(58,3) as $info)
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceYard-list" data-href="">
|
||||
<div class="publicHover terraceYard-list" data-href="{{ $info->link }}">
|
||||
<div class="ce-nowrap-multi terraceSave-left-name">
|
||||
黑龙江省科学院生物多样性重点实验室
|
||||
{{ $info->title }}
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img terraceFixed-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_00.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 院级平台 -->
|
||||
|
||||
<!-- start 定位研究站 -->
|
||||
<div class="terraceFixed">
|
||||
<div class="terrace-title"><span
|
||||
style="background-image: url(/assets/index/images/terraceTitle_back.png);">定位研究站</span>
|
||||
<div class="terrace-title">
|
||||
<span style="background-image: url(/assets/index/images/terraceTitle_back.png);">
|
||||
{{ getOneCategory(59,'title') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (getArticlesBYCate(59,6)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(59,6) as $info)
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceFixed-list" data-href="">
|
||||
<div class="publicHover terraceFixed-list" data-href="{{ $info->link }}">
|
||||
<div class="ce-nowrap-multi terraceFixed-left-name">
|
||||
黑龙江省科学院生物多样性重点实验室
|
||||
{{ $info->title }}
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img terraceFixed-left-img">
|
||||
<!-- 图片为4:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_00.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceFixed-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceFixed-left-name">
|
||||
三江平原湿地生物多样性
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img terraceFixed-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_01.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceFixed-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceFixed-left-name">
|
||||
伊勒呼里山寒温带森林生物多样性
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img terraceFixed-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_02.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceFixed-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceFixed-left-name">
|
||||
五大连池火山植物进化与植被生态
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img terraceFixed-left-img">
|
||||
<!-- 图片为4:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_19.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceFixed-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceFixed-left-name">
|
||||
松嫩平原湿地生态
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img terraceFixed-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_20.jpg);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 terraceInter-padding">
|
||||
<div class="publicHover terraceFixed-list" data-href="">
|
||||
<div class="ce-nowrap-multi terraceFixed-left-name">
|
||||
园林植物实验基地
|
||||
</div>
|
||||
<div class="ce-img terraceInter-left-img terraceFixed-left-img">
|
||||
<!-- 图片为5:3 -->
|
||||
<span style="background-image: url(/assets/index/images/text/textImg_21.jpg);"></span>
|
||||
<span style="background-image: url({{ $info->cover_url }});"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 定位研究站 -->
|
||||
|
||||
@@ -95,40 +95,21 @@
|
||||
<!-- start 专家学者 -->
|
||||
<div class="ranksEchelon briefMargin">
|
||||
<div class="ranks-title">
|
||||
<img src="/assets/index/images/ranksIcon/ranksIcon_02.png"/>专家学者
|
||||
<img src="/assets/index/images/ranksIcon/ranksIcon_02.png"/>
|
||||
{{ getOneCategory(42,'title') }}
|
||||
</div>
|
||||
<div class="ranksScholar">
|
||||
<div class="row">
|
||||
|
||||
@if(getCateChild(42)->isNotEmpty())
|
||||
@foreach(getCateChild(42) as $cate)
|
||||
<div class="col-xs-12 col-md-4 modularSix-padding">
|
||||
<div class="modularServe-label">
|
||||
<span>国务院特贴专家</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 modularSix-padding">
|
||||
<div class="modularServe-label">
|
||||
<span>国务院特贴专家</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 modularSix-padding">
|
||||
<div class="modularServe-label">
|
||||
<span>专家</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 modularSix-padding">
|
||||
<div class="modularServe-label">
|
||||
<span>青年学者</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 modularSix-padding">
|
||||
<div class="modularServe-label">
|
||||
<span>省级领军人才梯队专家</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 modularSix-padding">
|
||||
<div class="modularServe-label">
|
||||
<span>院级重点学科专家</span>
|
||||
<span> {{ $cate->title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -166,7 +147,6 @@
|
||||
|
||||
<!-- start 人才招聘 -->
|
||||
<div class="publicHover ranksRecruit" data-href="">
|
||||
<img src="/assets/index/images/ranksIcon/ranksImg.png"/>
|
||||
<img src="{{ getOneAdvertByCate(44,'cover_url') }}"/>
|
||||
</div>
|
||||
<!-- end 人才招聘 -->
|
||||
|
||||
@@ -397,7 +397,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div class="container">
|
||||
@if(!empty($parent))
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xs-12">
|
||||
<div class="mrumbs">
|
||||
@@ -10,4 +11,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -17,10 +17,6 @@
|
||||
<div class="col-xs-12 col-md-9">
|
||||
<ul class="indexExtend-ul studyExtend">
|
||||
@foreach ($articles as $article)
|
||||
<li>
|
||||
<a href="{{ $article->link }}">{{ $article->title }}</a><span>{{ $article->created_at->format('m-d') }}</span>
|
||||
</li>
|
||||
|
||||
<li data-href="{{ $article->link }}" class="publicHover">
|
||||
<div class="ce-nowrap indexExtend-ul-name">
|
||||
{{ $article->title }}
|
||||
|
||||
23
resources/views/category/videos.blade.php
Normal file
23
resources/views/category/videos.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', $parent->title)
|
||||
|
||||
@section('content')
|
||||
<!-- 面包屑导航 -->
|
||||
@include('category.navigation')
|
||||
|
||||
<!-- 内容 -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- 左侧导航部分 -->
|
||||
@include('category.left')
|
||||
<!-- 右侧内容部分 -->
|
||||
<div class="col-xs-12 col-md-9">
|
||||
<div class="levelRight">
|
||||
视频列表
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
93
resources/views/category/xh_qk.blade.php
Normal file
93
resources/views/category/xh_qk.blade.php
Normal file
@@ -0,0 +1,93 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', $parent->title)
|
||||
|
||||
@section('content')
|
||||
<!-- 面包屑导航 -->
|
||||
@include('category.navigation')
|
||||
|
||||
<!-- 内容 -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- 左侧导航部分 -->
|
||||
@include('category.left')
|
||||
<!-- 右侧内容部分 -->
|
||||
<div class="col-xs-12 col-md-9">
|
||||
<div class="levelRight">
|
||||
<!-- start 学会 -->
|
||||
<div class="learn briefMargin">
|
||||
<div class="learn-title">
|
||||
{{ getOneCategory(63,'title') }}<span>{{ getOneCategory(63,'alias') }}</span>
|
||||
</div>
|
||||
<div class="learnCont">
|
||||
<div class="row">
|
||||
@if(getOneCategory(63,'article'))
|
||||
|
||||
<div class="col-xs-12 col-md-3 learn-padding">
|
||||
<div class="learnCont-tips">
|
||||
<img src="{{ getOneCategory(63,'article')->cover_url }}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-9 learn-padding">
|
||||
<div class="learnCont-text">
|
||||
<div class="learnCont-brief">
|
||||
<div class="ce-nowrap learnCont-title">{{ getOneCategory(63,'article')->title }}</div>
|
||||
<div class="ce-nowrap-multi learnCont-version">
|
||||
{{ getOneCategory(63,'article')->description }}
|
||||
</div>
|
||||
<div class="publicHover learnCont-more"
|
||||
data-href="{{ getOneCategory(63,'article')->link }}">查看详情
|
||||
</div>
|
||||
</div>
|
||||
<img class="learnCont-img" src="/assets/index/images/learn_img.jpg"/>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 学会 -->
|
||||
|
||||
<!-- start 期刊 -->
|
||||
<div class="journal briefMargin">
|
||||
<div class="learn-title">
|
||||
{{ getOneCategory(64,'title') }}<span>{{ getOneCategory(64,'alias') }}</span>
|
||||
</div>
|
||||
<div class="ce-img journal-tips">
|
||||
<span style="background-image: url(/assets/index/images/journalTop.jpg)"></span>
|
||||
</div>
|
||||
<div class="journalCont">
|
||||
<div class="row">
|
||||
@if(getOneCategory(64,'article'))
|
||||
<div class="col-xs-12 col-md-5">
|
||||
<div class="journalCont-title">{{ getOneCategory(63,'article')->title }}</div>
|
||||
<div class="journalCont-tool">
|
||||
<div data-href="" class="journalCont-tool-more">
|
||||
<img src="/assets/index/images/journalCont_icon_00.jpg"/>查看更多
|
||||
</div>
|
||||
<div data-href="" class="journalCont-tool-teach">
|
||||
<img src="/assets/index/images/journalCont_icon_01.jpg"/>征稿启事
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-7">
|
||||
<div class="journalCont-text">
|
||||
<img class="journalCont-cont-img"
|
||||
src="{{ getOneCategory(64,'article')->cover_url }}">
|
||||
<div class="ce-nowrap-multi journalCont-text-version">
|
||||
{{ getOneCategory(64,'article')->description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 期刊 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', $parent->title)
|
||||
|
||||
@section('content')
|
||||
<!-- 面包屑导航 -->
|
||||
@include('category.navigation')
|
||||
|
||||
<!-- 内容 -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- 左侧导航部分 -->
|
||||
@include('category.left')
|
||||
<!-- 右侧内容部分 -->
|
||||
<div class="col-xs-12 col-md-9">
|
||||
<div class="levelRight">
|
||||
<!-- start 学会 -->
|
||||
<div class="learn briefMargin">
|
||||
<div class="learn-title">
|
||||
学会<span>LEARN</span>
|
||||
</div>
|
||||
<div class="learnCont">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-3 learn-padding">
|
||||
<div class="learnCont-tips">
|
||||
<img src="/assets/index/images/learn_left.jpg"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-9 learn-padding">
|
||||
<div class="learnCont-text">
|
||||
<div class="learnCont-brief">
|
||||
<div class="ce-nowrap learnCont-title">党建文化-学会简介</div>
|
||||
<div class="ce-nowrap-multi learnCont-version">
|
||||
近年来,中国银行西安长安路支行结合陕西红色文化特点和本行实际,坚持党建引领,文化铸魂,提倡“幸福中行,快乐员工”的文化理念,以加快转型发展,打造区域强行为突破口,形成了具有自身特色的企业文化,并将其渗透和服务于经营管理的全过程,实现了文化创造价值,党建与经营双丰收的目标。
|
||||
</div>
|
||||
<div class="publicHover learnCont-more">查看详情</div>
|
||||
</div>
|
||||
<img class="learnCont-img" src="/assets/index/images/learn_img.jpg"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 学会 -->
|
||||
|
||||
<!-- start 期刊 -->
|
||||
<div class="journal briefMargin">
|
||||
<div class="learn-title">
|
||||
期刊<span>PERIODICAL</span>
|
||||
</div>
|
||||
<div class="ce-img journal-tips">
|
||||
<span style="background-image: url(/assets/index/images/journalTop.jpg)"></span>
|
||||
</div>
|
||||
<div class="journalCont">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-5">
|
||||
<div class="journalCont-title">党建文化-期刊</div>
|
||||
<div class="journalCont-tool">
|
||||
<div data-href="" class="journalCont-tool-more"><img
|
||||
src="/assets/index/images/journalCont_icon_00.jpg"/>查看更多
|
||||
</div>
|
||||
<div data-href="" class="journalCont-tool-teach"><img
|
||||
src="/assets/index/images/journalCont_icon_01.jpg"/>征稿启事
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-7">
|
||||
<div class="journalCont-text">
|
||||
<img class="journalCont-cont-img" src="/assets/index/images/journalBack.jpg">
|
||||
<div class="ce-nowrap-multi journalCont-text-version">
|
||||
近年来,中国银行西安长安路支行结合陕西红色文化特点和本行实际,坚持党建引领,文化铸魂,提倡“幸福中行,快乐员工”的文化理念,以加快转型发展,打造区域强行为突破口,形成了具有自身特色的企业文化,并将其渗透和服务于经营管理的全过程,实现了文化创造价值,党建与经营双丰收的目标。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 期刊 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -16,47 +16,58 @@
|
||||
<div class="levelRight">
|
||||
<!-- start 研究生教育简介 -->
|
||||
<div class="educateStudent briefMargin">
|
||||
<div class="educate-title">研究生教育简介</div>
|
||||
<div class="educate-title">{{ getOneCategory(54,'title') }}</div>
|
||||
@if(getOneCategory(54,'article'))
|
||||
<div class="educateStudent-cont">
|
||||
<div class="educateStudent-cont-name">
|
||||
研究生教育简介<span>/ Introduction to graduate education</span></div>
|
||||
{{ getOneCategory(54,'article')->title }}
|
||||
<span>/ Introduction to graduate education</span></div>
|
||||
<div class="ce-nowrap-multi educateStudent-cont-text">
|
||||
研究生教育是学生本科毕业之后继续进行深造和学习的一种教育形式,又可分为硕士研究生教育和博士研究生教育。考生参加国家统一组织的硕士生入学考试(含应届本科毕业生的推荐免试和部分高等学校经教育部批准自行组织的单独入学考试),被录取后,并在毕业时,若课程学习和论文答辩均符合学位条例的规定,可获硕士生毕业证书和硕士学位证书。研究生学历教育分为普通研究生(双证,包含全日制研究生及非全日制研究生)、传统在职研究生(单证在职)。研究生学历教育的招生工作由教育部高校学生司负责
|
||||
{{ getOneCategory(54,'article')->description }}
|
||||
</div>
|
||||
<div class="publicHover educateStudent-cont-more"
|
||||
data-href=" {{ getOneCategory(54,'article')->link }}">更多>>
|
||||
</div>
|
||||
<div class="publicHover educateStudent-cont-more">更多>></div>
|
||||
</div>
|
||||
<div class="educateStudent-right">
|
||||
<div class="ce-img educateStudent-img">
|
||||
<!-- 图片为5:3-->
|
||||
<span style="background-image: url(/assets/index/images/facade.jpg);"></span>
|
||||
<span style="background-image: url({{ getOneCategory(54,'article')->cover_url }});"></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<!-- end 研究生教育简介 -->
|
||||
|
||||
<!-- start 硕士导师简介 -->
|
||||
<div class="educateMargin briefMargin">
|
||||
<div class="educate-title">硕士导师简介</div>
|
||||
<div class="educate-title">{{ getOneCategory(53,'title') }}</div>
|
||||
@if(getOneCategory(54,'article'))
|
||||
<div class="educateMaster">
|
||||
<div class="educateMaster-right">
|
||||
<div class="ce-img educateStudent-img">
|
||||
<!-- 图片为5:3-->
|
||||
<span style="background-image: url(/assets/index/images/facade.jpg);"></span>
|
||||
<span style="background-image: url({{ getOneCategory(54,'article')->cover_url }});"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="educateMaster-cont">
|
||||
<div class="educateMaster-cont-name">
|
||||
<img src="/assets/index/images/educatePop.png"/>
|
||||
<div class="educateMaster-cont-tutor">硕士导师简介<span>Introduction to master tutor</span>
|
||||
<div class="educateMaster-cont-tutor">
|
||||
{{ getOneCategory(54,'article')->title }}
|
||||
<span>Introduction to master tutor</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ce-nowrap-multi educateStudent-cont-text">
|
||||
硕士生导师,也叫硕士研究生导师,是指硕士研究生、硕士生的指导教师,属于研究生导师、研究生指导教师,包括学术学位硕士生导师、专业学位硕士生导师。硕士生导师应是本学科学术造诣较深的教授或相当专业技术职务的教学,科研人员,其学术水平在某些方面接近或达到国内或国际先进水平。有培养本科生经验,至少培养过两届本科生。能坚持正常工作,担负实际指导硕士生的责任。有课程教学经历,承担过或正在承担一定工作量的本科生课程。
|
||||
{{ getOneCategory(54,'article')->description }}
|
||||
</div>
|
||||
<div class="publicHover educateStudent-cont-more">更多>></div>
|
||||
<div class="publicHover educateStudent-cont-more"
|
||||
data-href=" {{ getOneCategory(54,'article')->link }}">更多>>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<!-- end 硕士导师简介 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
45
resources/views/index/search.blade.php
Normal file
45
resources/views/index/search.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', '首页')
|
||||
|
||||
@section('content')
|
||||
|
||||
<!-- 面包屑导航 -->
|
||||
@include('category.navigation')
|
||||
|
||||
<!-- 内容 -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@if ($articles->isNotEmpty())
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<ul class="indexExtend-ul studyExtend">
|
||||
@foreach ($articles as $article)
|
||||
<li data-href="{{ $article->link }}" class="publicHover">
|
||||
<div class="ce-nowrap indexExtend-ul-name">
|
||||
{{ $article->title }}
|
||||
</div>
|
||||
<div class="ce-nowrap-multi indexExtend-ul-text">
|
||||
{{ $article->description }}
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<div class="pageUl">
|
||||
@if ($articles->isNotEmpty())
|
||||
{{ $articles->links('layouts.pagination') }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-12 col-xs-12">
|
||||
<div class="no-searchCont">
|
||||
<img src="/assets/index/images/org55.png"/>
|
||||
<span>抱歉,暂无内容</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
@@ -12,6 +12,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@include('layouts.header')
|
||||
|
||||
@section('content')
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<!-- 微信漂浮窗 -->
|
||||
<div class="Rightfixed">
|
||||
<div class="Rightfixed-img">
|
||||
<img class="Rightfixed-img-code" src="/assets/index/images/wxFixed.png"/>
|
||||
<img src="/assets/index/images/wxImg.png" class="Rightfixed-pop">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 头部 -->
|
||||
<div class="navTop">
|
||||
<div class="container">
|
||||
@@ -19,11 +26,15 @@
|
||||
<img data-href="/" src="/assets/index/images/logo.png"/>
|
||||
</div>
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<form action="{{ route('index.search') }}">
|
||||
|
||||
<div class="navHead-search">
|
||||
<input type="" name="" placeholder="输入关键字搜索">
|
||||
<button class="navHead-logo"><img src="image/search_Icon.png"/></button>
|
||||
<input type="text" name="title" placeholder="输入关键字搜索">
|
||||
<button class="navHead-logo"><img src="/assets/index/images/search_Icon.png"/></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,8 +60,8 @@
|
||||
}
|
||||
@endphp
|
||||
@foreach ($all_categorys as $cate)
|
||||
<li @if (in_array($cate->id,$top_ids)) class="active" @endif>
|
||||
<a data-href="{{ $cate->link }}">{{ $cate->title }}</a>
|
||||
<li @if (in_array($cate->id,$top_ids)) class="active" @endif data-href="{{ $cate->link }}">
|
||||
{{ $cate->title }}
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
|
|
||||
*/
|
||||
Route::get('/', 'IndexController@index')->name('index.index');
|
||||
Route::get('search', 'IndexController@search')->name('index.search');
|
||||
|
||||
Route::get('articles/{article}', 'ArticleController@show')->name('article.show');
|
||||
|
||||
Route::get('category/{category}', 'CategoryController@index')->name('category.show');
|
||||
|
||||
//以下为导入数据
|
||||
Route::get('test/set_article_category', 'TestController@set_article_category');
|
||||
Route::get('test/set_category', 'TestController@set_category');
|
||||
|
||||
Reference in New Issue
Block a user