Commit d304f8a0 authored by 章建武's avatar 章建武

dep

parent 4000046d
......@@ -37,16 +37,19 @@ class ArticleController extends Controller
$news_center = ArticleInfo::query()
->where('type', '=', 1)
->where('language_type', '=', $language_type)
->where('status', '=', 0)
->orderBy('num', 'desc')
->first();
$news_center2 = ArticleInfo::query()
->where('type', '=', 4)
->where('language_type', '=', $language_type)
->where('status', '=', 0)
->orderBy('num', 'desc')
->first();
$group_news1 = ArticleInfo::query()->where('type', '=', NewsType::GROUP_NEWS)
->orderBy('num', 'asc')
->where('language_type', '=', $language_type)
->where('status', '=', 0)
->limit(3)->get();
$group_news2 = ArticleInfo::query()
......@@ -58,10 +61,12 @@ class ArticleController extends Controller
->limit(2)->get();
// dd($language_type);
$item_trends = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS)
->where('status', '=', 0)
->where('language_type', '=', $language_type)
->orderBy('num', 'asc')
->limit(2)->get();
$item_trends2 = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS)
->where('status', '=', 0)
->where('language_type', '=', $language_type)
// ->whereNotIn('id', $item_trends->pluck('id')->toArray())
->orderBy('num', 'asc')
......
......@@ -57,7 +57,6 @@ class GroupCultureController extends Controller
$data1 = GroupCulture::query()->where('type','=',1)->where($where)->orderBy('id','desc')->first();
$data2 = GroupCulture::query()->where('type','=',2)->where($where)->orderBy('id','desc')->first();
$data3 = GroupCulture::query()->where('type','=',3)->where($where)->orderBy('id','desc')->first();
return view('Index.group_culture.index')
->with( compact('data1'))
->with( compact('data2'))
......
......@@ -23,13 +23,13 @@
<div class="culture-item1-b">
<ul class="clearfix">
@if($language_type == 1)
<li class="culture-item1-b1"><a href="{{route('enfashion_city')}}"><p>Fashion and city</p><img src="{{$data1->url}}{{$data1->pic_path}} "></a></li>
<li class="culture-item1-b2"><a href="{{ route('enfashion_safety') }}"><p>Fashion and safety</p><img src="{{$data2->url}}{{$data2->pic_path}} "></a></li>
<li class="culture-item1-b3"><a href="{{ route('enpublic_welfare') }}"><p>Fashion and public welfare</p><img src="{{$data3->url}}{{$data3->pic_path}} "></a></li>
<li class="culture-item1-b1"><a href="{{route('enfashion_city')}}"><p>{{$data1->title}}</p><img src="{{$data1->url}}{{$data1->pic_path}} "></a></li>
<li class="culture-item1-b2"><a href="{{ route('enfashion_safety') }}"><p>{{$data2->title}}y</p><img src="{{$data2->url}}{{$data2->pic_path}} "></a></li>
<li class="culture-item1-b3"><a href="{{ route('enpublic_welfare') }}"><p>{{$data3->title}}</p><img src="{{$data3->url}}{{$data3->pic_path}} "></a></li>
@else
<li class="culture-item1-b1"><a href="{{route('fashion_city')}}"><p>时尚与城市</p><img src="{{$data1->url}}{{$data1->pic_path}} "></a></li>
<li class="culture-item1-b2"><a href="{{ route('fashion_safety') }}"><p>时尚与安全</p><img src="{{$data2->url}}{{$data2->pic_path}}"></a></li>
<li class="culture-item1-b3"><a href="{{ route('public_welfare') }}"><p>时尚与公益</p><img src="{{$data3->url}}{{$data3->pic_path}} "></a></li>
<li class="culture-item1-b1"><a href="{{route('fashion_city')}}"><p>{{$data1->title}}</p><img src="{{$data1->url}}{{$data1->pic_path}} "></a></li>
<li class="culture-item1-b2"><a href="{{ route('fashion_safety') }}"><p>{{$data2->title}}</p><img src="{{$data2->url}}{{$data2->pic_path}}"></a></li>
<li class="culture-item1-b3"><a href="{{ route('public_welfare') }}"><p>{{$data3->title}}</p><img src="{{$data3->url}}{{$data3->pic_path}} "></a></li>
@endif
</ul>
......
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