Rorschach 4 years atrás
parent
commit
53a933f245
1 changed files with 6 additions and 4 deletions
  1. 6 4
      pages/reading/reading.js

+ 6 - 4
pages/reading/reading.js

@@ -67,6 +67,7 @@ Page({
                 exampleId: res.data.data.userRead.exampleId,
                 summary: res.data.data.userRead.summary,
                 coverImg: res.data.data.userRead.coverImg,
+                shareImg: res.data.data.userRead.shareImg,
             })
             this.getReadInfo(id)
             httpRequestApi.userIntoPage('pages/reading/reading', '朗读页面').success((res) => {
@@ -560,7 +561,8 @@ Page({
             "productId": this.data.productId,
             "grade": this.data.grade,
             "exampleId": this.data.exampleId,
-            "coverImg": this.data.coverImg
+            "coverImg": this.data.coverImg,
+            "shareImg": this.data.shareImg
         };
         httpRequestApi.postWork(data).success(res => {
             wx.hideLoading({
@@ -644,7 +646,7 @@ Page({
                 temp.videoShow = false;
                 temp.grade = item.userRead.grade;
                 temp.type = item.userRead.type;
-
+                temp.shareImg = item.userRead.shareImg;
                 // recommendWorks.push(temp);
                 // that.data.hotData.hotWorks.push(temp);
                 this.data.videoList.push(temp);
@@ -701,7 +703,7 @@ Page({
             return {
                 title: '请欣赏我的课文朗读作品,点赞+评论。',
                 path: `/pages/index/index?readId=${this.data.shareId}`,
-                imageUrl: '../../static/index/share_icon.png'
+                imageUrl: this.data.shareImg
 
             }
         } else {
@@ -720,7 +722,7 @@ Page({
         this.setData({
             shareTitle: e.detail.currentTarget.dataset.title,
             shareId: e.detail.currentTarget.dataset.id,
-            shareImg: e.detail.currentTarget.dataset.img
+            shareImg: e.detail.currentTarget.dataset.shareimg
         })
     },
     onPlay: function (e) {