|
@@ -62,9 +62,6 @@ Page({
|
|
|
goBackHome: true
|
|
|
})
|
|
|
}
|
|
|
- // wx.setNavigationBarTitle({
|
|
|
- // title: option.title //页面标题为路由参数
|
|
|
- // })
|
|
|
this.uid = wx.getStorageSync('uid');
|
|
|
let stackSize = 1;
|
|
|
if (option.stackSize) {
|
|
@@ -74,7 +71,8 @@ Page({
|
|
|
// title: option.title,
|
|
|
id,
|
|
|
myUid: this.uid,
|
|
|
- stackSize
|
|
|
+ stackSize,
|
|
|
+ option
|
|
|
})
|
|
|
this.getWorks(this.uid, id);
|
|
|
}, (error) => {
|
|
@@ -85,6 +83,24 @@ Page({
|
|
|
return;
|
|
|
});
|
|
|
},
|
|
|
+ addRecord: function(){
|
|
|
+ const data = {
|
|
|
+ "shareTypeEnum": "POSTER",
|
|
|
+ "shareContentEnum": "READ",
|
|
|
+ "productId": this.data.productId
|
|
|
+ }
|
|
|
+ if(this.data.option.shareCard){
|
|
|
+ data.shareTypeEnum = 'LINK'
|
|
|
+ httpRequestApi.shareTagRecord(data).success(res=>{
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(this.data.option.scene){
|
|
|
+ httpRequestApi.shareTagRecord(data).success(res=>{
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
onHide: function () {
|
|
|
// this.data.stackSize >= 2
|
|
|
console.log(this.data.stackSize)
|
|
@@ -132,12 +148,14 @@ Page({
|
|
|
isLike: res.data.data.isLike,
|
|
|
isFans: res.data.data.isFans,
|
|
|
title: works.title
|
|
|
- })
|
|
|
+ });
|
|
|
+ httpRequestApi.userIntoPage('pages/social/works/works','用户作品页面')
|
|
|
httpRequestApi.checkLesson(works.lessonId).success(res => {
|
|
|
const productId = res.data.data[0];
|
|
|
this.setData({
|
|
|
productId
|
|
|
})
|
|
|
+ this.addRecord();
|
|
|
});
|
|
|
// 设置音频路径
|
|
|
this.innerAudioContext = wx.createInnerAudioContext();
|
|
@@ -207,6 +225,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)
|
|
@@ -315,11 +334,28 @@ Page({
|
|
|
},
|
|
|
onShareAppMessage: function () {
|
|
|
console.log(this.data.productId);
|
|
|
-
|
|
|
+ const data = {
|
|
|
+ shareTypeEnum: 'LINK',
|
|
|
+ shareContentEnum: 'READ'
|
|
|
+ }
|
|
|
+ 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`,
|
|
|
+ success: function (res) {
|
|
|
+ // 转发成功
|
|
|
+ const data = {
|
|
|
+ shareTypeEnum: 'LINK',
|
|
|
+ shareContentEnum: 'READ',
|
|
|
+ productId:this.data.productId
|
|
|
+ }
|
|
|
+ httpRequestApi.shareRecord(data).success((res)=>{
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
follow: function () {
|
|
@@ -424,7 +460,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}`
|
|
|
})
|
|
|
},
|
|
|
// 绑定输入框内容
|
|
@@ -441,7 +477,8 @@ Page({
|
|
|
"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({
|