6
0
Fork 0

文章详细页添加分享

develop
panliang 2023-02-22 15:46:36 +08:00
parent e902f14d23
commit 87ffa823de
1 changed files with 24 additions and 0 deletions

View File

@ -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