refactor(components): 重构 CouponCard 组件样式

- 优化了 CouponCard 组件的视觉效果,增加了更多细节和动画
- 添加了响应式样式,提高了移动端体验
- 新增了 CouponList组件样式,用于展示优惠券列表
This commit is contained in:
2025-08-22 17:27:45 +08:00
parent 41702c295a
commit 1e51a137ee
20 changed files with 1321 additions and 241 deletions

View File

@@ -64,33 +64,18 @@ const AddUserAddress = () => {
// 提交表单
const submitSucceed = async (values: any) => {
if(!values.refereeId){
return Taro.showToast({
title: '请填写邀请人ID',
icon: 'error'
});
}
// 验证邀请人ID是否存在
try {
await getShopDealerUser(values.refereeId);
} catch (error) {
console.error('验证邀请人失败:', error);
return Taro.showToast({
title: '邀请人ID不存在',
icon: 'error'
});
}
try {
// 准备提交的数据
const submitData = {
...values,
realName: values.realName || user?.nickname,
mobile: user?.phone,
refereeId: values.refereeId,
refereeId: values.refereeId || FormData?.refereeId,
applyStatus: 10,
auditTime: undefined
};
await getShopDealerUser(submitData.refereeId);
// 如果是编辑模式添加现有申请的id
if (isEditMode && existingApply?.applyId) {
@@ -105,7 +90,7 @@ const AddUserAddress = () => {
}
Taro.showToast({
title: `${isEditMode ? '更新' : '提交'}成功`,
title: `${isEditMode ? '提交' : '提交'}成功`,
icon: 'success'
});
@@ -114,9 +99,9 @@ const AddUserAddress = () => {
}, 1000);
} catch (error) {
console.error('提交失败:', error);
Taro.showToast({
title: `${isEditMode ? '更新' : '提交'}失败`,
console.error('验证邀请人失败:', error);
return Taro.showToast({
title: '邀请人ID不存在',
icon: 'error'
});
}