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
b98e673c
Commit
b98e673c
authored
Oct 27, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加视频观看完后提示
parent
e3193e1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
video.vue
src/frontend/web/js/home/components/video.vue
+21
-7
No files found.
src/frontend/web/js/home/components/video.vue
View file @
b98e673c
...
...
@@ -37,17 +37,18 @@
},
methods
:
{
pay
(){
this
.
$dispatch
(
'pay-click'
);
this
.
$dispatch
(
'pay-click'
);
}
},
ready
(){
if
(
this
.
videoInfo
.
isShop
)
{
this
.
showTips
=
false
;
}
else
{
this
.
showTips
=
true
;
}
//不显示视频则不绑定
if
(
this
.
videoInfo
.
freeTime
>
0
)
{
//不显示视频则不绑定
不为没有购买且为不免费
if
(
this
.
videoInfo
.
freeTime
>
0
||
this
.
videoInfo
.
isShop
==
true
)
{
var
self
=
this
;
var
rate
=
9
/
16
;
var
w
=
$
(
'.video-main'
).
width
();
...
...
@@ -70,13 +71,26 @@
var
hVideo
=
wVideo
*
rate
;
$
(
'#my-video-play'
).
css
(
'height'
,
hVideo
);
};
});
myPlayer
.
bigPlayButton
.
on
(
'click'
,
function
()
{
self
.
showTips
=
false
;
});
})
//没购买显示
if
(
this
.
videoInfo
.
isShop
==
false
)
{
myPlayer
.
bigPlayButton
.
on
(
'click'
,
function
()
{
self
.
showTips
=
false
;
});
myPlayer
.
on
(
'ended'
,
function
()
{
layer
.
confirm
(
'试看已结束,购买后查看完整版课程?'
,
{
btn
:
[
'立即购买'
]
//按钮
},
function
()
{
self
.
pay
();
});
});
}
}
}
}
</
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