Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
852a3390
Commit
852a3390
authored
Nov 22, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频编辑页面事件修复
parent
3f10f806
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
edit.php
src/frontend/views/my-course/edit.php
+1
-1
video-upload.vue
src/frontend/web/js/components/uploader/video-upload.vue
+5
-0
edit.js
src/frontend/web/js/my-course/edit.js
+9
-8
No files found.
src/frontend/views/my-course/edit.php
View file @
852a3390
...
...
@@ -56,7 +56,7 @@ AppAsset::addCss($this, '@web/assets/css/course_publish.css');
<?php
}
?>
</div>
</div>
<component
:is=
"dynamicVideo"
uptoken=
"
<?=
$videoToken
?>
"
ref=
"video"
></component>
<component
:is=
"dynamicVideo"
uptoken=
"
<?=
$videoToken
?>
"
></component>
</div>
<div
class=
"cls-part"
>
...
...
src/frontend/web/js/components/uploader/video-upload.vue
View file @
852a3390
...
...
@@ -27,6 +27,7 @@ import filesize from "file-size";
import
layer
from
"layer-js"
;
import
str
from
"../../utils/string"
;
import
qiniu
from
"../../utils/qiniu"
;
import
Bus
from
"../bus"
;
var
uploader
;
...
...
@@ -50,7 +51,9 @@ export default {
this
.
state
=
"ready"
;
uploader
.
refresh
();
//本组件的所有视频上传相关事件都会同时向 Bus 发送
this
.
$emit
(
"video-upload-cancel"
);
Bus
.
$emit
(
"video-upload-cancel"
);
}
},
mounted
()
{
...
...
@@ -132,6 +135,7 @@ export default {
var
response
=
$
.
parseJSON
(
info
.
response
);
self
.
$emit
(
"video-uploaded"
,
file
.
name
,
response
);
Bus
.
$emit
(
"video-uploaded"
,
file
.
name
,
response
);
},
'Error'
:
function
(
up
,
err
)
{
var
msg
=
""
;
...
...
@@ -160,6 +164,7 @@ export default {
}
self
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
Bus
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
});
uploader
.
init
();
...
...
src/frontend/web/js/my-course/edit.js
View file @
852a3390
...
...
@@ -9,6 +9,7 @@ var richText = require('./rich-text');
var
layer
=
require
(
"layer-js"
);
var
str
=
require
(
"../utils/string"
);
var
commonPart
=
require
(
'./common-part'
);
var
Bus
=
require
(
"../components/bus"
);
require
(
'jquery-validation'
);
...
...
@@ -29,14 +30,6 @@ var vm = new Vue({
removeVideoClick
:
function
()
{
this
.
dynamicVideo
=
"videoUpload"
;
this
.
vuid
=
""
;
this
.
$refs
.
video
.
$on
(
"video-uploaded"
,
function
(
name
,
data
)
{
self
.
vuid
=
data
.
uuid
;
});
this
.
$refs
.
video
.
$on
(
"video-upload-cancel"
,
function
()
{
self
.
vuid
=
"@orig"
;
});
}
},
mounted
:
function
()
{
...
...
@@ -46,6 +39,14 @@ var vm = new Vue({
self
.
previewKey
=
data
.
uuid
;
});
Bus
.
$on
(
"video-uploaded"
,
function
(
name
,
data
)
{
self
.
vuid
=
data
.
uuid
;
});
Bus
.
$on
(
"video-upload-cancel"
,
function
()
{
self
.
vuid
=
"@orig"
;
});
var
form
=
document
.
forms
[
"courseEdit"
];
var
opt
=
commonPart
.
generateValidateOption
(
form
);
...
...
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