Commit 6728c351 authored by 章建武's avatar 章建武

dep

parent 71564a40
......@@ -56,18 +56,16 @@ class VideoController extends Controller
}
//处理视频
$file_avatar = $attachment_avatar->upload('video_url');
$video_url = $attachment_avatar->upload('video_url');
if ($file_avatar) {
$param['video_url'] = $file_avatar->url;
if ($video_url) {
$param['video_url'] = $video_url->url;
} else {
return error($attachment_avatar->getError());
}
if($param['script_url']){
$iframe = '<iframe frameborder="0" width="100%" height="600" src="" '.$param['script_url']."".'" allowfullscreen></iframe>';
$param['script_url'] = $iframe;
}else{
if ($video_url) {
$param['video_url'] = $video_url->url;
$iframe = '<iframe frameborder="0" width="100%" height="600" src=" '.$param['url'].$param['video_url']."".'" allowfullscreen></iframe>' ;
$param['script_url'] = $iframe;
}
......
......@@ -2,6 +2,10 @@
{block name='content'}
{include file='public/content_header' /}
<section class="content">
<style>
iframe{
width:520px;height: 300px;}
</style>
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
......@@ -84,10 +88,13 @@
<!--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">
{if isset($data.script_url)}
{:html_entity_decode($data.script_url)}
{/if}
<input id="file" name="video_url" placeholder="请选择视频" {if
isset($data.script_url)}data-initial-preview="{$data.video_url}" {/if} type="file" >
</div>
......
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