完善功能

This commit is contained in:
wangxiaowei
2025-10-25 17:33:08 +08:00
parent 87664ad114
commit 0abb527276
11 changed files with 354 additions and 174 deletions

View File

@ -1,20 +1,20 @@
<template>
<view class="mb-20rpx" @click="onCheck(coupon.id)">
<view class="mb-20rpx" @click="onCheck(coupon.user_coupon_id)">
<view class="coupon h-210rpx flex items-center">
<view class="w-260rpx h-[100%] rounded-l-16rpx rounded-tr-0 rounded-br-0 flex flex-col items-center justify-center" :class="canUse ? 'bg-[#4C9F44]' : 'bg-[#F2F2F2]'">
<view class="flex" :class="canUse ? 'text-[#fff]' : 'text-[#BFC2CC]'">
<view class="text-72rpx leading-100rpx">{{ coupon.amount }}</view>
<view class="text-52rpx leading-100rpx">{{ coupon.coupon_price }}</view>
<view class="text-32rpx leading-44rpx mt-40rpx ml-10rpx"></view>
</view>
<view class="text-26rpx font-400 leading-36rpx text-center" :class="canUse ? 'text-[#fff]' : 'text-[#BFC2CC]'">120元可用</view>
<view class="text-26rpx font-400 leading-36rpx text-center" :class="canUse ? 'text-[#fff]' : 'text-[#BFC2CC]'">{{ coupon.use_price }}元可用</view>
</view>
<view class="bg-[#fff] w-490rpx h-[100%] rounded-r-16rpx rounded-tl-0 rounded-bl-0 flex justify-between items-center">
<view class="ml-30rpx line-1">
<view class="text-34rpx leading-48rpx line-1" :class="canUse ? 'text-[#303133]' : 'text-[#909399]'">茶室优惠</view>
<view class="mt-40rpx text-[#909399] text-24rpx leading-34rpx" :class="canUse ? 'text-[#909399]' : 'text-[#BFC2CC]'">有效期至 2022-08-12</view>
<view class="text-34rpx leading-48rpx line-1" :class="canUse ? 'text-[#303133]' : 'text-[#909399]'">{{ coupon.title }}</view>
<view class="mt-40rpx text-[#909399] text-24rpx leading-34rpx" :class="canUse ? 'text-[#909399]' : 'text-[#BFC2CC]'">有效期至 {{ coupon.effect_time }}</view>
</view>
<view class="h-100% mr-70rpx mt-58rpx" v-if="showChecked">
<wd-radio :value="coupon.id" shape="dot" :disabled="!canUse"></wd-radio>
<wd-radio :value="coupon.user_coupon_id" shape="dot" :disabled="!canUse"></wd-radio>
</view>
</view>
</view>
@ -30,9 +30,11 @@
defineProps<{
coupon: {
id: number
amount: number
limit: number
expire: string
coupon_price: number
use_price: number
title: string
effect_time: string
user_coupon_id: number
}
canUse: boolean
showChecked: boolean