Commit 86929c31 authored by 章建武's avatar 章建武

dpe

parent d6c297df
...@@ -55,18 +55,17 @@ class VideoController extends Controller ...@@ -55,18 +55,17 @@ class VideoController extends Controller
return error($attachment_avatar->getError()); return error($attachment_avatar->getError());
} }
//处理视频 // //处理视频
$video_url = $attachment_avatar->upload('video_url'); // $video_url = $attachment_avatar->upload('video_url');
// if ($video_url) {
if ($video_url) { // $param['video_url'] = $video_url->url;
$param['video_url'] = $video_url->url; // } else {
} else { // return error($attachment_avatar->getError());
return error($attachment_avatar->getError()); // }
}
if ($video_url) { if ($param['script_url']) {
$param['video_url'] = $video_url->url; // $param['video_url'] = $video_url->url;
$iframe = '<iframe frameborder="0" width="100%" height="600" src=" '.$param['url'].$param['video_url']."".'" allowfullscreen></iframe>' ; $iframe = '<iframe frameborder="0" width="100%" height="600" src="'.$param['script_url']."".'" allowfullscreen></iframe>';
$param['script_url'] = $iframe; $param['script_url'] = $iframe;
} }
...@@ -112,20 +111,20 @@ class VideoController extends Controller ...@@ -112,20 +111,20 @@ class VideoController extends Controller
//处理视频 //处理视频
$video_url = $attachment_avatar->upload('video_url'); // $video_url = $attachment_avatar->upload('video_url');
if ($video_url) { // if ($video_url) {
$param['video_url'] = $video_url->url; // $param['video_url'] = $video_url->url;
$iframe = '<iframe frameborder="0" width="100%" height="600" src=" '.$data['url'].$param['video_url']."".'" allowfullscreen></iframe>' ; // $iframe = '<iframe frameborder="0" width="100%" height="600" src=" '.$data['url'].$param['video_url']."".'" allowfullscreen></iframe>' ;
$param['script_url'] = $iframe;
}
// $data->save(['script_url'=> '']);
// if(!$video_url){
// $iframe = '<iframe frameborder="0" width="100%" height="600" src="'.$param['script_url']."".'" allowfullscreen></iframe>';
// $param['script_url'] = $iframe; // $param['script_url'] = $iframe;
// }else{
//
// } // }
// $data->save(['script_url'=> '']);
if($param['script_url'] !=$data['script_url']){
$iframe = '<iframe frameborder="0" width="100%" height="600" src="'.$param['script_url']."".'" allowfullscreen></iframe>';
$param['script_url'] = $iframe;
}else{
}
$result = $data->save($param); $result = $data->save($param);
return $result ? success() : error(); return $result ? success() : error();
} }
......
...@@ -80,38 +80,35 @@ ...@@ -80,38 +80,35 @@
</select> </select>
</div> </div>
</div> </div>
<!--<div class="form-group">-->
<!--<label for="title" class="col-sm-2 control-label">第三方视频链接</label>-->
<!--<div class="col-sm-10 col-md-4">-->
<!--<input id="script_url" name="script_url" value="{$data.script_url|default=''}"-->
<!--placeholder="请输入链接" type="text" class="form-control field-text">-->
<!--</div>-->
<!--</div>-->
<div class="form-group"> <div class="form-group">
<label for="avatar" class="col-sm-2 control-label">本地视频</label> <label for="title" class="col-sm-2 control-label">第三方视频链接</label>
<div class="col-sm-10 col-md-4">
<input id="script_url" name="script_url" value="{$data.script_url|default=''}"
placeholder="请输入链接" type="text" class="form-control field-text">
</div>
</div>
<div class="form-group">
<label for="avatar" class="col-sm-2 control-label"></label>
<div class="col-sm-10 col-md-4"> <div class="col-sm-10 col-md-4">
{if isset($data.script_url)} {if isset($data.script_url)}
{:html_entity_decode($data.script_url)} {:html_entity_decode($data.script_url)}
{/if} {/if}
<input id="file" name="video_url" placeholder="请选择视频" {if
isset($data.script_url)}data-initial-preview="{$data.video_url}" {/if} type="file" >
</div> </div>
</div> </div>
<script>
$('#file').fileinput({ <!--<script>-->
language: 'zh', <!--$('#file').fileinput({-->
overwriteInitial: true, <!--language: 'zh',-->
browseLabel: '请选择视频', <!--overwriteInitial: true,-->
initialPreviewAsData: true, <!--browseLabel: '请选择视频',-->
dropZoneEnabled: false, <!--initialPreviewAsData: true,-->
showUpload: false, <!--dropZoneEnabled: false,-->
showRemove: false, <!--showUpload: false,-->
allowedFileExtensions: ['mp4'], <!--showRemove: false,-->
maxFileSize: 10000000000, <!--allowedFileExtensions: ['mp4'],-->
}); <!--maxFileSize: 10000000000,-->
</script> <!--});-->
<!--</script>-->
</div> </div>
<!-- 表单底部 --> <!-- 表单底部 -->
<div class="box-footer"> <div class="box-footer">
...@@ -144,8 +141,8 @@ ...@@ -144,8 +141,8 @@
</div> </div>
</section> </section>
<script> <script>
// 实例化编辑器
// 实例化编辑器
UE.delEditor('container'); UE.delEditor('container');
var ue = UE.getEditor('container'); var ue = UE.getEditor('container');
/** 表单验证 **/ /** 表单验证 **/
......
...@@ -302,7 +302,7 @@ class Uploader ...@@ -302,7 +302,7 @@ class Uploader
$format = str_replace("{filename}", $oriName, $format); $format = str_replace("{filename}", $oriName, $format);
//替换随机字符串 //替换随机字符串
$randNum = rand(1, 10000000000) . rand(1, 10000000000); $randNum = rand(1, 2147483647) . rand(1, 2147483647);
if (preg_match("/\{rand\:([\d]*)\}/i", $format, $matches)) { if (preg_match("/\{rand\:([\d]*)\}/i", $format, $matches)) {
$format = preg_replace("/\{rand\:[\d]*\}/i", substr($randNum, 0, $matches[1]), $format); $format = preg_replace("/\{rand\:[\d]*\}/i", substr($randNum, 0, $matches[1]), $format);
} }
......
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
"scrawlFieldName": "upfile", /* 提交的图片表单名称 */ "scrawlFieldName": "upfile", /* 提交的图片表单名称 */
"scrawlPathFormat": "/Uploads/notice/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ "scrawlPathFormat": "/Uploads/notice/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"scrawlMaxSize": 2048000, /* 上传大小限制,单位B */ "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */
"scrawlUrlPrefix": "http://mallapp.guoguodz.com", /* 图片访问路径前缀 */ "scrawlUrlPrefix": "http://www.fashion_group_admin.net", /* 图片访问路径前缀 */
"scrawlInsertAlign": "none", "scrawlInsertAlign": "none",
/* 截图工具上传 */ /* 截图工具上传 */
"snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */ "snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */
"snapscreenPathFormat": "/Uploads/notice/images/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ "snapscreenPathFormat": "/Uploads/notice/images/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"snapscreenUrlPrefix": "https://mall.guoguodz.com", /* 图片访问路径前缀 */ "snapscreenUrlPrefix": "http://www.fashion_group_admin.net", /* 图片访问路径前缀 */
"snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */ "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */
/* 抓取远程图片配置 */ /* 抓取远程图片配置 */
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
"catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */ "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */
"catcherFieldName": "source", /* 提交的图片列表表单名称 */ "catcherFieldName": "source", /* 提交的图片列表表单名称 */
"catcherPathFormat": "/Uploads/notice/images/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ "catcherPathFormat": "/Uploads/notice/images/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"catcherUrlPrefix": "https://mall.guoguodz.com", /* 图片访问路径前缀 */ "catcherUrlPrefix": "http://www.fashion_group_admin.net", /* 图片访问路径前缀 */
"catcherMaxSize": 2048000, /* 上传大小限制,单位B */ "catcherMaxSize": 2048000, /* 上传大小限制,单位B */
"catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */ "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
"fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */ "fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */
"fileFieldName": "upfile", /* 提交的文件表单名称 */ "fileFieldName": "upfile", /* 提交的文件表单名称 */
"filePathFormat": "/Uploads/notice/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ "filePathFormat": "/Uploads/notice/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
"fileUrlPrefix": "https://mall.guoguodz.com", /* 文件访问路径前缀 */ "fileUrlPrefix": "http://www.fashion_group_admin.net", /* 文件访问路径前缀 */
"fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */ "fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */
"fileAllowFiles": [ "fileAllowFiles": [
".png", ".jpg", ".jpeg", ".gif", ".bmp", ".png", ".jpg", ".jpeg", ".gif", ".bmp",
...@@ -74,14 +74,14 @@ ...@@ -74,14 +74,14 @@
"imageManagerActionName": "listimage", /* 执行图片管理的action名称 */ "imageManagerActionName": "listimage", /* 执行图片管理的action名称 */
"imageManagerListPath": "/Uploads/notice/images/", /* 指定要列出图片的目录 */ "imageManagerListPath": "/Uploads/notice/images/", /* 指定要列出图片的目录 */
"imageManagerListSize": 20, /* 每次列出文件数量 */ "imageManagerListSize": 20, /* 每次列出文件数量 */
"imageManagerUrlPrefix": "https://mall.guoguodz.com", /* 图片访问路径前缀 */ "imageManagerUrlPrefix": "http://www.fashion_group_admin.net", /* 图片访问路径前缀 */
"imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */ "imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */
"imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */ "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */
/* 列出指定目录下的文件 */ /* 列出指定目录下的文件 */
"fileManagerActionName": "listfile", /* 执行文件管理的action名称 */ "fileManagerActionName": "listfile", /* 执行文件管理的action名称 */
"fileManagerListPath": "/Uploads/notice/file/", /* 指定要列出文件的目录 */ "fileManagerListPath": "/Uploads/notice/file/", /* 指定要列出文件的目录 */
"fileManagerUrlPrefix": "https://mall.guoguodz.com", /* 文件访问路径前缀 */ "fileManagerUrlPrefix": "http://www.fashion_group_admin.net", /* 文件访问路径前缀 */
"fileManagerListSize": 20, /* 每次列出文件数量 */ "fileManagerListSize": 20, /* 每次列出文件数量 */
"fileManagerAllowFiles": [ "fileManagerAllowFiles": [
".png", ".jpg", ".jpeg", ".gif", ".bmp", ".png", ".jpg", ".jpeg", ".gif", ".bmp",
......
<?php /*a:9:{s:83:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\navigation\index.html";i:1588042597;s:78:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\base.html";i:1588211322;s:82:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_css.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_js.html";i:1588154379;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\header.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\sidebar.html";i:1588038504;s:88:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\content_header.html";i:1588063433;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\footer.html";i:1588037872;s:89:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\control_sidebar.html";i:1587980045;}*/ ?> <?php /*a:9:{s:83:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\navigation\index.html";i:1588042597;s:78:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\base.html";i:1588211322;s:82:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_css.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_js.html";i:1588830847;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\header.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\sidebar.html";i:1588038504;s:88:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\content_header.html";i:1588063433;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\footer.html";i:1588037872;s:89:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\control_sidebar.html";i:1587980045;}*/ ?>
<?php if(!$admin['pjax']): ?> <?php if(!$admin['pjax']): ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-CN"> <html lang="zh-CN">
......
<?php /*a:9:{s:79:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\template\404.html";i:1587980045;s:78:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\base.html";i:1588211322;s:82:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_css.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_js.html";i:1588154379;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\header.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\sidebar.html";i:1588038504;s:88:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\content_header.html";i:1588063433;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\footer.html";i:1588037872;s:89:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\control_sidebar.html";i:1587980045;}*/ ?> <?php /*a:9:{s:79:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\template\404.html";i:1587980045;s:78:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\base.html";i:1588211322;s:82:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_css.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_js.html";i:1588830847;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\header.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\sidebar.html";i:1588038504;s:88:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\content_header.html";i:1588063433;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\footer.html";i:1588037872;s:89:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\control_sidebar.html";i:1587980045;}*/ ?>
<?php if(!$admin['pjax']): ?> <?php if(!$admin['pjax']): ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-CN"> <html lang="zh-CN">
......
...@@ -33,6 +33,7 @@ class ArticleController extends Controller ...@@ -33,6 +33,7 @@ class ArticleController extends Controller
->orderBy('id', 'desc') ->orderBy('id', 'desc')
->first(); ->first();
$news_center2 = ArticleInfo::query() $news_center2 = ArticleInfo::query()
->where('type', '=', 4)
->where('language_type', '=', $language_type) ->where('language_type', '=', $language_type)
->orderBy('id', 'desc') ->orderBy('id', 'desc')
->first(); ->first();
...@@ -44,18 +45,19 @@ class ArticleController extends Controller ...@@ -44,18 +45,19 @@ class ArticleController extends Controller
$group_news2 = ArticleInfo::query() $group_news2 = ArticleInfo::query()
->where('language_type', '=', $language_type) ->where('language_type', '=', $language_type)
->whereIn('type', [NewsType::GROUP_NEWS,NewsType::ALERT]) ->where('status', '=', 0)
->whereNotIn('id', $group_news1->pluck('id')->toArray()) ->where('type', 2)
// ->whereNotIn('id', $group_news1->pluck('id')->toArray())
->orderBy('id', 'asc') ->orderBy('id', 'asc')
->limit(2)->get(); ->limit(2)->get();
// dd($language_type);
$item_trends = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS) $item_trends = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS)
->where('language_type', '=', $language_type) ->where('language_type', '=', $language_type)
->orderBy('id', 'asc') ->orderBy('id', 'asc')
->limit(2)->get(); ->limit(2)->get();
$item_trends2 = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS) $item_trends2 = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS)
->where('language_type', '=', $language_type) ->where('language_type', '=', $language_type)
->whereNotIn('id', $item_trends->pluck('id')->toArray()) // ->whereNotIn('id', $item_trends->pluck('id')->toArray())
->orderBy('id', 'asc') ->orderBy('id', 'asc')
->limit(3)->get(); ->limit(3)->get();
return view('index.news.index', return view('index.news.index',
......
...@@ -19,15 +19,32 @@ class AudioController extends Controller ...@@ -19,15 +19,32 @@ class AudioController extends Controller
}else{ }else{
$language_type = 0; $language_type = 0;
} }
$speech = IndexVideoUrl::getListByType($language_type,1,4); $speech = IndexVideoUrl::query()->where('status',0)
->where('language_type',$language_type)
->where('type',1)
->limit(4)
->get();;
$corporate = IndexVideoUrl::query()->where('status',0)
->where('language_type',$language_type)
->where('type',2)
->limit(4)
->get();
$corporate = IndexVideoUrl::getListByType($language_type,2,4); $activity = IndexVideoUrl::query()->where('status',0)
->where('language_type',$language_type)
->where('type',3)
->limit(4)
->get();
$activity = IndexVideoUrl::getListByType($language_type,3,4); $media_coverage = IndexVideoUrl::query()->where('status',0)
->where('language_type',$language_type)
->where('type',4)
->limit(4)
->get();
$media_coverage = IndexVideoUrl::getListByType($language_type,4,4); return view('index.audio.index',compact('speech'))
->with(compact('corporate'))
return view('index.audio.index',compact('speech'))->with(compact('corporate'))->with(compact('activity')) ->with(compact('activity'))
->with(compact('media_coverage')); ->with(compact('media_coverage'));
} }
...@@ -46,7 +63,7 @@ class AudioController extends Controller ...@@ -46,7 +63,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($request->get('id'),$language_type);
$list = IndexVideoUrl::query()->where(['type'=>$type,'language_type'=>$language_type])->limit(3)->paginate(3, ['*'], 'page', $page); $list = IndexVideoUrl::query()->where(['type'=>$type,'language_type'=>$language_type])->limit(3)->paginate(3, ['*'], 'page', $page);
return view('index.audio.play',compact('data'))->with(compact('list'))->with(compact('type')); return view('index.audio.play',compact('data'))->with(compact('list'))->with(compact('type'));
} }
......
...@@ -12,6 +12,17 @@ class IndexController extends Controller ...@@ -12,6 +12,17 @@ class IndexController extends Controller
{ {
public function index() public function index()
{ {
$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;
}
$banner1 = IndexBanner::query() $banner1 = IndexBanner::query()
->where('type',1) ->where('type',1)
->get(); ->get();
...@@ -27,51 +38,57 @@ class IndexController extends Controller ...@@ -27,51 +38,57 @@ class IndexController extends Controller
$banner4= IndexBanner::query() $banner4= IndexBanner::query()
->where('type',4) ->where('type',4)
->get(); ->get();
$audio = Audio::query()->value('url'); $audio = Audio::query()->value('url');
$audio_url[] = IndexVideoUrl::query() $audio_url[] = IndexVideoUrl::query()
->where('type','=',3) ->where('type','=',3)
->where('language_type', '=', $language_type)
->orderBy('id','asc') ->orderBy('id','asc')
->limit(3)->get(); ->limit(3)->get();
// dd($audio_url);
$audio_url[] = IndexVideoUrl::query() $audio_url[] = IndexVideoUrl::query()
->where('type','=',1) ->where('type','=',1)
->where('language_type', '=', $language_type)
->orderBy('id','asc') ->orderBy('id','asc')
->limit(4)->get(); ->limit(4)->get();
$audio_url[] = IndexVideoUrl::query() $audio_url[] = IndexVideoUrl::query()
->where('type','=',4) ->where('type','=',4)
->where('language_type', '=', $language_type)
->orderBy('id','asc') ->orderBy('id','asc')
->limit(2)->get(); ->limit(2)->get();
$article1 = ArticleInfo::query() $article1 = ArticleInfo::query()
->where('language_type', '=', $language_type)
->limit(1) ->limit(1)
->first(); ->first();
$article2 = ArticleInfo::query() $article2 = ArticleInfo::query()
->where('language_type', '=', $language_type)
->limit(1) ->limit(1)
->first(); ->first();
$alert_t = ArticleInfo::query() $alert_t = ArticleInfo::query()
->where('language_type', '=', $language_type)
->orderBy('id','asc') ->orderBy('id','asc')
->limit(1) ->limit(1)
->first(); ->first();
$alert_b = ArticleInfo::query() $alert_b = ArticleInfo::query()
->where('language_type', '=', $language_type)
->orderBy('release_time','desc') ->orderBy('release_time','desc')
->where(['status'=>0,'type'=>5]) ->where(['status'=>0])
->limit(5) ->limit(4)
->get(); ->get();
$events = IndexEvents::query() $events = IndexEvents::query()->where('language_type', '=', $language_type)->get();
->get();
$setting = IndexSetting::query()->first(); $setting = IndexSetting::query()->first();
// dd($setting);
return view('index.index') return view('index.index')
->with('banner1',$banner1)->with('banner2',$banner2)->with('banner3',$banner3) ->with('banner1',$banner1)
->with('audio',$audio)->with('audio_url',$audio_url) ->with('banner2',$banner2)
->with('article1',$article1)->with('article2',$article2)->with(compact('events')) ->with('banner3',$banner3)
->with('audio',$audio)
->with('audio_url',$audio_url)
->with('article1',$article1)
->with('article2',$article2)
->with(compact('events'))
->with(compact('banner4')) ->with(compact('banner4'))
->with(compact('setting')) ->with(compact('setting'))
->with(compact('alert_t')) ->with(compact('alert_t'))
......
...@@ -12,7 +12,7 @@ class ArticleInfo extends Model ...@@ -12,7 +12,7 @@ class ArticleInfo extends Model
{ {
protected $table = 'index_article_info'; protected $table = 'index_article_info';
protected $fillable = ['release_time','browse','source','content','img_path','title','type','introduce','status']; protected $fillable = ['release_time','browse','source','content','img_path','title','type','introduce','status','url'];
} }
...@@ -12,23 +12,23 @@ class IndexVideoUrl extends Model ...@@ -12,23 +12,23 @@ class IndexVideoUrl extends Model
{ {
protected $table = 'index_video_url'; protected $table = 'index_video_url';
protected $fillable = ['img_path','video_url','title','sequence','type','script_url','other_url','url']; protected $fillable = ['img_path','video_url','title','sequence','type','script_url','other_url','url','language_type'];
public static function getListByType($language_type,$type,$limit,$pageinate = false) public static function getListByType($language_type,$type,$limit,$pageinate = false)
{ {
return $pageinate ? self::query()->where('type','=',$type) return $pageinate ? self::query()->where('type','=',$type)
->limit($limit) ->limit($limit)
->where('language_type',$language_type) ->where('language_type','=',$language_type)
->paginate(3) : self::query()->where('type','=',$type) ->paginate(3) : self::query()->where('type','=',$type)
->limit($limit) ->limit($limit)
->get(); ->get();
} }
public static function getDataById($id) public static function getDataById($id,$language_type)
{ {
return self::query()->where('id','=',$id)->first(); return self::query()->where('id','=',$id)->where('language_type','=',$language_type)->first();
} }
} }
...@@ -346,7 +346,7 @@ background: -o-linear-gradient(top, #add3e8, #b1d6e8); /*Opera 11.10+*/ ...@@ -346,7 +346,7 @@ background: -o-linear-gradient(top, #add3e8, #b1d6e8); /*Opera 11.10+*/
/*首页第9屏*/ /*首页第9屏*/
.page9{padding: 50px 0 20px;overflow: hidden;} .page9{padding: 50px 0 20px;overflow: hidden;}
.page9-map{position: relative;padding: 100px 0 150px;} .page9-map{position: relative;padding: 100px 0 150px;}
.page9-map-info{height: 232px;background: url(../img/page9-line.png) no-repeat left center;width: 2200px;position: relative;left: 0;} .page9-map-info{height: 232px;background: url(../img/page9-line.png) no-repeat left center;width: 2200px;position: relative;right: 0;}
.page9-map-dir{position: absolute;top: 50%;margin-top: -27px;display: inline-block;width: 54px;height: 54px;background: url(../img/dir.png) no-repeat;background-size: cover;z-index: 1000;} .page9-map-dir{position: absolute;top: 50%;margin-top: -27px;display: inline-block;width: 54px;height: 54px;background: url(../img/dir.png) no-repeat;background-size: cover;z-index: 1000;}
.page9-map-prev{background-position: 0 0;left: 0;} .page9-map-prev{background-position: 0 0;left: 0;}
.page9-map-next{background-position: 0 -72px;right: 0;} .page9-map-next{background-position: 0 -72px;right: 0;}
...@@ -392,7 +392,6 @@ background: -o-linear-gradient(top, #add3e8, #b1d6e8); /*Opera 11.10+*/ ...@@ -392,7 +392,6 @@ background: -o-linear-gradient(top, #add3e8, #b1d6e8); /*Opera 11.10+*/
/*首页第10屏*/ /*首页第10屏*/
/*.page10 li{height: 720px;}*/ /*.page10 li{height: 720px;}*/
/*.page10 li a{background-position: center center;background-size: cover;display: inline-block;width: 100%;height: 720px;}*/ /*.page10 li a{background-position: center center;background-size: cover;display: inline-block;width: 100%;height: 720px;}*/
......
...@@ -28,9 +28,14 @@ ...@@ -28,9 +28,14 @@
<ul class="clearfix"> <ul class="clearfix">
@foreach($speech as $v1) @foreach($speech as $v1)
@if($language_type == 1) @if($language_type == 1)
<li><a href="{{route('enplay_audio',['id'=>$v1->id,'type'=>1])}}"><img src="{{asset($v1->img_path)}}"><p class="ell1">{{$v1->title}}</p></a></li> <li>
<a href="{{route('enplay_audio',['id'=>$v1->id,'type'=>1])}}">
<img src="{{$v1->url}}{{$v1->img_path}}">
<p class="ell1">{{$v1->title}}</p>
</a>
</li>
@else @else
<li><a href="{{route('play_audio',['id'=>$v1->id,'type'=>1])}}"><img src="{{asset($v1->img_path)}}"><p class="ell1">{{$v1->title}}</p></a></li> <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>
@endif @endif
@endforeach @endforeach
</ul> </ul>
...@@ -63,9 +68,9 @@ ...@@ -63,9 +68,9 @@
<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="{{asset($v2->img_path)}}"><p class="ell1">{{$v2->title}}</p></a></li> <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>
@else @else
<li><a href="{{route('play_audio',['id'=>$v2->id,'type'=>2])}}"><img src="{{asset($v2->img_path)}}"><p class="ell1">{{$v2->title}}</p></a></li> <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>
@endif @endif
@endforeach @endforeach
</ul> </ul>
...@@ -93,9 +98,9 @@ ...@@ -93,9 +98,9 @@
<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="{{asset($v3->img_path)}}"><p class="ell1">{{$v3->title}}</p></a></li> <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>
@else @else
<li><a href="{{route('play_audio',['id'=>$v3->id,'type'=>3])}}"><img src="{{asset($v3->img_path)}}"><p class="ell1">{{$v3->title}}</p></a></li> <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>
@endif @endif
@endforeach @endforeach
</ul> </ul>
...@@ -124,9 +129,9 @@ ...@@ -124,9 +129,9 @@
<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="{{asset($v4->img_path)}}"><p class="ell1">{{$v4->title}}</p></a></li> <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>
@else @else
<li><a href="{{route('play_audio',['id'=>$v4->id,'type'=>4])}}"><img src="{{asset($v4->img_path)}}"><p class="ell1">{{$v4->title}}</p></a></li> <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>
@endif @endif
@endforeach @endforeach
</ul> </ul>
......
...@@ -17,20 +17,14 @@ ...@@ -17,20 +17,14 @@
<div class="main"> <div class="main">
<div class="container1"> <div class="container1">
<div class="video-palyer" style="position:relative;text-align: center;cursor: pointer;height: auto;"><!--默认播放--> <div class="video-palyer" style="position:relative;text-align: center;cursor: pointer;height: auto;"><!--默认播放-->
<!-- @if($data->video_url)--> @if(isset($data->script_url))
<!-- <div class="video-img" style="position: relative;">-->
<!-- <img src="{{asset('/about_images/public/Fv2n6m81CIncqI9Syy6hWfglGDPsyzopyMkE2xkJ.jpeg')}}" style="width: 100%;" data-id="{{$data->video_url}}">-->
<!-- </div>-->
<!-- @endif-->
@if($data->script_url)
<div id="a1" class="video-palyer" style="width: 100%"> <div id="a1" class="video-palyer" style="width: 100%">
{!! $data->script_url !!} {!! $data->script_url !!}
</div> </div>
<p>{{$data->title}}</p> <p>{{$data->title}}</p>
@endif @endif
@if($data->other_url) @if(isset($data->other_url))
<div id="a1" class="" style="width: 100%"> <div id="a1" class="" style="width: 100%">
{{--<iframe src="{{ $data->other_url }}" allowfullscreen="true" allowtransparency="true" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" style="height: 600px;width: 100%"> </iframe>--}} {{--<iframe src="{{ $data->other_url }}" allowfullscreen="true" allowtransparency="true" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" style="height: 600px;width: 100%"> </iframe>--}}
{!! $data->other_url !!} {!! $data->other_url !!}
...@@ -65,7 +59,10 @@ ...@@ -65,7 +59,10 @@
</ul> </ul>
</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))
{{ $list->appends(['type' => $type,'id'=>$data->id])->render() }} {{ $list->appends(['type' => $type,'id'=>$data->id])->render() }}
@endif
</div> </div>
</div> </div>
</div> </div>
......
...@@ -182,13 +182,12 @@ ...@@ -182,13 +182,12 @@
</ul> </ul>
</div> </div>
<div class="culture-more"> <div class="culture-more">
<a href="{{ route('download') }}">
@if($language_type == 1) @if($language_type == 1)
More <a href="{{ route('endownload') }}">More</a>
@else @else
更多 <a href="{{ route('download') }}">更多</a>
@endif @endif
</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -82,7 +82,12 @@ ...@@ -82,7 +82,12 @@
<li class="swiper-slide2" style="width: 175.5px; height: 138px;"> <li class="swiper-slide2" style="width: 175.5px; height: 138px;">
<a href="javascript:;" target=""> <a href="javascript:;" target="">
<img src="{{asset('images/ecbd690b9987aa4f3e09077c99e27d9a.jpg')}}" data-img="{{asset('images/ecbd690b9987aa4f3e09077c99e27d9a.jpg')}} "><!--data-img放大图--> <img src="{{asset('images/ecbd690b9987aa4f3e09077c99e27d9a.jpg')}}" data-img="{{asset('images/ecbd690b9987aa4f3e09077c99e27d9a.jpg')}} "><!--data-img放大图-->
@if($language_type == 1)
<p class="ell1">Fashion group Promo</p>
@else
<p class="ell1">时尚集团宣传片</p> <p class="ell1">时尚集团宣传片</p>
@endif
</a> </a>
<div class="video-url" style="display: none;">{{$audio}}</div> <div class="video-url" style="display: none;">{{$audio}}</div>
</li> </li>
...@@ -90,7 +95,7 @@ ...@@ -90,7 +95,7 @@
@foreach($va as $v) @foreach($va as $v)
<li class="swiper-slide2 swiper-slide-visible swiper-slide-active" style="width: 175.5px; height: 138px;"> <li class="swiper-slide2 swiper-slide-visible swiper-slide-active" style="width: 175.5px; height: 138px;">
<a href="javascript:;" target=""> <a href="javascript:;" target="">
<img src="{{asset($v->img_path)}}" data-img="{{asset($v->img_path)}}"><!--data-img放大图--> <img src="{{$v->url}}{{$v->img_path}}" data-img="{{$v->url}}{{$v->img_path}}"><!--data-img放大图-->
<p class="ell1">{{$v->title}}</p> <p class="ell1">{{$v->title}}</p>
</a> </a>
@if($v->script_url) @if($v->script_url)
...@@ -98,12 +103,14 @@ ...@@ -98,12 +103,14 @@
{!! $v->script_url !!} {!! $v->script_url !!}
</div> </div>
@endif @endif
@if($v->other_url) @if($v->other_url)
<div class="video-url" style="display: none;"> <div class="video-url" style="display: none;">
{!! $v->other_url !!} {!! $v->other_url !!}
</div> </div>
@endif @endif
</li>@endforeach </li>
@endforeach
@endforeach @endforeach
</ul> </ul>
...@@ -112,7 +119,7 @@ ...@@ -112,7 +119,7 @@
<div class="page5-more"> <div class="page5-more">
@if($language_type == 1) @if($language_type == 1)
<a href="{{route('audio')}}"><em class="icon-video"></em><i style="font-size: 15px;">More videos</i></a> <a href="{{route('enaudio')}}"><em class="icon-video"></em><i style="font-size: 15px;">More videos</i></a>
@else @else
<a href="{{route('audio')}}"><em class="icon-video"></em><i>更多视频</i></a> <a href="{{route('audio')}}"><em class="icon-video"></em><i>更多视频</i></a>
@endif @endif
...@@ -241,8 +248,8 @@ ...@@ -241,8 +248,8 @@
</div> </div>
</div> </div>
<div class="page9-map swiper-container swiper-free-mode swiper-free-mode"> <div class="page9-map swiper-container swiper-free-mode swiper-free-mode">
<!-- <a href="javascript:void(0);" class="page9-map-prev page9-map-dir" style=""></a> --> <!-- <a href="javascript:void(0);" class="page9-map-prev page9-map-dir" style=""></a>-->
<!-- <a href="javascript:void(0);" class="page9-map-next page9-map-dir"></a> --> <!-- <a href="javascript:void(0);" class="page9-map-next page9-map-dir"></a>-->
<div class="swiper-wrapper " style="width: 2200px; height: 232px;"> <div class="swiper-wrapper " style="width: 2200px; height: 232px;">
<div class="page9-map-info swiper-slide swiper-slide-visible swiper-slide-active"> <div class="page9-map-info swiper-slide swiper-slide-visible swiper-slide-active">
@foreach($events as $va) @foreach($events as $va)
...@@ -260,10 +267,6 @@ ...@@ -260,10 +267,6 @@
</div> </div>
</div> </div>
@endforeach @endforeach
</div> </div>
</div> </div>
</div> </div>
......
...@@ -129,16 +129,15 @@ ...@@ -129,16 +129,15 @@
<div class="news-info"> <div class="news-info">
<h1 class="ell1">{{$v->title}}</h1> <h1 class="ell1">{{$v->title}}</h1>
<p></p> <p></p>
<p class="p-img"><img src="{{$news_center2->url}}{{$v->img_path}}"></p> <p class="p-img"><img src="{{$v->url}}{{$v->img_path}}"></p>
</div> </div>
<div class="news-more"> <div class="news-more">
<a href="{{route('article',['id'=>$v->id,'type'=>2])}}">
@if($language_type == 1) @if($language_type == 1)
Continue reading >> <a href="{{route('enarticle',['id'=>$v->id,'type'=>2])}}">Continue reading >></a>
@else @else
继续阅读 >> <a href="{{route('article',['id'=>$v->id,'type'=>2])}}">继续阅读 >></a>
@endif @endif
</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -146,22 +145,32 @@ ...@@ -146,22 +145,32 @@
<div class="news-item2-r"> <div class="news-item2-r">
<div class="news-check"> <div class="news-check">
<a href="{{route("article_list",['type'=>2])}}">
@if($language_type == 1) @if($language_type == 1)
View all <a href="{{route("enarticle_list",['type'=>2])}}"> View all</a>
@else @else
查看全部>> <a href="{{route("article_list",['type'=>2])}}"> 查看全部>></a>
@endif @endif
</a>
</div> </div>
<div class="news-item2-r-b"> <div class="news-item2-r-b">
<ul> <ul>
@foreach($group_news as $va) @foreach($group_news as $va)
<li><a href="{{route('article',['id'=>$va->id])}}"> <li>
@if($language_type == 1)
<a href="{{route('enarticle',['id'=>$va->id])}}">
<span>{{date('Y-m-d',$va->release_time)}}</span>
<h1 class="ell1">{{$va->title}}</h1>
<p></p>
</a>
@else
<a href="{{route('article',['id'=>$va->id])}}">
<span>{{date('Y-m-d',$va->release_time)}}</span> <span>{{date('Y-m-d',$va->release_time)}}</span>
<h1 class="ell1">{{$va->title}}</h1> <h1 class="ell1">{{$va->title}}</h1>
<p></p> <p></p>
</a></li> </a>
@endif
</li>
@endforeach @endforeach
</ul> </ul>
</div> </div>
...@@ -197,35 +206,42 @@ ...@@ -197,35 +206,42 @@
<p class="p-img"><img src="{{$news_center2->url}}{{$v->img_path}}"></p> <p class="p-img"><img src="{{$news_center2->url}}{{$v->img_path}}"></p>
</div> </div>
<div class="news-more"> <div class="news-more">
<a href="{{route('article',['id'=>$v->id,'type'=>$v->type])}}">
@if($language_type == 1) @if($language_type == 1)
Continue reading >> <a href="{{route('enarticle',['id'=>$v->id,'type'=>$v->type])}}">Continue reading >></a>
@else @else
继续阅读 >> <a href="{{route('article',['id'=>$v->id,'type'=>$v->type])}}">继续阅读 >></a>
@endif @endif
</a>
</div> </div>
</div> </div>
</div> </div>
@endforeach @endforeach
<div class="news-item2-r"> <div class="news-item2-r">
<div class="news-check"> <div class="news-check">
<a href="{{route("article_list",['type'=>3])}}">
@if($language_type == 1) @if($language_type == 1)
View all <a href="{{route("enarticle_list",['type'=>3])}}">View all>></a>
@else @else
查看全部>> <a href="{{route("article_list",['type'=>3])}}">查看全部>></a>
@endif @endif
</a>
</div> </div>
<div class="news-item2-r-b"> <div class="news-item2-r-b">
<ul> <ul>
@foreach($item_trends2 as $va) @foreach($item_trends2 as $va)
<li><a href="{{route('article',['id'=>$va->id,'type'=>$va->type])}}"> <li>
@if($language_type == 1)
<a href="{{route('enarticle',['id'=>$va->id,'type'=>$va->type])}}">
<span>{{date('Y-m-d',$va->release_time)}}</span>
<h1 class="ell1">{{$va->title}}</h1>
<p>{{$va->introduce}}</p>
</a>
@else
<a href="{{route('article',['id'=>$va->id,'type'=>$va->type])}}">
<span>{{date('Y-m-d',$va->release_time)}}</span> <span>{{date('Y-m-d',$va->release_time)}}</span>
<h1 class="ell1">{{$va->title}}</h1> <h1 class="ell1">{{$va->title}}</h1>
<p>{{$va->introduce}}</p> <p>{{$va->introduce}}</p>
</a></li> </a>
@endif
</li>
@endforeach @endforeach
</ul> </ul>
</div> </div>
......
...@@ -83,7 +83,7 @@ Route::any('/news/articel_list','Index\ArticleController@article_list')->name('a ...@@ -83,7 +83,7 @@ Route::any('/news/articel_list','Index\ArticleController@article_list')->name('a
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');
Route::get('/audio','Index\AudioController@index')->name('audio');//视频中心 Route::get('/audio','Index\AudioController@index')->name('audio');//视频中心
Route::get('en/audio','Index\AudioController@index')->name('audio');//视频中心 Route::get('en/audio','Index\AudioController@index')->name('enaudio');//视频中心
Route::get('/audio/play','Index\AudioController@play')->name('play_audio');//视频中心播放页 Route::get('/audio/play','Index\AudioController@play')->name('play_audio');//视频中心播放页
Route::get('en/audio/play','Index\AudioController@play')->name('enplay_audio');//视频中心播放页 Route::get('en/audio/play','Index\AudioController@play')->name('enplay_audio');//视频中心播放页
......
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