From 87ffa823de0fb2e1f823a86c5e0d7b186ddc344e Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Wed, 22 Feb 2023 15:46:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E8=AF=A6=E7=BB=86=E9=A1=B5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/article_details/article_details.vue | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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