feat(user): 新增收货地址管理及售后申请页面
- 新增地址类型定义,增强前端地址数据结构 - 新增地址编辑页面,支持地址智能识别和定位选点功能 - 地址编辑支持省市区选择及默认地址设置 - 新增地址列表页面,支持地址展示、删除、编辑和选择功能 - 实现售后申请页面,支持选择售后类型和退款原因 - 售后申请支持商品选择、退款金额计算和凭证上传 - 新增售后详情页面,支持售后状态展示及申请取消 - 优化页面加载和用户交互体验,增加错误提示和权限处理
This commit is contained in:
48
src_bak/components/common/Loading/index.tsx
Normal file
48
src_bak/components/common/Loading/index.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import React from 'react'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
|
||||
interface LoadingProps {
|
||||
/** 提示文字,默认"加载中..." */
|
||||
text?: string
|
||||
/** 是否全屏居中显示 */
|
||||
fullscreen?: boolean
|
||||
/** 自定义样式类名 */
|
||||
className?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 统一加载状态组件
|
||||
* - 小程序兼容(无 CSS transition / animation 依赖)
|
||||
* - 支持内嵌和全屏两种模式
|
||||
*/
|
||||
const Loading: React.FC<LoadingProps> = ({
|
||||
text = '加载中...',
|
||||
fullscreen = false,
|
||||
className = '',
|
||||
}) => {
|
||||
const content = (
|
||||
<View
|
||||
className={`flex flex-col items-center justify-center py-8 ${fullscreen ? 'fixed inset-0 z-50 bg-white/80' : ''} ${className}`}
|
||||
>
|
||||
{/* 简单的旋转加载指示器 */}
|
||||
<View
|
||||
className='w-7 h-7 rounded-full border-2 border-gray-200 mb-2'
|
||||
style={{
|
||||
borderTopColor: '#0e932e',
|
||||
borderRightColor: '#0e932e',
|
||||
animation: 'spin 0.8s linear infinite' as unknown as string,
|
||||
}}
|
||||
/>
|
||||
<Text className='text-xs text-gray-400'>{text}</Text>
|
||||
</View>
|
||||
)
|
||||
|
||||
// 全屏模式需要外层容器
|
||||
if (fullscreen) {
|
||||
return <>{content}</>
|
||||
}
|
||||
|
||||
return content
|
||||
}
|
||||
|
||||
export default Loading
|
||||
Reference in New Issue
Block a user