Commit 77128c8b authored by 章建武's avatar 章建武

修改bug

parent 311437c0
......@@ -10,14 +10,12 @@ class ArticleInfoValidate extends Validate
protected $rule = [
'title|标题' => 'require',
'content|内容' => 'require',
'introduce|简介' => 'require',
];
protected $message = [
'title.require' => '标题不能为空',
'content.require' => '内容不能为空',
'introduce.require' => '简介不能为空',
];
......
......@@ -37,16 +37,15 @@ class ArticleController extends Controller
$news_center = ArticleInfo::query()
->where('type', '=', 1)
->where('language_type', '=', $language_type)
->orderBy('id', 'desc')
->orderBy('num', 'desc')
->first();
$news_center2 = ArticleInfo::query()
->where('type', '=', 4)
->where('language_type', '=', $language_type)
->orderBy('id', 'desc')
->orderBy('num', 'desc')
->first();
$group_news1 = ArticleInfo::query()->where('type', '=', NewsType::GROUP_NEWS)
->orderBy('id', 'asc')
->orderBy('num', 'asc')
->where('language_type', '=', $language_type)
->limit(3)->get();
......@@ -55,17 +54,17 @@ class ArticleController extends Controller
->where('status', '=', 0)
->where('type', 2)
// ->whereNotIn('id', $group_news1->pluck('id')->toArray())
->orderBy('id', 'asc')
->orderBy('num', 'asc')
->limit(2)->get();
// dd($language_type);
$item_trends = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS)
->where('language_type', '=', $language_type)
->orderBy('id', 'asc')
->orderBy('num', 'asc')
->limit(2)->get();
$item_trends2 = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS)
->where('language_type', '=', $language_type)
// ->whereNotIn('id', $item_trends->pluck('id')->toArray())
->orderBy('id', 'asc')
->orderBy('num', 'asc')
->limit(3)->get();
$navigation = IndexNavigation::query()
......
......@@ -60,11 +60,13 @@ class IndexController extends Controller
$article1 = ArticleInfo::query()
->where('language_type', '=', $language_type)
->limit(1)
->orderBy('created_at','desc')
->first();
$article2 = ArticleInfo::query()
->where('language_type', '=', $language_type)
->limit(1)
->orderBy('updated_at','desc')
->first();
$alert_t = ArticleInfo::query()
......
......@@ -163,7 +163,7 @@
<a class="slide-a"><img src="{{$val->path}} " style="height: 720px;"></a>
<div class="panel-more">
@if($language_type == 1)
<a href="{{route('enbrand_culture')}}">
<a href="{{$val->img_title}}">
<img src="{{asset('images/moreinfo.png')}}">
</a>
@else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment