Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
fashion_group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
章建武
fashion_group
Commits
6728c351
Commit
6728c351
authored
May 07, 2020
by
章建武
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dep
parent
71564a40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
VideoController.php
admin/application/admin/controller/VideoController.php
+5
-7
add.html
admin/application/admin/view/video/add.html
+9
-2
No files found.
admin/application/admin/controller/VideoController.php
View file @
6728c351
...
...
@@ -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
;
}
...
...
admin/application/admin/view/video/add.html
View file @
6728c351
...
...
@@ -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,12 +88,15 @@
<!--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"
>
isset
($
data
.
script_url
)}
data-initial-preview=
"{$data.video_url}"
{/
if
}
type=
"file"
>
</div>
</div>
<script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment