Commit c8594842 authored by jyx's avatar jyx

优化收藏列表变动

parent 2187139f
......@@ -53,8 +53,7 @@ let startReadTime = null; // 开始阅读时间
* 开始阅读计时
*/
function startCountReadTime() {
startReadTime = new Date();
console.log('AAAAAA---startCountReadTime------->')
startReadTime = new Date();
}
/**
* 停止阅读计时
......@@ -79,9 +78,7 @@ function endCountReadTime() {
let dayStart = stringToDate(end.join("-"))
count = endReadTime.getTime() - dayStart.getTime();
}
startReadTime = null;
console.log('AAAAAA---endCountReadTime------->' + count)
startReadTime = null;
setReadTimeCount(count);
}
......@@ -290,7 +287,9 @@ function getBookBeanPackData(callback) {
function getCollects(callback) {
apiPOST({
url: "/book/collectList",
data: {},
data: {
reader: true
},
callback
})
}
......
......@@ -28,7 +28,8 @@
onReady() {
this.initData();
// 监听收藏变动
watchCollectionChange(() => {
watchCollectionChange(() => {
console.log('LLLLLLLLLLLLLLLL')
this.refreshCollect();
}, this);
},
......
......@@ -92,8 +92,7 @@
uni.$emit('goWareHouse')
return
}
gotoBookContentPage(e.detail.data.wechatRecord.wxId, e.detail.id)
gotoBookContentPage(e.detail.data.wechatRecord.wxId, e.detail.data.id)
},
showEditBarR(e) {
this.showEditBar = e
......
This diff is collapsed.
......@@ -54,7 +54,8 @@
},
requestParam: function() {
return {
searchName: this.keyword
searchName: this.keyword,
reader:true
}
}
},
......
......@@ -4,7 +4,8 @@ import {
import {
startCountReadTime,
endCountReadTime
endCountReadTime,
noticeCollectionListChange
} from "@/common/services/index.js"
var novelPlugin = requirePlugin("novel-plugin");
......@@ -22,13 +23,13 @@ const proto = {
this.nm = nm
this.myId = data.id
novelPlugin.setLoggerConfig({
info: true,
debug: true,
log: true,
warn: true,
error: true,
})
// novelPlugin.setLoggerConfig({
// info: true,
// debug: true,
// log: true,
// warn: true,
// error: true,
// })
const customId = nm.getCustomServerParams()
this.getContent(customId).then(res => {
......@@ -54,8 +55,8 @@ const proto = {
//开始阅读书籍时
if (obj.event_id === 'start_read') {
this.nm_report(customId)
// 开始记录阅读时长
this.nm_report(customId)
// 开始记录阅读时长
startCountReadTime()
}
......@@ -68,6 +69,7 @@ const proto = {
this.bookshelfStatus = 0
this.nm_uncollect(customId)
}
noticeCollectionListChange(customId, this.bookshelfStatus)
nm.setBookshelfStatus({
bookshelfStatus: this.bookshelfStatus
})
......
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