Feat(抽奖):增加分享

This commit is contained in:
lifizer
2024-05-15 14:31:09 +08:00
parent 82a90630e9
commit 2b3c0e4355
2 changed files with 20 additions and 2 deletions
+7
View File
@@ -28,4 +28,11 @@ export function takePrize(lotteryRecordId){
* */
export function getLogs(page = 1, limit = 10) {
return request.get('/lottery/dice/records',{page,limit})
}
/**
* 抽奖活动分享
* */
export function getLotteryShareInfo() {
return request.get('/lottery/shareImage')
}
+13 -2
View File
@@ -80,7 +80,7 @@
</template>
<script>
import { getDetail, getPrize, takePrize } from '@/api/lottery'
import { getDetail, getPrize, takePrize, getLotteryShareInfo } from '@/api/lottery'
import gbroMarquee from '../components/gbro-marquee/marquee.vue'
export default {
@@ -113,7 +113,8 @@ export default {
text_color: "#333", //字体颜色
back_color: "red", //背景色
},
imgData: []
imgData: [],
shareAppImg: ''
}
},
computed: {
@@ -126,6 +127,13 @@ export default {
onLoad() {
this.init()
},
onShareAppMessage() {
return {
title: '探寻有趣有味的生活方式',
path: '/pkg-video/views/lottery',
imageUrl: this.shareAppImg
}
},
methods: {
init() {
getDetail().then(res => {
@@ -138,6 +146,9 @@ export default {
},1000)
}
})
getLotteryShareInfo().then(res => {
this.shareAppImg = res.data || ''
})
},
onSubmit() {