refactor(config): 将环境配置文件从 TypeScript 转换为 JavaScript
- 移除 config/env.ts 文件并将环境配置转换为 config/env.js - 更新 config/index.ts 中的导入路径以匹配新的 JavaScript 文件扩展名 - 修改 src/utils/server.ts 中的开发服务器 URL 配置 - 更新 tsconfig.json 的 include 配置移除 config 目录 - 调整环境配置中的 API 地址设置统一使用生产环境地址 - 更新 .workbuddy/expert-history.json 中的时间戳记录
This commit is contained in:
98
src/dealer/components/FreezeMoneyModal.tsx
Normal file
98
src/dealer/components/FreezeMoneyModal.tsx
Normal file
@@ -0,0 +1,98 @@
|
||||
import React from 'react'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { Popup, Button } from '@nutui/nutui-react-taro'
|
||||
import { Close } from '@nutui/icons-react-taro'
|
||||
|
||||
interface FreezeMoneyModalProps {
|
||||
visible: boolean
|
||||
amount: string
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
/**
|
||||
* 待使用明细弹窗组件
|
||||
* 展示待使用(冻结中)金额和解冻规则说明
|
||||
*/
|
||||
const FreezeMoneyModal: React.FC<FreezeMoneyModalProps> = ({
|
||||
visible,
|
||||
amount,
|
||||
onClose
|
||||
}) => {
|
||||
// 格式化金额,保留2位小数
|
||||
const formatAmount = (value: string | number): string => {
|
||||
const num = typeof value === 'string' ? parseFloat(value) : value
|
||||
if (isNaN(num)) return '0.00'
|
||||
return num.toFixed(2)
|
||||
}
|
||||
|
||||
return (
|
||||
<Popup
|
||||
visible={visible}
|
||||
style={{ padding: '0', borderRadius: '16px', overflow: 'hidden' }}
|
||||
onClose={onClose}
|
||||
closeOnOverlayClick={true}
|
||||
position="center"
|
||||
>
|
||||
<View className="w-72 bg-white">
|
||||
{/* 头部标题 */}
|
||||
<View className="relative px-4 py-4 border-b border-gray-100">
|
||||
<Text className="text-lg font-semibold text-gray-800 text-center block">
|
||||
待使用明细
|
||||
</Text>
|
||||
<View
|
||||
className="absolute right-3 top-1/2 -translate-y-1/2 p-1"
|
||||
onClick={onClose}
|
||||
>
|
||||
<Close size={20} className="text-gray-400" />
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* 金额展示区域 */}
|
||||
<View className="px-6 py-8 text-center">
|
||||
<Text className="text-sm text-gray-500 mb-2 block">
|
||||
待使用(冻结中)
|
||||
</Text>
|
||||
<View className="flex items-baseline justify-center">
|
||||
<Text className="text-2xl font-bold text-gray-800">¥</Text>
|
||||
<Text className="text-4xl font-bold text-gray-800 ml-1">
|
||||
{formatAmount(amount)}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* 分隔线 */}
|
||||
<View className="mx-6 h-px bg-gray-100" />
|
||||
|
||||
{/* 温馨提示区域 */}
|
||||
<View className="px-6 py-6">
|
||||
<Text className="text-sm font-medium text-gray-700 mb-3 block">
|
||||
温馨提示:
|
||||
</Text>
|
||||
<Text className="text-sm text-gray-500 leading-relaxed block">
|
||||
需要直推用户进行下单配送后方可解冻到待提现资金组
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{/* 底部按钮 */}
|
||||
<View className="px-6 pb-6">
|
||||
<Button
|
||||
type="primary"
|
||||
block
|
||||
onClick={onClose}
|
||||
style={{
|
||||
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
||||
border: 'none',
|
||||
borderRadius: '8px',
|
||||
height: '44px',
|
||||
lineHeight: '44px'
|
||||
}}
|
||||
>
|
||||
关闭
|
||||
</Button>
|
||||
</View>
|
||||
</View>
|
||||
</Popup>
|
||||
)
|
||||
}
|
||||
|
||||
export default FreezeMoneyModal
|
||||
Reference in New Issue
Block a user