|
@@ -87,13 +87,23 @@ Page({
|
|
|
},
|
|
|
onHide: function () {
|
|
|
// this.data.stackSize >= 2
|
|
|
- console.log(this.data.stackSize)
|
|
|
+
|
|
|
if (this.innerAudioContext) {
|
|
|
this.innerAudioContext.pause();
|
|
|
}
|
|
|
this.videoCtx = null
|
|
|
},
|
|
|
onUnload: function () {
|
|
|
+ const data = {
|
|
|
+ "title": this.data.title,
|
|
|
+ "lessonId": this.data.classId,
|
|
|
+ "productId": this.data.productId,
|
|
|
+ "playStopTime": this.videoPlayTime || 0,
|
|
|
+ "userReadId": this.data.userReadId
|
|
|
+ }
|
|
|
+ httpRequestApi.playLogReport(data).success(res =>{
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
if (this.innerAudioContext) {
|
|
|
this.innerAudioContext.destroy();
|
|
|
}
|
|
@@ -131,7 +141,8 @@ Page({
|
|
|
classId: works.lessonId,
|
|
|
isLike: res.data.data.isLike,
|
|
|
isFans: res.data.data.isFans,
|
|
|
- title: works.title
|
|
|
+ title: works.title,
|
|
|
+ userReadId: works.id
|
|
|
})
|
|
|
httpRequestApi.checkLesson(works.lessonId).success(res => {
|
|
|
const productId = res.data.data[0];
|
|
@@ -207,6 +218,7 @@ Page({
|
|
|
title: this.data.title,
|
|
|
path: `pages/social/works/works`,
|
|
|
scene: this.data.id,
|
|
|
+ productId:this.data.productId
|
|
|
// tip: this.data.tip,
|
|
|
}
|
|
|
// console.log(data)
|
|
@@ -239,7 +251,9 @@ Page({
|
|
|
});
|
|
|
},
|
|
|
// 视频播放完毕销毁录音
|
|
|
- videoEnd: function () {
|
|
|
+ videoEnd: function (e) {
|
|
|
+ console.log(e)
|
|
|
+
|
|
|
this.innerAudioContext.stop();
|
|
|
},
|
|
|
videoPause: function () {
|
|
@@ -262,6 +276,7 @@ Page({
|
|
|
videoTimeupdate: function (e) {
|
|
|
console.log('视频播放进度发生变化')
|
|
|
console.log('视频当前时长', e.detail.currentTime);
|
|
|
+ this.videoPlayTime = e.detail.currentTime
|
|
|
console.log('音频当前时长', this.innerAudioContext.currentTime)
|
|
|
if (e.detail.currentTime - this.innerAudioContext.currentTime >= 1) {
|
|
|
this.innerAudioContext.seek(e.detail.currentTime - 0.1);
|
|
@@ -315,11 +330,18 @@ Page({
|
|
|
},
|
|
|
onShareAppMessage: function () {
|
|
|
console.log(this.data.productId);
|
|
|
-
|
|
|
+ const data = {
|
|
|
+ shareTypeEnum: 'LINK',
|
|
|
+ shareContentEnum: 'READ',
|
|
|
+ productId: this.data.productId
|
|
|
+ }
|
|
|
+ httpRequestApi.shareRecord(data).success((res) => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
return {
|
|
|
title: '一样的课文,不一样的味道!我的配音表演已开始,求各位大咖围观、点评!',
|
|
|
path: `pages/social/works/works?id=${this.data.id}&title=${this.data.title}&shareCard=true`,
|
|
|
- imageUrl: `https://efunbox.lingjiao.cn/reader/resource/share/read_${this.data.productId}.jpg`
|
|
|
+ imageUrl: `https://efunbox.lingjiao.cn/reader/resource/share/read_${this.data.productId}.jpg`,
|
|
|
}
|
|
|
},
|
|
|
follow: function () {
|
|
@@ -424,7 +446,7 @@ Page({
|
|
|
let id = e.currentTarget.dataset.id;
|
|
|
// let count = e.currentTarget.dataset.count;
|
|
|
wx.navigateTo({
|
|
|
- url: `../../social/replyDetail/replyDetail?id=${id}`
|
|
|
+ url: `../../social/replyDetail/replyDetail?id=${id}&productId=${this.data.productId}`
|
|
|
})
|
|
|
},
|
|
|
// 绑定输入框内容
|
|
@@ -435,13 +457,15 @@ Page({
|
|
|
},
|
|
|
// 发布回复
|
|
|
sendHandler: function () {
|
|
|
+ console.log(this.data.productId)
|
|
|
if (this.data.inputValue !== '') {
|
|
|
// let uid = wx.getStorageSync('uid');
|
|
|
let data = {
|
|
|
"columnId": this.data.id,
|
|
|
colunmNames: 'what',
|
|
|
// "detailDesc": encodeURI(this.data.inputValue)
|
|
|
- "detailDesc": this.data.inputValue
|
|
|
+ "detailDesc": this.data.inputValue,
|
|
|
+ productId: this.data.productId
|
|
|
}
|
|
|
httpRequestApi.postReply(this.uid, data).success(res => {
|
|
|
this.setData({
|
|
@@ -480,7 +504,8 @@ Page({
|
|
|
replySB: function () {
|
|
|
const data = {
|
|
|
postsId: this.data.replySBId,
|
|
|
- content: this.data.inputSBValue
|
|
|
+ content: this.data.inputSBValue,
|
|
|
+ productId: this.data.productId
|
|
|
}
|
|
|
httpRequestApi.postReplyComment(this.uid, data).success(res => {
|
|
|
const replyWho = this.data.replyList[this.data.replyIndex];
|