Commit b5c738c5 authored by IvyXia123's avatar IvyXia123

时间修改

parent aae384cb
...@@ -105,14 +105,20 @@ ...@@ -105,14 +105,20 @@
* @param elementId * @param elementId
* @param category_id * @param category_id
* @param periods_id * @param periods_id
* @param page_id
*/ */
async subUserLessonFn(elementId, category_id, periods_id, page_id) { async subUserLessonFn(elementId, category_id, periods_id, page_id) {
let nowTime = Date.parse(new Date()), // 时间 let lessonDetail = JSON.parse(localStorage.getItem("lessonDetail"));
lessonDetail = JSON.parse(localStorage.getItem("lessonDetail")),// 获取延长时间 let nowTime = Date.parse(new Date());
lookTime = (nowTime - lessonDetail.nowTime) / 1000, let lookTime = (nowTime - lessonDetail.nowTime) / 1000;
watchLog = { page_type: 0, page_id: page_id, stay_time: lookTime }; let json = {
const subUserLessonDatac = await subUserLessonApi(elementId, category_id, periods_id, lookTime) page_type: 0,
this.totalStarNum = subUserLessonDatac.total_star_num 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 @@ ...@@ -353,8 +353,7 @@
if (this.nickname.length >= 6) { if (this.nickname.length >= 6) {
this.nickname = this.nickname.slice(0, 4) + "..."; this.nickname = this.nickname.slice(0, 4) + "...";
} }
this.minute = (this.dataSession.stay_time / 60).toFixed(); this.minute = (parseInt(this.dataSession.stay_time) / 60).toFixed();
// this.minute = (600/60).toFixed()
if (this.minute < 1) { if (this.minute < 1) {
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