|
@@ -5,6 +5,9 @@ import { getItemList } from '@/services/item'
|
5
|
5
|
import emptyImg from '@/assets/empty.png'
|
6
|
6
|
import dayjs from 'dayjs'
|
7
|
7
|
import { savePoint, updatePoint } from '@/services/common'
|
|
8
|
+import { connect } from '@tarojs/redux'
|
|
9
|
+@connect(
|
|
10
|
+ state => ({ ...state.project, ...state.city }))
|
8
|
11
|
export default class Index extends Component {
|
9
|
12
|
|
10
|
13
|
config = {
|
|
@@ -20,7 +23,7 @@ export default class Index extends Component {
|
20
|
23
|
floor: '',
|
21
|
24
|
recordId: null
|
22
|
25
|
}
|
23
|
|
- componentWillMount () {
|
|
26
|
+ componentWillMount() {
|
24
|
27
|
savePoint({
|
25
|
28
|
event: 'list',
|
26
|
29
|
eventType: 'agent',
|
|
@@ -35,15 +38,15 @@ export default class Index extends Component {
|
35
|
38
|
}
|
36
|
39
|
|
37
|
40
|
|
38
|
|
- componentWillUnmount () {
|
|
41
|
+ componentWillUnmount() {
|
39
|
42
|
const { recordId } = this.state
|
40
|
43
|
recordId && updatePoint(recordId)
|
41
|
44
|
}
|
42
|
|
- componentDidMount () {
|
|
45
|
+ componentDidMount() {
|
43
|
46
|
this.loadList()
|
44
|
47
|
}
|
45
|
48
|
//获取楼盘列表
|
46
|
|
- loadGetFloor () {
|
|
49
|
+ loadGetFloor() {
|
47
|
50
|
const params = {
|
48
|
51
|
pageNumber: 1,
|
49
|
52
|
pageSize: 50,
|
|
@@ -55,7 +58,7 @@ export default class Index extends Component {
|
55
|
58
|
})
|
56
|
59
|
})
|
57
|
60
|
}
|
58
|
|
- loadList () {
|
|
61
|
+ loadList() {
|
59
|
62
|
var that = this;
|
60
|
63
|
const params = {
|
61
|
64
|
pageNumber: 1,
|
|
@@ -71,25 +74,26 @@ export default class Index extends Component {
|
71
|
74
|
})
|
72
|
75
|
}
|
73
|
76
|
|
74
|
|
- formatDate (value) {
|
|
77
|
+ formatDate(value) {
|
75
|
78
|
return dayjs(value).format('YYYY-MM-DD')
|
76
|
79
|
}
|
77
|
|
- navigateTo (id) {
|
|
80
|
+ navigateTo(id) {
|
78
|
81
|
Taro.navigateTo({ url: `/pages/agent/progress/index?customerId=${id}` })
|
79
|
82
|
}
|
80
|
|
- getName (dict, id) {
|
|
83
|
+ getName(dict, id) {
|
81
|
84
|
dict = dict.records || []
|
82
|
85
|
// let floorName = (dict.filter(({ buildingId: target }) => id === target)[0] || {}).name
|
83
|
86
|
return (dict.filter(({ buildingId: target }) => id === target)[0] || {}).buildingName
|
84
|
87
|
|
85
|
88
|
}
|
86
|
89
|
|
87
|
|
- toRecomonedPage () {
|
|
90
|
+ toRecomonedPage() {
|
|
91
|
+ console.log(this.props, "this.props")
|
88
|
92
|
Taro.navigateTo({
|
89
|
|
- url: `/pages/agent/recommend/index`
|
|
93
|
+ url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
|
90
|
94
|
})
|
91
|
95
|
}
|
92
|
|
- render () {
|
|
96
|
+ render() {
|
93
|
97
|
const { list, status, floorList } = this.state
|
94
|
98
|
return (
|
95
|
99
|
<View className='myClient'>
|
|
@@ -152,10 +156,10 @@ export default class Index extends Component {
|
152
|
156
|
}
|
153
|
157
|
|
154
|
158
|
{/* <View className='recommend' onClick={this.toRecomonedPage}>123</View> */}
|
155
|
|
- <View className="recommend" onClick={this.toRecomonedPage} >
|
156
|
|
- <Image src={require('@/assets/tuijiankehu.png')} className='home-img'></Image>
|
157
|
|
- <Text className="text">推荐</Text>
|
158
|
|
- </View>
|
|
159
|
+ <View className="recommend" onClick={this.toRecomonedPage} >
|
|
160
|
+ <Image src={require('@/assets/tuijiankehu.png')} className='home-img'></Image>
|
|
161
|
+ <Text className="text">推荐</Text>
|
|
162
|
+ </View>
|
159
|
163
|
</View>
|
160
|
164
|
);
|
161
|
165
|
}
|