Feat(专题页):1、第一张图片点击领取优惠券;2、增加转发标题和图片

This commit is contained in:
lifizer
2025-07-24 11:22:57 +08:00
parent 3b3d39f460
commit 199912c4da
7 changed files with 127 additions and 8 deletions
+19
View File
@@ -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)