|
@@ -9,8 +9,9 @@ import Taro from '@tarojs/taro'
|
9
|
9
|
|
10
|
10
|
export default withLayout((props) => {
|
11
|
11
|
|
12
|
|
- // const [PageProps] = useState(props)
|
13
|
|
- const UserRole = 2 // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
|
|
12
|
+ const [PageProps] = useState(props)
|
|
13
|
+ console.log(`PageProps`, PageProps.person)
|
|
14
|
+ const UserRole = PageProps.person.personType === 'customer' ? 1 : PageProps.person.personType === 'estate agent' ? 2 : PageProps.person.personType === 'Realty Consultant' ? 3 : 4 // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
|
14
|
15
|
const [MenuList, setMenuList] = useState(UserRole === 1 ? MineMenuList.User : UserRole === 2 ? MineMenuList.Broker : UserRole === 3 ? MineMenuList.Adviser : MineMenuList.Resident)
|
15
|
16
|
const [IsPull, setPull] = useState(false)
|
16
|
17
|
const [ShowLogin, setShowLogin] = useState(false)
|
|
@@ -57,12 +58,12 @@ export default withLayout((props) => {
|
57
|
58
|
{/* 用户信息 */}
|
58
|
59
|
<view className='UserInfo'>
|
59
|
60
|
<view className='UserIcon'>
|
60
|
|
- <Image mode='aspectFill' className='centerLabel' src={require('../../assets/mine-icon18.png')} />
|
|
61
|
+ <Image mode='aspectFill' className='centerLabel' src={PageProps.person.avatarurl || require('../../assets/mine-icon18.png')} />
|
61
|
62
|
</view>
|
62
|
63
|
<view className='OtherInfo'>
|
63
|
64
|
<view className='Name'>
|
64
|
65
|
<view>
|
65
|
|
- <text>用户姓名</text>
|
|
66
|
+ <text>{PageProps.person.nickname}</text>
|
66
|
67
|
<view>
|
67
|
68
|
<text className='iconfont icon-bianji' onClick={() => { Taro.navigateTo({ url: `/pages/mine/userInfo/index` }) }}></text>
|
68
|
69
|
<text onClick={() => { Taro.navigateTo({ url: `/pages/mine/userInfo/index` }) }}>个人信息资料修改</text>
|