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

dep

parent a4a4036b
...@@ -41,6 +41,13 @@ class VideoController extends Controller ...@@ -41,6 +41,13 @@ class VideoController extends Controller
if ($request->isPost()) { if ($request->isPost()) {
$param = $request->param(); $param = $request->param();
$param['created_at'] = time(); $param['created_at'] = time();
$where = [
'language_type' => $param['language_type']
];
$num = $model->where($where)->count();
$num ++;
$param['num'] = $num;
$param['url'] = 'http://'.$_SERVER['SERVER_NAME']; $param['url'] = 'http://'.$_SERVER['SERVER_NAME'];
$validate_result = $validate->scene('add')->check($param); $validate_result = $validate->scene('add')->check($param);
if (!$validate_result) { if (!$validate_result) {
......
...@@ -98,7 +98,7 @@ class AudioController extends Controller ...@@ -98,7 +98,7 @@ class AudioController extends Controller
$type = $request->get('type'); $type = $request->get('type');
$page = $request->get('page'); $page = $request->get('page');
$data = IndexVideoUrl::getDataById($request->get('id')); $data = IndexVideoUrl::getDataById($language_type,$request->get('num'));
$list = IndexVideoUrl::query() $list = IndexVideoUrl::query()
->where('status',0) ->where('status',0)
->where(['type'=>$type,'language_type'=>$language_type]) ->where(['type'=>$type,'language_type'=>$language_type])
......
...@@ -26,9 +26,9 @@ class IndexVideoUrl extends Model ...@@ -26,9 +26,9 @@ class IndexVideoUrl extends Model
} }
public static function getDataById($id) public static function getDataById($language_type,$num)
{ {
return self::query()->where('id','=',$id)->first(); return self::query()->where('num','=',$num)->where('language_type','=',$language_type)->first();
} }
} }
...@@ -29,24 +29,24 @@ ...@@ -29,24 +29,24 @@
@foreach($speech as $v1) @foreach($speech as $v1)
@if($language_type == 1) @if($language_type == 1)
<li> <li>
<a href="{{route('enplay_audio',['id'=>$v1->id,'type'=>1])}}"> <a href="{{route('enplay_audio',['num'=>$v1->num,'type'=>1])}}">
<img src="{{$v1->url}}{{$v1->img_path}}"> <img src="{{$v1->url}}{{$v1->img_path}}">
<p class="ell1">{{$v1->title}}</p> <p class="ell1">{{$v1->title}}</p>
</a> </a>
</li> </li>
@else @else
<li><a href="{{route('play_audio',['id'=>$v1->id,'type'=>1])}}"><img src="{{$v1->url}}{{$v1->img_path}}"><p class="ell1">{{$v1->title}}</p></a></li> <li><a href="{{route('play_audio',['num'=>$v1->num,'type'=>1])}}"><img src="{{$v1->url}}{{$v1->img_path}}"><p class="ell1">{{$v1->title}}</p></a></li>
@endif @endif
@endforeach @endforeach
</ul> </ul>
</div> </div>
<div class="culture-more"> <div class="culture-more">
@if($language_type == 1) @if($language_type == 1)
<a href="{{route('enplay_audio',['id'=>1,'type'=>1])}}"> <a href="{{route('enplay_audio',['num'=>1,'type'=>1])}}">
More More
</a> </a>
@else @else
<a href="{{route('play_audio',['id'=>1,'type'=>1])}}"> <a href="{{route('play_audio',['num'=>1,'type'=>1])}}">
更多 更多
</a> </a>
@endif @endif
...@@ -68,18 +68,18 @@ ...@@ -68,18 +68,18 @@
<ul class="clearfix"> <ul class="clearfix">
@foreach($corporate as $v2) @foreach($corporate as $v2)
@if($language_type == 1) @if($language_type == 1)
<li><a href="{{route('enplay_audio',['id'=>$v2->id,'type'=>2])}}"><img src="{{$v2->url}}{{$v2->img_path}}"><p class="ell1">{{$v2->title}}</p></a></li> <li><a href="{{route('enplay_audio',['num'=>$v2->num,'type'=>2])}}"><img src="{{$v2->url}}{{$v2->img_path}}"><p class="ell1">{{$v2->title}}</p></a></li>
@else @else
<li><a href="{{route('play_audio',['id'=>$v2->id,'type'=>2])}}"><img src="{{$v2->url}}{{$v2->img_path}}"><p class="ell1">{{$v2->title}}</p></a></li> <li><a href="{{route('play_audio',['num'=>$v2->num,'type'=>2])}}"><img src="{{$v2->url}}{{$v2->img_path}}"><p class="ell1">{{$v2->title}}</p></a></li>
@endif @endif
@endforeach @endforeach
</ul> </ul>
</div> </div>
<div class="culture-more"> <div class="culture-more">
@if($language_type == 1) @if($language_type == 1)
<a href="{{route('enplay_audio',['id'=>$v2->id,'type'=>2])}}">More</a> <a href="{{route('enplay_audio',['num'=>$v2->num,'type'=>2])}}">More</a>
@else @else
<a href="{{route('play_audio',['id'=>$v2->id,'type'=>2])}}">更多</a> <a href="{{route('play_audio',['num'=>$v2->num,'type'=>2])}}">更多</a>
@endif @endif
</div> </div>
</div> </div>
...@@ -98,18 +98,18 @@ ...@@ -98,18 +98,18 @@
<ul class="clearfix"> <ul class="clearfix">
@foreach($activity as $v3) @foreach($activity as $v3)
@if($language_type == 1) @if($language_type == 1)
<li><a href="{{route('enplay_audio',['id'=>$v3->id,'type'=>3])}}"><img src="{{$v3->url}}{{$v3->img_path}}"><p class="ell1">{{$v3->title}}</p></a></li> <li><a href="{{route('enplay_audio',['num'=>$v3->num,'type'=>3])}}"><img src="{{$v3->url}}{{$v3->img_path}}"><p class="ell1">{{$v3->title}}</p></a></li>
@else @else
<li><a href="{{route('play_audio',['id'=>$v3->id,'type'=>3])}}"><img src="{{$v3->url}}{{$v3->img_path}}"><p class="ell1">{{$v3->title}}</p></a></li> <li><a href="{{route('play_audio',['num'=>$v3->num,'type'=>3])}}"><img src="{{$v3->url}}{{$v3->img_path}}"><p class="ell1">{{$v3->title}}</p></a></li>
@endif @endif
@endforeach @endforeach
</ul> </ul>
</div> </div>
<div class="culture-more"> <div class="culture-more">
@if($language_type == 1) @if($language_type == 1)
<a href="{{route('enplay_audio',['id'=>$v3->id,'type'=>3])}}">More</a> <a href="{{route('enplay_audio',['num'=>$v3->num,'type'=>3])}}">More</a>
@else @else
<a href="{{route('play_audio',['id'=>$v3->id,'type'=>3])}}">更多</a> <a href="{{route('play_audio',['num'=>$v3->num,'type'=>3])}}">更多</a>
@endif @endif
</div> </div>
...@@ -129,18 +129,18 @@ ...@@ -129,18 +129,18 @@
<ul class="clearfix"> <ul class="clearfix">
@foreach($media_coverage as $v4) @foreach($media_coverage as $v4)
@if($language_type == 1) @if($language_type == 1)
<li><a href="{{route('enplay_audio',['id'=>$v4->id,'type'=>4])}}"><img src="{{$v4->url}}{{$v4->img_path}}"><p class="ell1">{{$v4->title}}</p></a></li> <li><a href="{{route('enplay_audio',['num'=>$v4->num,'type'=>4])}}"><img src="{{$v4->url}}{{$v4->img_path}}"><p class="ell1">{{$v4->title}}</p></a></li>
@else @else
<li><a href="{{route('play_audio',['id'=>$v4->id,'type'=>4])}}"><img src="{{$v4->url}}{{$v4->img_path}}"><p class="ell1">{{$v4->title}}</p></a></li> <li><a href="{{route('play_audio',['num'=>$v4->num,'type'=>4])}}"><img src="{{$v4->url}}{{$v4->img_path}}"><p class="ell1">{{$v4->title}}</p></a></li>
@endif @endif
@endforeach @endforeach
</ul> </ul>
</div> </div>
<div class="culture-more"> <div class="culture-more">
@if($language_type == 1) @if($language_type == 1)
<a href="{{route('enplay_audio',['id'=>$v4->id,'type'=>4])}}">More</a> <a href="{{route('enplay_audio',['num'=>$v4->num,'type'=>4])}}">More</a>
@else @else
<a href="{{route('play_audio',['id'=>$v4->id,'type'=>4])}}">更多</a> <a href="{{route('play_audio',['num'=>$v4->num,'type'=>4])}}">更多</a>
@endif @endif
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
@foreach($list as $value) @foreach($list as $value)
@if($language_type == 1) @if($language_type == 1)
<li class="video-palyer-list1"> <li class="video-palyer-list1">
<a href="{{ route('enplay_audio',['id'=> $value->id,'type'=>$value->type,'page'=>$list->currentPage()]) }}" > <a href="{{ route('enplay_audio',['num'=> $value->num,'type'=>$value->type,'page'=>$list->currentPage()]) }}" >
<img src="{{$value->url}}{{$value->img_path}}"> <img src="{{$value->url}}{{$value->img_path}}">
<p class="ell1">{{$value->title}}</p> <p class="ell1">{{$value->title}}</p>
</a> </a>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</li> </li>
@else @else
<li class="video-palyer-list1"> <li class="video-palyer-list1">
<a href="{{ route('play_audio',['id'=> $value->id,'type'=>$value->type,'page'=>$list->currentPage()]) }}" > <a href="{{ route('play_audio',['num'=> $value->num,'type'=>$value->type,'page'=>$list->currentPage()]) }}" >
<img src="{{$value->url}}{{$value->img_path}}"> <img src="{{$value->url}}{{$value->img_path}}">
<p class="ell1">{{$value->title}}</p> <p class="ell1">{{$value->title}}</p>
</a> </a>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</div> </div>
<div class="pull-right paginate" style=" position: relative;top: -17px;left: -450px;"> <div class="pull-right paginate" style=" position: relative;top: -17px;left: -450px;">
@if(isset($data->script_url)) @if(isset($data->script_url))
{{ $list->appends(['type' => $type,'id'=>$data->id])->render() }} {{ $list->appends(['type' => $type,'num'=>$data->num])->render() }}
@endif @endif
</div> </div>
......
...@@ -253,7 +253,6 @@ ...@@ -253,7 +253,6 @@
@else @else
<a href="{{route('news')}}"><span></span><i>更多资讯</i></a> <a href="{{route('news')}}"><span></span><i>更多资讯</i></a>
@endif @endif
</div> </div>
</div> </div>
<div class="page8-right page8-info"> <div class="page8-right page8-info">
......
...@@ -61,12 +61,15 @@ ...@@ -61,12 +61,15 @@
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<i class="icon-menu"></i> <i class="icon-menu"></i>
</button> </button>
@if($language_type == 1)
<a class="language" style="cursor: pointer" href="{{url('')}}"> <a class="language" style="cursor: pointer" href="{{url('')}}">
<span class="zh">中文</span> <span class="zh">中文</span>
</a> </a>
<a class="language1" style="cursor: pointer;" href="{{url('en/index')}}" > @else
<a class="language" style="cursor: pointer" href="{{url('en/index')}}">
<span class="en">EN</span> <span class="en">EN</span>
</a> </a>
@endif
</div> </div>
<!-- <!--
*** 左侧推出 class="slider-left" data-effect='push' *** 左侧推出 class="slider-left" data-effect='push'
......
...@@ -35,7 +35,12 @@ ...@@ -35,7 +35,12 @@
</head> </head>
<body> <body>
<div class="logo1"> <div class="logo1">
<a href="/index/index/chinese"><img src="/e8stdata/static/00/00/51/img/20151204/707d171afb7a70704cdd8e4504018718.png" alt="logo" title="logo"></a> @if($language_type == 1)
<a href="{{url('en/index')}}"><img src="/e8stdata/static/00/00/51/img/20151204/707d171afb7a70704cdd8e4504018718.png" alt="logo" title="logo"></a>
@else
<a href="{{url('')}}"><img src="/e8stdata/static/00/00/51/img/20151204/707d171afb7a70704cdd8e4504018718.png" alt="logo" title="logo"></a>
@endif
</div> </div>
@section('responsive-image') @section('responsive-image')
<div class="nei-page1 responsive-image" data-media-tablet="/e8stdata/static/00/00/51/img/20180824/7a609776d3c59446701cd6a17f2220e7.jpg" data-media-desktop="/e8stdata/static/00/00/51/img/20180824/7a609776d3c59446701cd6a17f2220e7.jpg" style="background-image:url(/e8stdata/static/00/00/51/img/20180824/7a609776d3c59446701cd6a17f2220e7.jpg)"> <div class="nei-page1 responsive-image" data-media-tablet="/e8stdata/static/00/00/51/img/20180824/7a609776d3c59446701cd6a17f2220e7.jpg" data-media-desktop="/e8stdata/static/00/00/51/img/20180824/7a609776d3c59446701cd6a17f2220e7.jpg" style="background-image:url(/e8stdata/static/00/00/51/img/20180824/7a609776d3c59446701cd6a17f2220e7.jpg)">
...@@ -62,12 +67,15 @@ ...@@ -62,12 +67,15 @@
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<i class="icon-menu"></i> <i class="icon-menu"></i>
</button> </button>
@if($language_type == 1)
<a class="language" style="cursor: pointer" href="{{$zh}}"> <a class="language" style="cursor: pointer" href="{{$zh}}">
<span class="zh">中文</span> <span class="zh">中文</span>
</a> </a>
<a class="language1" style="cursor: pointer" href="{{$en}}"> @else
<a class="language" style="cursor: pointer" href="{{$en}}">
<span class="en">EN</span> <span class="en">EN</span>
</a> </a>
@endif
</div> </div>
<!-- <!--
*** 左侧推出 class="slider-left" data-effect='push' *** 左侧推出 class="slider-left" data-effect='push'
...@@ -234,6 +242,8 @@ ...@@ -234,6 +242,8 @@
<script> <script>
var zh = '{{$zh}}'; var zh = '{{$zh}}';
var en = '{{$en}}'; var en = '{{$en}}';
function zh_url(){ function zh_url(){
location.href = "{{$zh}}";//跳转 location.href = "{{$zh}}";//跳转
} }
......
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