|
@@ -4,6 +4,7 @@ import { Image, Block } from '@tarojs/components'
|
4
|
4
|
import { formatDate } from '@/utils/chatDate'
|
5
|
5
|
import { fetch } from '@/utils/request'
|
6
|
6
|
import { API_INVALID } from '@/constants/api'
|
|
7
|
+import { ROLE_CODE } from '@/constants/user'
|
7
|
8
|
import './index.scss'
|
8
|
9
|
|
9
|
10
|
export default function ResidentListItem (props) {
|
|
@@ -29,6 +30,18 @@ export default function ResidentListItem (props) {
|
29
|
30
|
}
|
30
|
31
|
})
|
31
|
32
|
}
|
|
33
|
+ const handelRoleCode=()=>{
|
|
34
|
+ let roleCode=''
|
|
35
|
+ if(!data.recommendPersonType)return ''
|
|
36
|
+ switch(data.recommendPersonType)
|
|
37
|
+ {
|
|
38
|
+ case ROLE_CODE.CONSULTANT:roleCode='置业顾问';break;
|
|
39
|
+ case ROLE_CODE.CHANNEL_AGENT:roleCode=data.channelName || '经纪人';break;
|
|
40
|
+ case ROLE_CODE.ESTATE_AGENT:roleCode=data.channelName || '经纪人';break;
|
|
41
|
+ default:roleCode='客户';
|
|
42
|
+ }
|
|
43
|
+ return '('+roleCode+')'
|
|
44
|
+ }
|
32
|
45
|
return (
|
33
|
46
|
<view className='components ResidentListItem'>
|
34
|
47
|
<view className='flex-h'>
|
|
@@ -97,7 +110,7 @@ export default function ResidentListItem (props) {
|
97
|
110
|
<text>报备经纪:</text>
|
98
|
111
|
<view className='flex-item'>
|
99
|
112
|
{/* <text>{data.recommendPersonName} {data.recommendPersonPhone}({data.type === 'customer' ? '客户' : data.consultant ? '置业顾问' : data.channelName || '经纪人'})</text> */}
|
100
|
|
- <text>{data.recommendPersonName} {data.recommendPersonPhone}({data.type === 'report' ? data.channelName : data.type === 'customer' ? '客户' : data.consultant ? '置业顾问' : data.channelName || '经纪人'})</text>
|
|
113
|
+ <text>{data.recommendPersonName} {data.recommendPersonPhone}{handelRoleCode()}</text>
|
101
|
114
|
</view>
|
102
|
115
|
</view>
|
103
|
116
|
<view className='flex-h'>
|