Files
template-10559/src/pages/user/user.tsx
赵忠林 0a517b1247 feat(branding): 更新应用名称及时里院子市集相关引用
- 将应用名称从"时里院子市集"更新为"通源堂健康生态平台"
- 修改了config/env.ts中的生产环境应用名称配置
- 更新了src/cms/category/index.tsx中的分享标题引用
- 调整了src/admin/components/UserCell.tsx中的导航路径从/dealer/index到/doctor/index
2025-09-28 14:36:24 +08:00

65 lines
1.9 KiB
TypeScript

import {useEffect, useRef} from 'react'
import {PullToRefresh} from '@nutui/nutui-react-taro'
import UserCard from "./components/UserCard";
import UserOrder from "./components/UserOrder";
import UserFooter from "./components/UserFooter";
import {useUserData} from "@/hooks/useUserData";
import {View} from '@tarojs/components';
import './user.scss'
import IsDealer from "./components/IsDealer";
import UserCell from "@/pages/user/components/UserCell";
import {useThemeStyles} from "@/hooks/useTheme";
function User() {
const {refresh} = useUserData()
const userCardRef = useRef<any>()
const themeStyles = useThemeStyles();
// 下拉刷新处理
const handleRefresh = async () => {
await refresh()
// 如果 UserCard 组件有自己的刷新方法,也可以调用
if (userCardRef.current?.handleRefresh) {
await userCardRef.current.handleRefresh()
}
}
useEffect(() => {
}, []);
return (
<PullToRefresh
onRefresh={handleRefresh}
headHeight={60}
>
{/* 装饰性背景 */}
<View className={'h-64 w-full fixed top-0 z-0'} style={themeStyles.primaryBackground}>
{/* 装饰性背景元素 - 小程序兼容版本 */}
<View className="absolute w-32 h-32 rounded-full" style={{
backgroundColor: 'rgba(255, 255, 255, 0.1)',
top: '-16px',
right: '-16px'
}}></View>
<View className="absolute w-24 h-24 rounded-full" style={{
backgroundColor: 'rgba(255, 255, 255, 0.08)',
bottom: '-12px',
left: '-12px'
}}></View>
<View className="absolute w-16 h-16 rounded-full" style={{
backgroundColor: 'rgba(255, 255, 255, 0.05)',
top: '60px',
left: '120px'
}}></View>
</View>
<UserCard ref={userCardRef}/>
<UserOrder/>
<IsDealer/>
<UserCell/>
<UserFooter/>
</PullToRefresh>
)
}
export default User