Commit 7273eb1e authored by 章建武's avatar 章建武

dep

parent a5da74d8
...@@ -71,13 +71,24 @@ class ArticleController extends Controller ...@@ -71,13 +71,24 @@ class ArticleController extends Controller
public function info(Request $request) public function info(Request $request)
{ {
$url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
}else{
$language_type = 0;
}
$type = $request->get('type'); $type = $request->get('type');
$id = $request->post('id'); $id = $request->post('id');
ArticleInfo::where('id','=',$id)->increment('browse'); ArticleInfo::where('id','=',$id)->increment('browse');
$data = ArticleInfo::query()->where('type', '=', $type) $data = ArticleInfo::query()->where('type', '=', $type)
->where('id','<>',$id) ->where('id','<>',$id)
->where('status',0)
->where('language_type',$language_type)
->orderBy('release_time','desc') ->orderBy('release_time','desc')
->limit(6) ->limit(6)
->get(); ->get();
......
...@@ -77,15 +77,15 @@ class GoodsItemController extends Controller ...@@ -77,15 +77,15 @@ class GoodsItemController extends Controller
switch ($type){ switch ($type){
case 5: case 5:
$title = '空间景观'; $title = '空间景观';
$content = $content5->content; $content = isset($content5->content) ? $content5->content : '';
break; break;
case 6 : case 6 :
$title = '活动运营'; $title = '活动运营';
$content = $content6->content; $content = isset($content6->content) ? $content6->content : '';
break; break;
case 7: case 7:
$title = '艺术街区'; $title = '艺术街区';
$content = $content7->content; $content = isset($content7->content) ? $content7->content : '';
} }
return view('index.goods_item.more') return view('index.goods_item.more')
......
...@@ -187,7 +187,11 @@ ...@@ -187,7 +187,11 @@
<img src="{{$alert_t->url}}{{$article1->img_path}}"> <img src="{{$alert_t->url}}{{$article1->img_path}}">
<h1>{{$article1->title}}</h1> <h1>{{$article1->title}}</h1>
<p> </p> <p> </p>
@if($language_type == 1)
<a href="{{route('enarticle',['id'=>$article1->id,'type'=>$article1->type])}}">View details<span class="icon-angle-double-right"></span></a>
@else
<a href="{{route('article',['id'=>$article1->id,'type'=>$article1->type])}}">查看详情<span class="icon-angle-double-right"></span></a> <a href="{{route('article',['id'=>$article1->id,'type'=>$article1->type])}}">查看详情<span class="icon-angle-double-right"></span></a>
@endif
</div> </div>
</div> </div>
...@@ -202,7 +206,7 @@ ...@@ -202,7 +206,7 @@
</div> </div>
<div class="page8-center-more"> <div class="page8-center-more">
@if($language_type == 1) @if($language_type == 1)
<a href="{{route('news')}}"><span></span><i>More info</i></a> <a href="{{route('ennews')}}"><span></span><i>More info</i></a>
@else @else
<a href="{{route('news')}}"><span></span><i>更多资讯</i></a> <a href="{{route('news')}}"><span></span><i>更多资讯</i></a>
@endif @endif
...@@ -220,8 +224,7 @@ ...@@ -220,8 +224,7 @@
<p></p> <p></p>
@if($language_type == 1) @if($language_type == 1)
<a href="{{route('article',['id'=>$article2->id,'type'=>$article2->type])}}">View details<span class="icon-angle-double-right"></span></a> <a href="{{route('enarticle',['id'=>$article2->id,'type'=>$article2->type])}}">View details<span class="icon-angle-double-right"></span></a>
@else @else
<a href="{{route('article',['id'=>$article2->id,'type'=>$article2->type])}}">查看详情<span class="icon-angle-double-right"></span></a> <a href="{{route('article',['id'=>$article2->id,'type'=>$article2->type])}}">查看详情<span class="icon-angle-double-right"></span></a>
@endif @endif
......
...@@ -27,7 +27,17 @@ ...@@ -27,7 +27,17 @@
<h1>{{$info->title}}</h1> <h1>{{$info->title}}</h1>
</div> </div>
<div class="news-info-laiyuan"> <div class="news-info-laiyuan">
<p><em>来源:{{$info->source}}<span></span></em><em>浏览:<span>{{$info->browse}}</span></em><em>发布时间:<span>{{date('Y-m-d',$info->release_time)}}</span></em></p> <p>
@if($language_type == 1)
<em>source:{{$info->source}}<span></span></em>
<em>browse:<span>{{$info->browse}}</span></em>
<em>Release time:<span>{{date('Y-m-d',$info->release_time)}}</span></em>
@else
<em>来源:{{$info->source}}<span></span></em>
<em>浏览:<span>{{$info->browse}}</span></em>
<em>发布时间:<span>{{date('Y-m-d',$info->release_time)}}</span></em>
@endif
</p>
</div> </div>
<div class="news-info-b"> <div class="news-info-b">
{!!$info->content!!} {!!$info->content!!}
...@@ -47,7 +57,7 @@ ...@@ -47,7 +57,7 @@
<!--<a href="mailto:"><span></span></a>--> <!--<a href="mailto:"><span></span></a>-->
</div> </div>
<div class=" fx"> <div class=" fx">
分享到: <!--分享到:-->
<div class="jiathis_style_24x24"> <div class="jiathis_style_24x24">
<a class="jiathis_button_qzone"></a> <a class="jiathis_button_qzone"></a>
<a class="jiathis_button_tsina"></a> <a class="jiathis_button_tsina"></a>
...@@ -70,4 +80,4 @@ ...@@ -70,4 +80,4 @@
</div> </div>
</div> </div>
</div> </div>
@endsection @endsection
\ No newline at end of file
...@@ -77,7 +77,7 @@ Route::get('/Admin', function () { ...@@ -77,7 +77,7 @@ Route::get('/Admin', function () {
Route::get('/news/article-info','Index\ArticleController@info')->name('article'); Route::get('/news/article-info','Index\ArticleController@info')->name('article');
Route::get('en/news/article-info','Index\ArticleController@info')->name('enarticle'); Route::get('en/news/article-info','Index\ArticleController@info')->name('enarticle');
Route::get('en/news/','Index\ArticleController@index')->name('news');//英文版新闻中心 Route::get('en/news/','Index\ArticleController@index')->name('ennews');//英文版新闻中心
Route::get('/news','Index\ArticleController@index')->name('news');//新闻中心 Route::get('/news','Index\ArticleController@index')->name('news');//新闻中心
Route::any('/news/articel_list','Index\ArticleController@article_list')->name('article_list'); Route::any('/news/articel_list','Index\ArticleController@article_list')->name('article_list');
Route::any('en/news/articel_list','Index\ArticleController@article_list')->name('enarticle_list'); Route::any('en/news/articel_list','Index\ArticleController@article_list')->name('enarticle_list');
......
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