feat(user): 更新用户页面布局和功能配置

- 在用户页面添加导航栏并集成状态栏高度适配
- 修改用户卡片组件的高度设置和隐藏余额积分等显示项
- 更新用户中心菜单项标题和功能跳转逻辑
- 调整经销商申请表单中的邀请人ID输入框启用状态
- 修复登录验证跳转逻辑中的特定页面判断条件
- 更新项目配置文件中的微信小程序应用ID
- 移除首页头部的品牌标识和下拉箭头图标显示
This commit is contained in:
2026-01-21 17:13:37 +08:00
parent 43106acc27
commit 12858c6a3e
7 changed files with 63 additions and 39 deletions

View File

@@ -162,7 +162,7 @@ function UserCard() {
background: 'linear-gradient(to bottom, #ffffff, #ffffff)', // 这种情况建议使用类名来控制样式(引入外联样式)
// width: '720rpx',
// margin: '10px auto 0px auto',
height: '170px',
height: '120px',
// borderRadius: '22px 22px 0 0',
}}
>
@@ -198,27 +198,27 @@ function UserCard() {
</View>
</View>
</View>
<View className={'flex justify-around mt-1'}>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/wallet/wallet', true)}>
<Text className={'text-sm text-gray-500'}></Text>
<Text className={'text-xl'}>{data?.balance || '0.00'}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}>
<Text className={'text-sm text-gray-500'}></Text>
<Text className={'text-xl'}>{data?.points || 0}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/coupon/index', true)}>
<Text className={'text-sm text-gray-500'}></Text>
<Text className={'text-xl'}>{data?.coupons || 0}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/gift/index', true)}>
<Text className={'text-sm text-gray-500'}></Text>
<Text className={'text-xl'}>{data?.giftCards || 0}</Text>
</View>
</View>
{/*<View className={'flex justify-around mt-1'}>*/}
{/* <View className={'item flex justify-center flex-col items-center'}*/}
{/* onClick={() => navTo('/user/wallet/wallet', true)}>*/}
{/* <Text className={'text-sm text-gray-500'}>余额</Text>*/}
{/* <Text className={'text-xl'}>{data?.balance || '0.00'}</Text>*/}
{/* </View>*/}
{/* <View className={'item flex justify-center flex-col items-center'}>*/}
{/* <Text className={'text-sm text-gray-500'}>积分</Text>*/}
{/* <Text className={'text-xl'}>{data?.points || 0}</Text>*/}
{/* </View>*/}
{/* <View className={'item flex justify-center flex-col items-center'}*/}
{/* onClick={() => navTo('/user/coupon/index', true)}>*/}
{/* <Text className={'text-sm text-gray-500'}>优惠券</Text>*/}
{/* <Text className={'text-xl'}>{data?.coupons || 0}</Text>*/}
{/* </View>*/}
{/* <View className={'item flex justify-center flex-col items-center'}*/}
{/* onClick={() => navTo('/user/gift/index', true)}>*/}
{/* <Text className={'text-sm text-gray-500'}>礼品卡</Text>*/}
{/* <Text className={'text-xl'}>{data?.giftCards || 0}</Text>*/}
{/* </View>*/}
{/*</View>*/}
</View>
</View>
</View>

View File

@@ -117,17 +117,17 @@ const UserCell = () => {
}>
<Cell
className="nutui-cell-clickable"
title="账号安全"
title="个人资料"
align="center"
extra={<ArrowRight color="#cccccc" size={18}/>}
onClick={() => navTo('/user/profile/profile', true)}
/>
<Cell
className="nutui-cell-clickable"
title="切换主题"
title="返回首页"
align="center"
extra={<ArrowRight color="#cccccc" size={18}/>}
onClick={() => navTo('/user/theme/index', true)}
onClick={() => Taro.reLaunch({url: '/pages/index/index'})}
/>
<Cell
className="nutui-cell-clickable"

View File

@@ -1,18 +1,27 @@
import {useEffect} from 'react'
import {useEffect, useState} from 'react'
import Taro from '@tarojs/taro';
import UserCard from "./components/UserCard";
import UserOrder from "./components/UserOrder";
import UserCell from "./components/UserCell";
import UserFooter from "./components/UserFooter";
import {useUser} from "@/hooks/useUser";
import {NavBar} from '@nutui/nutui-react-taro';
import {Home} from '@nutui/icons-react-taro'
import './user.scss'
import IsDealer from "./components/IsDealer";
function User() {
const [statusBarHeight, setStatusBarHeight] = useState<number>()
const {
isAdmin
} = useUser();
useEffect(() => {
Taro.getSystemInfo({
success: (res) => {
setStatusBarHeight(res.statusBarHeight)
},
})
}, []);
/**
@@ -34,6 +43,28 @@ function User() {
return (
<>
<NavBar
fixed={true}
style={{marginTop: `${statusBarHeight}px`, backgroundColor: 'transparent'}}
onBackClick={() => {
}}
left={
<div style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: '30px',
height: '30px',
backgroundColor: 'white',
textAlign: 'center',
borderRadius: '50%',
}}>
<Home size={15} onClick={() => Taro.reLaunch({url: '/pages/index/index'})} style={{color: 'black', marginBottom: '1px'}} />
</div>
}
>
<span></span>
</NavBar>
<div className={'w-full'} style={{
background: 'linear-gradient(to bottom, #e9fff2, #f9fafb)'
}}>