新增优惠券领取按钮
This commit is contained in:
@@ -6,6 +6,19 @@
|
|||||||
优惠券包
|
优惠券包
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="coupon-content">
|
||||||
|
<div class="coupon-item" @click="getCoupon('1')">
|
||||||
|
领满减
|
||||||
|
</div>
|
||||||
|
<div class="coupon-item" @click="getCoupon('2')">
|
||||||
|
领折扣
|
||||||
|
</div>
|
||||||
|
<div class="coupon-item" @click="getCoupon('3')">
|
||||||
|
领抵扣
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -17,7 +30,7 @@ import { ElMessage } from 'element-plus'
|
|||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
const getCoupon = async () => {
|
const getCoupon = async (coupon_id) => {
|
||||||
try {
|
try {
|
||||||
console.log(userStore)
|
console.log(userStore)
|
||||||
const {data} = await api.get(`/coupon/${userStore.user.id}`,{
|
const {data} = await api.get(`/coupon/${userStore.user.id}`,{
|
||||||
@@ -37,7 +50,7 @@ const getCoupon = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getCoupon()
|
// getCoupon()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user