Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
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
new-sing
h5-base
Commits
073d1181
Commit
073d1181
authored
Jan 04, 2019
by
wangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
星星系统
parent
4100783e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
172 additions
and
10 deletions
+172
-10
shareBg.png
src/assets/newLesson/shareBg.png
+0
-0
shareConBG.png
src/assets/newLesson/shareConBG.png
+0
-0
shareTitle.png
src/assets/newLesson/shareTitle.png
+0
-0
index.vue
src/components/map/index.vue
+1
-0
index.vue
src/components/newLesson/index.vue
+14
-7
share.vue
src/components/newLesson/share.vue
+133
-0
video.vue
src/components/newLesson/video.vue
+24
-3
No files found.
src/assets/newLesson/shareBg.png
0 → 100644
View file @
073d1181
2.23 KB
src/assets/newLesson/shareConBG.png
0 → 100644
View file @
073d1181
55.9 KB
src/assets/newLesson/shareTitle.png
0 → 100644
View file @
073d1181
3.47 KB
src/components/map/index.vue
View file @
073d1181
...
...
@@ -315,6 +315,7 @@
course_type
:
this
.
$route
.
query
.
course_type
,
parent_category_id
:
this
.
parent_category_id
,
};
this
.
thisLesson
.
nowTime
=
Date
.
parse
(
new
Date
());
localStorage
.
setItem
(
'lessonDetail'
,
JSON
.
stringify
(
this
.
thisLesson
));
this
.
$router
.
push
({
name
:
'newLesson'
,
query
:
query
})
}
else
{
...
...
src/components/newLesson/index.vue
View file @
073d1181
...
...
@@ -59,19 +59,21 @@
},
mounted
(){
this
.
initPage
();
this
.
timeInterval
=
setInterval
(()
=>
{
this
.
stillTime
++
;
},
1000
)
},
methods
:{
backList
(){
let
lessonDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
'lessonDetail'
));
let
nowTime
=
Date
.
parse
(
new
Date
());
let
lookTime
=
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
;
let
json
=
{
page_type
:
0
,
page_id
:
this
.
page_id
,
stay_time
:
this
.
still
Time
,
stay_time
:
look
Time
,
};
subUserLessonApi
(
this
.
$route
.
query
.
elementId
,
this
.
$route
.
query
.
category_id
,
this
.
$route
.
query
.
periods_id
,
json
).
then
(
res
=>
{
clearInterval
(
this
.
timeInterval
);
lessonDetail
.
total_watch_time
=
res
;
lessonDetail
.
nowTime
=
nowTime
;
localStorage
.
setItem
(
'lessonDetail'
,
JSON
.
stringify
(
lessonDetail
));
});
let
query
=
{
periods_id
:
this
.
$route
.
query
.
periods_id
,
...
...
@@ -83,13 +85,18 @@
},
changeTitle
(
type
){
this
.
nowShow
=
type
;
let
lessonDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
'lessonDetail'
));
let
nowTime
=
Date
.
parse
(
new
Date
());
let
lookTime
=
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
;
let
json
=
{
page_type
:
0
,
page_id
:
this
.
page_id
,
stay_time
:
this
.
still
Time
,
stay_time
:
look
Time
,
};
subUserLessonApi
(
this
.
$route
.
query
.
elementId
,
this
.
$route
.
query
.
category_id
,
this
.
$route
.
query
.
periods_id
,
json
).
then
(
res
=>
{
this
.
stillTime
=
0
;
lessonDetail
.
total_watch_time
=
res
;
lessonDetail
.
nowTime
=
nowTime
;
localStorage
.
setItem
(
'lessonDetail'
,
JSON
.
stringify
(
lessonDetail
));
});
switch
(
type
)
{
case
1
:
...
...
src/components/newLesson/share.vue
0 → 100644
View file @
073d1181
<
template
>
<div
class=
"share-page"
>
<div
class=
"share-block"
>
<div
class=
"bg-title"
:style=
"
{backgroundImage:`url('${shareBg}')`}">
</div>
<div
class=
"bg-desc"
>
</div>
<div
class=
"content"
:style=
"
{backgroundImage:`url('${shareConBg}')`}">
<div
class=
"main-content"
>
<div
class=
"head-block"
>
<img
src=
"http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKY2qKktZffhlfqtXG1XcxFsGMm9Id63PnwhKH1p40ibDH2IGusbibnib4gg2RgUyLz21BsEzR7SyqDg/132"
/>
</div>
<div
class=
"content-title"
:style=
"
{backgroundImage:`url('${shareTitle}')`}">
</div>
<div>
</div>
</div>
<div
class=
"main-content-desc"
>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
shareBg
from
'../../assets/newLesson/shareBg.png'
import
shareConBg
from
'../../assets/newLesson/shareConBg.png'
import
shareTitle
from
'../../assets/newLesson/shareTitle.png'
export
default
{
name
:
"share"
,
data
(){
return
{
shareBg
:
shareBg
,
shareConBg
:
shareConBg
,
shareTitle
:
shareTitle
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.share-page{
position: absolute;
background: #EEEEEE;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10;
.share-block{
position: absolute;
border-radius: 8*@toVw;
top: 20*@toVw;
left: 20*@toVw;
right: 20*@toVw;
bottom: 20*@toVw;
.bg-title{
position: absolute;
top: 0;
left: 0;
right: 0;
height: 60*@toVw;
background-size: 100% 100%;
z-index: -1;
}
.bg-desc{
position: absolute;
top: 58*@toVw;
left: 0;
right: 0;
bottom: 0;
background: white;
z-index: -1;
border-radius: 0 0 8*@toVw 8*@toVw;
}
.content{
width: 291*@toVw;
height: (422-53)*@toVw;
padding-top: 53*@toVw;
margin-top: 20*@toVw;
background-size: 100% 100%;
}
.main-content{
width: 261*@toVw;
height: 263*@toVw;
background: white;
border-radius: 8*@toVw;
position: relative;
.head-block{
position: absolute;
height: 85*@toVw;
width: 85*@toVw;
text-align: center;
border-radius: 200*@toVw;
left: 50%;
margin-left: -40*@toVw;
background: white;
top: -38*@toVw;
img{
border-radius: 200*@toVw;
width: 64*@toVw;
margin-top: 7*@toVw;
height: 64*@toVw;
}
}
.content-title{
width: 225*@toVw;
height: 54*@toVw;
line-height: 50*@toVw;
color: white;
font-size: 20*@toVw;
text-align: center;
background-size: 100% 100%;
position: absolute;
top: 25*@toVw;
left: 50%;
margin-left: -112.5*@toVw;
}
}
.main-content-desc{
width: 261*@toVw;
height: 82*@toVw;
background: white;
border-radius: 8*@toVw;
margin-top: 10*@toVw;
}
}
}
</
style
>
src/components/newLesson/video.vue
View file @
073d1181
...
...
@@ -44,6 +44,7 @@
</div>
</mt-popup>
<guide-block/>
<share-page/>
</div>
</
template
>
...
...
@@ -52,19 +53,22 @@
import
luolacoming
from
'../../assets/newLesson/luoLacoming.png'
import
luolalaila
from
'../../assets/newLesson/luolalaila.png'
import
guideBlock
from
'../guide/video'
import
{
subUserLessonApi
}
from
"../../service/api"
;
import
tapToAudio
from
'../../assets/tapToAudio.png'
import
finishStuat
from
'../../assets/newLesson/finishStudy.png'
import
noFinishDia
from
'./nofinishdia'
import
sharePage
from
'./share'
export
default
{
name
:
"play"
,
components
:{
guideBlock
,
noFinishDia
noFinishDia
,
sharePage
},
data
(){
return
{
finishStuat
:
finishStuat
,
popupVisible
:
tru
e
,
popupVisible
:
fals
e
,
ageShow
:
false
,
showObj
:{
video
:[],
...
...
@@ -87,7 +91,24 @@
},
methods
:{
finishStudy
(){
this
.
popupVisible
=
true
let
lessonDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
'lessonDetail'
));
let
nowTime
=
Date
.
parse
(
new
Date
());
let
lookTime
=
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
;
let
json
=
{
page_type
:
0
,
page_id
:
5
,
stay_time
:
lookTime
,
};
subUserLessonApi
(
this
.
$route
.
query
.
elementId
,
this
.
$route
.
query
.
category_id
,
this
.
$route
.
query
.
periods_id
,
json
).
then
(
res
=>
{
lessonDetail
.
total_watch_time
=
res
;
lessonDetail
.
nowTime
=
nowTime
;
localStorage
.
setItem
(
'lessonDetail'
,
JSON
.
stringify
(
lessonDetail
));
});
if
((
Number
(
lookTime
)
+
Number
(
lessonDetail
.
total_watch_time
))
/
60
<
7
){
this
.
popupVisible
=
true
}
else
{
}
},
videoEnd
(
event
){
event
.
srcElement
.
play
()
...
...
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