feat(user): 新增收货地址管理及售后申请页面
- 新增地址类型定义,增强前端地址数据结构 - 新增地址编辑页面,支持地址智能识别和定位选点功能 - 地址编辑支持省市区选择及默认地址设置 - 新增地址列表页面,支持地址展示、删除、编辑和选择功能 - 实现售后申请页面,支持选择售后类型和退款原因 - 售后申请支持商品选择、退款金额计算和凭证上传 - 新增售后详情页面,支持售后状态展示及申请取消 - 优化页面加载和用户交互体验,增加错误提示和权限处理
This commit is contained in:
119
src_bak/pages/share/index.tsx
Normal file
119
src_bak/pages/share/index.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user