feat(user): 新增收货地址管理及售后申请页面

- 新增地址类型定义,增强前端地址数据结构
- 新增地址编辑页面,支持地址智能识别和定位选点功能
- 地址编辑支持省市区选择及默认地址设置
- 新增地址列表页面,支持地址展示、删除、编辑和选择功能
- 实现售后申请页面,支持选择售后类型和退款原因
- 售后申请支持商品选择、退款金额计算和凭证上传
- 新增售后详情页面,支持售后状态展示及申请取消
- 优化页面加载和用户交互体验,增加错误提示和权限处理
This commit is contained in:
2026-07-01 12:11:56 +08:00
parent bf6ed504cc
commit 1fa58040f3
636 changed files with 58878 additions and 716 deletions

View File

@@ -0,0 +1,119 @@
import { View, Text, Image } from '@tarojs/components';
import { useState } from 'react';
import Taro from '@tarojs/taro';
import NavBar from '@/components/NavBar';
export default function SharePage() {
const [shareLink, setShareLink] = useState('https://paopao.com/ref/abc123');
const [qrCodeUrl, setQrCodeUrl] = useState('');
const handleCopyLink = () => {
Taro.setClipboardData({ data: shareLink })
};
const handleGeneratePoster = () => {
Taro.showToast({ title: '海报生成功能开发中', icon: 'none' })
};
const handleShare = (platform: string) => {
// TODO: 接入分享 API
};
return (
<View className="min-h-screen bg-gray-100">
<NavBar title="分享赚佣金" />
{/* 佣金概览 */}
<View className="p-6 text-white" style={{ background: 'linear-gradient(to right, #ef4444, #f97316)' }}>
<Text className="text-sm opacity-90">()</Text>
<View className="flex items-baseline mt-2 mb-4">
<Text className="text-3xl font-bold">1,258</Text>
<Text className="text-lg ml-1">.50</Text>
</View>
<View className="flex justify-between">
<View className="text-center">
<Text className="text-xl font-bold block">36</Text>
<Text className="text-xs opacity-75"></Text>
</View>
<View className="text-center">
<Text className="text-xl font-bold block">89</Text>
<Text className="text-xs opacity-75"></Text>
</View>
<View className="text-center">
<Text className="text-xl font-bold block">¥528</Text>
<Text className="text-xs opacity-75"></Text>
</View>
</View>
</View>
{/* 分享方式 */}
<View className="p-4">
<View className="bg-white rounded-lg p-4 mb-4">
<Text className="text-base font-medium mb-4 block"></Text>
<View className="flex items-center bg-gray-100 rounded-lg p-3 mb-3">
<Text className="flex-1 text-sm text-gray-600 truncate">{shareLink}</Text>
<Text className="text-sm text-blue-500 ml-2" onClick={handleCopyLink}></Text>
</View>
<View className="flex" style={{ gap: '16px' }}>
<View
className="flex-1 bg-green-500 text-white rounded-lg py-3 text-center"
onClick={() => handleShare('wechat')}
>
<Text className="text-white"></Text>
</View>
<View
className="flex-1 bg-blue-500 text-white rounded-lg py-3 text-center"
onClick={() => handleShare('moments')}
>
<Text className="text-white"></Text>
</View>
</View>
</View>
{/* 分享海报 */}
<View className="bg-white rounded-lg p-4 mb-4">
<Text className="text-base font-medium mb-4 block"></Text>
<View className="bg-gray-100 rounded-lg p-8 text-center mb-3">
{qrCodeUrl ? (
<Image src={qrCodeUrl} className="w-32 h-32 mx-auto" />
) : (
<View>
<Text className="text-4xl mb-2">📱</Text>
<Text className="text-sm text-gray-500"></Text>
</View>
)}
</View>
<View
className="bg-red-500 text-white rounded-lg py-3 text-center"
onClick={handleGeneratePoster}
>
<Text className="text-white"></Text>
</View>
</View>
{/* 分享规则 */}
<View className="bg-white rounded-lg p-4">
<Text className="text-base font-medium mb-3 block"></Text>
<View className="text-sm text-gray-600 flex flex-col" style={{ gap: '8px' }}>
<View className="flex">
<Text className="text-red-500 mr-2"></Text>
<Text> ¥10 </Text>
</View>
<View className="flex">
<Text className="text-red-500 mr-2"></Text>
<Text> 5% </Text>
</View>
<View className="flex">
<Text className="text-red-500 mr-2"></Text>
<Text> ¥100 </Text>
</View>
<View className="flex">
<Text className="text-red-500 mr-2"></Text>
<Text> 1-3 </Text>
</View>
</View>
</View>
</View>
</View>
);
}