feat: 详情页增加优惠券

This commit is contained in:
2026-09-05 13:19:37 +08:00
parent 07a7a0f516
commit 163f433970

View File

@@ -102,6 +102,26 @@
<view v-else class="flex min-h-0 flex-1 items-center justify-center">
<text class="text-[14px] text-[#808997]">未找到对应内容</text>
</view>
<view
v-if="item"
class="shrink-0 border-t border-[#edf0f2] bg-white px-[16px] pb-[calc(env(safe-area-inset-bottom)+10px)] pt-[10px] shadow-[0_-4px_16px_rgba(23,32,51,0.06)]"
>
<view class="flex items-center">
<view class="flex min-w-0 flex-1 items-center">
<view class="flex h-[38px] w-[38px] shrink-0 items-center justify-center rounded-full bg-[#fff1e8]">
<uni-icons type="gift" size="20" color="#f26b32" />
</view>
<text class="ml-[10px] text-[16px] font-semibold text-[#202733]">优惠券领取</text>
</view>
<view
class="flex h-[36px] shrink-0 items-center justify-center rounded-full bg-[#f26b32] px-[18px]"
@click="claimCoupon"
>
<text class="text-[12px] font-medium text-white">立即领取</text>
</view>
</view>
</view>
</view>
</template>
@@ -174,6 +194,13 @@ const makePhoneCall = () => {
uni.makePhoneCall({ phoneNumber: contactText.value });
};
const claimCoupon = () => {
uni.showToast({
title: "领取成功",
icon: "success",
});
};
const openLocation = () => {
if (!canOpenLocation.value) return;
uni.openLocation({