refactor(礼品卡): 优化礼品卡相关功能和界面
- 修改 API 基础 URL以适应开发环境 - 移除未使用的 StoreCell 组件- 在 ShopGift 模型中添加核销时间字段 -调整 GiftCard 组件样式和布局 - 更新 goodsDetail 页面中的规格选择逻辑 - 优化 gift 组件中的有效期和类型显示 - 在 redeemGift 中添加礼品卡核销时间 - 重构 storeVerification 组件逻辑,优化核销流程
This commit is contained in:
@@ -4,6 +4,7 @@ import {Button, ConfigProvider, Input, Divider} from '@nutui/nutui-react-taro'
|
||||
import {ArrowLeft, QrCode, Gift, Voucher} from '@nutui/icons-react-taro'
|
||||
import Taro from '@tarojs/taro'
|
||||
import {View, Text} from '@tarojs/components'
|
||||
import dayjs from 'dayjs'
|
||||
import {ShopGift} from "@/api/shop/shopGift/model";
|
||||
import {pageShopGift, updateShopGift} from "@/api/shop/shopGift";
|
||||
import GiftCard from "@/components/GiftCard";
|
||||
@@ -74,7 +75,8 @@ const GiftCardRedeem = () => {
|
||||
try {
|
||||
await updateShopGift({
|
||||
...validGift,
|
||||
userId: Taro.getStorageSync('UserId')
|
||||
userId: Taro.getStorageSync('UserId'),
|
||||
takeTime: dayjs.unix(Date.now() / 1000).format('YYYY-MM-DD HH:mm:ss')
|
||||
})
|
||||
|
||||
setRedeemSuccess(true)
|
||||
@@ -236,7 +238,7 @@ const GiftCardRedeem = () => {
|
||||
</View>
|
||||
|
||||
<Text className="text-2xl font-bold text-gray-900 mb-2">兑换成功!</Text>
|
||||
<Text className="text-gray-600 mb-6">礼品卡已添加到您的账户中</Text>
|
||||
<Text className="text-left text-gray-500 mb-6">礼品卡已添加到您的账户中</Text>
|
||||
|
||||
{validGift && (
|
||||
<View className="mb-6">
|
||||
|
||||
Reference in New Issue
Block a user