Feat(专题页):1、第一张图片点击领取优惠券;2、增加转发标题和图片
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getCouponReceive } from '@/api/user'
|
||||
export const themeTemplateMixins = {
|
||||
props: {
|
||||
topImage: {
|
||||
@@ -12,6 +13,24 @@ export const themeTemplateMixins = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
topImageClick() {
|
||||
if (this.templateProperties.page1CouponEnable === 1 && this.templateProperties.page1CouponId) {
|
||||
getCouponReceive(this.templateProperties.page1CouponId).then(res => {
|
||||
if (res.status === 200) {
|
||||
uni.showToast({
|
||||
title: '领取成功',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err.data.msg + '',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
itemClick(item) {
|
||||
if (!item.available) return
|
||||
this.$emit('view', item)
|
||||
|
||||
Reference in New Issue
Block a user