diff --git a/src/pages/article_details/article_details.vue b/src/pages/article_details/article_details.vue index 5899a5b..4053663 100644 --- a/src/pages/article_details/article_details.vue +++ b/src/pages/article_details/article_details.vue @@ -61,6 +61,30 @@ onReady() { this.audioCtx = uni.createAudioContext('myAudio') }, + onShareAppMessage() { + let img = '' + if (this.info.media_type == 0) { + img = this.info.cover + } else if (this.info.media_type == 1) { + img = this.swiperList[0] + } + return { + title: this.info.title, + imageUrl: img + } + }, + onShareTimeline() { + let img = '' + if (this.info.media_type == 0) { + img = this.info.cover + } else if (this.info.media_type == 1) { + img = this.swiperList[0] + } + return { + title: this.info.title, + imageUrl: img + } + }, methods: { audioClick(){ this.isPlaying=!this.isPlaying