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
bc79a827
Commit
bc79a827
authored
Nov 22, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
31d0fffb
60ce1290
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 @
bc79a827
...
@@ -56,7 +56,7 @@ AppAsset::addCss($this, '@web/assets/css/course_publish.css');
...
@@ -56,7 +56,7 @@ AppAsset::addCss($this, '@web/assets/css/course_publish.css');
<?php
}
?>
<?php
}
?>
</div>
</div>
</div>
</div>
<component
:is=
"dynamicVideo"
uptoken=
"
<?=
$videoToken
?>
"
ref=
"video"
></component>
<component
:is=
"dynamicVideo"
uptoken=
"
<?=
$videoToken
?>
"
></component>
</div>
</div>
<div
class=
"cls-part"
>
<div
class=
"cls-part"
>
...
...
src/frontend/web/js/components/uploader/video-upload.vue
View file @
bc79a827
...
@@ -27,6 +27,7 @@ import filesize from "file-size";
...
@@ -27,6 +27,7 @@ import filesize from "file-size";
import
layer
from
"layer-js"
;
import
layer
from
"layer-js"
;
import
str
from
"../../utils/string"
;
import
str
from
"../../utils/string"
;
import
qiniu
from
"../../utils/qiniu"
;
import
qiniu
from
"../../utils/qiniu"
;
import
Bus
from
"../bus"
;
var
uploader
;
var
uploader
;
...
@@ -50,7 +51,9 @@ export default {
...
@@ -50,7 +51,9 @@ export default {
this
.
state
=
"ready"
;
this
.
state
=
"ready"
;
uploader
.
refresh
();
uploader
.
refresh
();
//本组件的所有视频上传相关事件都会同时向 Bus 发送
this
.
$emit
(
"video-upload-cancel"
);
this
.
$emit
(
"video-upload-cancel"
);
Bus
.
$emit
(
"video-upload-cancel"
);
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -132,6 +135,7 @@ export default {
...
@@ -132,6 +135,7 @@ export default {
var
response
=
$
.
parseJSON
(
info
.
response
);
var
response
=
$
.
parseJSON
(
info
.
response
);
self
.
$emit
(
"video-uploaded"
,
file
.
name
,
response
);
self
.
$emit
(
"video-uploaded"
,
file
.
name
,
response
);
Bus
.
$emit
(
"video-uploaded"
,
file
.
name
,
response
);
},
},
'Error'
:
function
(
up
,
err
)
{
'Error'
:
function
(
up
,
err
)
{
var
msg
=
""
;
var
msg
=
""
;
...
@@ -160,6 +164,7 @@ export default {
...
@@ -160,6 +164,7 @@ export default {
}
}
self
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
self
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
Bus
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
});
});
uploader
.
init
();
uploader
.
init
();
...
...
src/frontend/web/js/my-course/edit.js
View file @
bc79a827
...
@@ -9,6 +9,7 @@ var richText = require('./rich-text');
...
@@ -9,6 +9,7 @@ var richText = require('./rich-text');
var
layer
=
require
(
"layer-js"
);
var
layer
=
require
(
"layer-js"
);
var
str
=
require
(
"../utils/string"
);
var
str
=
require
(
"../utils/string"
);
var
commonPart
=
require
(
'./common-part'
);
var
commonPart
=
require
(
'./common-part'
);
var
Bus
=
require
(
"../components/bus"
);
require
(
'jquery-validation'
);
require
(
'jquery-validation'
);
...
@@ -29,14 +30,6 @@ var vm = new Vue({
...
@@ -29,14 +30,6 @@ var vm = new Vue({
removeVideoClick
:
function
()
{
removeVideoClick
:
function
()
{
this
.
dynamicVideo
=
"videoUpload"
;
this
.
dynamicVideo
=
"videoUpload"
;
this
.
vuid
=
""
;
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
()
{
mounted
:
function
()
{
...
@@ -46,6 +39,14 @@ var vm = new Vue({
...
@@ -46,6 +39,14 @@ var vm = new Vue({
self
.
previewKey
=
data
.
uuid
;
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
form
=
document
.
forms
[
"courseEdit"
];
var
opt
=
commonPart
.
generateValidateOption
(
form
);
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