feat(user): 新增收货地址管理及售后申请页面
- 新增地址类型定义,增强前端地址数据结构 - 新增地址编辑页面,支持地址智能识别和定位选点功能 - 地址编辑支持省市区选择及默认地址设置 - 新增地址列表页面,支持地址展示、删除、编辑和选择功能 - 实现售后申请页面,支持选择售后类型和退款原因 - 售后申请支持商品选择、退款金额计算和凭证上传 - 新增售后详情页面,支持售后状态展示及申请取消 - 优化页面加载和用户交互体验,增加错误提示和权限处理
This commit is contained in:
35
src_bak/components/NavBar/index.tsx
Normal file
35
src_bak/components/NavBar/index.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { View, Text } from '@tarojs/components';
|
||||
import { useNavigate } from '@tarojs/taro';
|
||||
|
||||
interface NavBarProps {
|
||||
title: string;
|
||||
onBack?: () => void;
|
||||
rightText?: string;
|
||||
onRightClick?: () => void;
|
||||
}
|
||||
|
||||
export default function NavBar({ title, onBack, rightText, onRightClick }: NavBarProps) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleBack = () => {
|
||||
if (onBack) {
|
||||
onBack();
|
||||
} else {
|
||||
navigate(-1);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<View className="flex items-center justify-between px-4 py-3 bg-white border-b border-gray-200">
|
||||
<View className="flex items-center flex-1" onClick={handleBack}>
|
||||
<Text className="text-lg mr-2">←</Text>
|
||||
<Text className="text-base font-medium truncate">{title}</Text>
|
||||
</View>
|
||||
{rightText && (
|
||||
<View onClick={onRightClick}>
|
||||
<Text className="text-sm text-blue-500">{rightText}</Text>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user