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
9c34f659
Commit
9c34f659
authored
Sep 09, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间问题
parent
b5c738c5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
18 deletions
+15
-18
audio.vue
src/components/newLesson/audio.vue
+2
-1
evaluate.vue
src/components/newLesson/evaluate.vue
+7
-3
index.vue
src/components/newLesson/index.vue
+4
-10
video.vue
src/components/newLesson/video.vue
+2
-4
No files found.
src/components/newLesson/audio.vue
View file @
9c34f659
...
...
@@ -763,10 +763,11 @@
let
query
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"classQuery"
));
let
nowTime
=
Date
.
parse
(
new
Date
());
let
lookTime
=
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
;
let
json
=
{
page_type
:
0
,
page_id
:
5
,
stay_time
:
lookTime
stay_time
:
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
};
subUserLessonApi
(
query
.
elementId
,
...
...
src/components/newLesson/evaluate.vue
View file @
9c34f659
...
...
@@ -107,16 +107,20 @@
* @param periods_id
* @param page_id
*/
async
subUserLessonFn
(
elementId
,
category_id
,
periods_id
,
page_id
)
{
subUserLessonFn
(
elementId
,
category_id
,
periods_id
,
page_id
)
{
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
:
page_id
,
stay_time
:
lookTime
stay_time
:
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
};
console
.
log
(
json
)
subUserLessonApi
(
elementId
,
category_id
,
periods_id
,
json
).
then
((
res
)
=>
{
this
.
totalStarNum
=
res
.
total_star_num
})
// const subUserLessonDatac = await subUserLessonApi(elementId, category_id, periods_id, json)
// this.totalStarNum = subUserLessonDatac.total_star_num
},
...
...
src/components/newLesson/index.vue
View file @
9c34f659
...
...
@@ -98,14 +98,7 @@
sharePage
},
mounted
()
{
// 直接跳转和提交跳转
if
(
this
.
$route
.
params
.
evaluate
===
1
||
this
.
$route
.
params
.
evaluate
===
3
)
{
this
.
nowShow
=
parseInt
(
this
.
$route
.
params
.
type
)
this
.
type
=
parseInt
(
this
.
$route
.
params
.
type
)
this
.
changeTitle
(
parseInt
(
this
.
$route
.
params
.
type
))
}
else
{
this
.
initPage
();
}
},
/**
* 离开页面前关闭--这个记录看课时长
...
...
@@ -218,7 +211,7 @@
let
json
=
{
page_type
:
0
,
page_id
:
this
.
page_id
,
stay_time
:
lookTime
stay_time
:
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
};
subUserLessonApi
(
this
.
elementId
,
...
...
@@ -230,6 +223,7 @@
lessonDetail
.
nowTime
=
nowTime
;
lessonDetail
.
star_num
=
res
.
total_star_num
;
localStorage
.
setItem
(
"lessonDetail"
,
JSON
.
stringify
(
lessonDetail
));
let
query
=
{
periods_id
:
this
.
periods_id
,
course_type
:
this
.
course_type
,
...
...
src/components/newLesson/video.vue
View file @
9c34f659
...
...
@@ -197,8 +197,6 @@
this
.
videoWidth
=
Number
(
document
.
documentElement
.
clientWidth
)
/
3.8
;
},
mounted
()
{
if
(
this
.
$route
.
params
.
evaluate
===
1
)
this
.
finishStudy
()
this
.
changeAge
(
this
.
contentData
.
age
);
let
that
=
this
;
// console.log(document.documentElement.clientWidth)
...
...
@@ -325,7 +323,6 @@
closeShare
()
{
// this.$route = {}
this
.
share_show
=
false
;
console
.
log
(
this
.
$route
)
},
finishStudy
()
{
if
(
this
.
$refs
.
videoDom
)
{
...
...
@@ -336,10 +333,11 @@
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
stay_time
:
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
};
// 提交看课数据 记录看课时长
subUserLessonApi
(
...
...
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