Commit b5c738c5 authored by IvyXia123's avatar IvyXia123

时间修改

parent aae384cb
......@@ -105,14 +105,20 @@
* @param elementId
* @param category_id
* @param periods_id
* @param page_id
*/
async subUserLessonFn(elementId, category_id, periods_id, page_id) {
let nowTime = Date.parse(new Date()), // 时间
lessonDetail = JSON.parse(localStorage.getItem("lessonDetail")),// 获取延长时间
lookTime = (nowTime - lessonDetail.nowTime) / 1000,
watchLog = { page_type: 0, page_id: page_id, stay_time: lookTime };
const subUserLessonDatac = await subUserLessonApi(elementId, category_id, periods_id, lookTime)
this.totalStarNum = subUserLessonDatac.total_star_num
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
};
console.log(json)
// const subUserLessonDatac = await subUserLessonApi(elementId, category_id, periods_id, json)
// this.totalStarNum = subUserLessonDatac.total_star_num
},
/**
* 提交成长记录
......
......@@ -353,8 +353,7 @@
if (this.nickname.length >= 6) {
this.nickname = this.nickname.slice(0, 4) + "...";
}
this.minute = (this.dataSession.stay_time / 60).toFixed();
// this.minute = (600/60).toFixed()
this.minute = (parseInt(this.dataSession.stay_time) / 60).toFixed();
if (this.minute < 1) {
this.minute = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment