Feat(抽奖):增加分享
This commit is contained in:
@@ -28,4 +28,11 @@ export function takePrize(lotteryRecordId){
|
|||||||
* */
|
* */
|
||||||
export function getLogs(page = 1, limit = 10) {
|
export function getLogs(page = 1, limit = 10) {
|
||||||
return request.get('/lottery/dice/records',{page,limit})
|
return request.get('/lottery/dice/records',{page,limit})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽奖活动分享
|
||||||
|
* */
|
||||||
|
export function getLotteryShareInfo() {
|
||||||
|
return request.get('/lottery/shareImage')
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDetail, getPrize, takePrize } from '@/api/lottery'
|
import { getDetail, getPrize, takePrize, getLotteryShareInfo } from '@/api/lottery'
|
||||||
import gbroMarquee from '../components/gbro-marquee/marquee.vue'
|
import gbroMarquee from '../components/gbro-marquee/marquee.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -113,7 +113,8 @@ export default {
|
|||||||
text_color: "#333", //字体颜色
|
text_color: "#333", //字体颜色
|
||||||
back_color: "red", //背景色
|
back_color: "red", //背景色
|
||||||
},
|
},
|
||||||
imgData: []
|
imgData: [],
|
||||||
|
shareAppImg: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -126,6 +127,13 @@ export default {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: '探寻有趣有味的生活方式',
|
||||||
|
path: '/pkg-video/views/lottery',
|
||||||
|
imageUrl: this.shareAppImg
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
getDetail().then(res => {
|
getDetail().then(res => {
|
||||||
@@ -138,6 +146,9 @@ export default {
|
|||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
getLotteryShareInfo().then(res => {
|
||||||
|
this.shareAppImg = res.data || ''
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
|||||||
Reference in New Issue
Block a user