|
@@ -35,11 +35,21 @@ const index = (props) => {
|
35
|
35
|
request({ url: `/taHouse/${houseId}` }).then((res) => {
|
36
|
36
|
console.log(res.data.data,type, 'getDetail')
|
37
|
37
|
if (type == "address") {
|
38
|
|
- setAddress(res.data.data.address)
|
39
|
|
- setLngLat(res.data.data.lngLat)
|
|
38
|
+ setAddress({
|
|
39
|
+ address:res.data.data.address,
|
|
40
|
+ lngLat:res.data.data.lngLat
|
|
41
|
+ })
|
|
42
|
+ // setAddress(res.data.data.address)
|
|
43
|
+ // setLngLat(res.data.data.lngLat)
|
40
|
44
|
}else if (type == 'park'){
|
41
|
|
- setAddress(res.data.data.parking)
|
42
|
|
- setLngLat(res.data.data.parkLngLat)
|
|
45
|
+
|
|
46
|
+ setAddress({
|
|
47
|
+ address:res.data.data.parking,
|
|
48
|
+ lngLat:res.data.data.parkLngLat
|
|
49
|
+ })
|
|
50
|
+ // address(res.data.data)
|
|
51
|
+ // setAddress(res.data.data.parking)
|
|
52
|
+ // setLngLat(res.data.data.parkLngLat)
|
43
|
53
|
}
|
44
|
54
|
|
45
|
55
|
})
|
|
@@ -74,13 +84,18 @@ const index = (props) => {
|
74
|
84
|
// setLngLat(e.detail.value)
|
75
|
85
|
}
|
76
|
86
|
const onChooseLocation = () => {
|
77
|
|
- // console.log(333)
|
|
87
|
+ console.log(333)
|
78
|
88
|
wx.chooseLocation({
|
79
|
89
|
success: (res) => {
|
80
|
90
|
console.log(res)
|
81
|
91
|
|
82
|
92
|
setAddress(res)
|
83
|
|
- }
|
|
93
|
+ },
|
|
94
|
+ fail: (err) => {
|
|
95
|
+ console.log(err)
|
|
96
|
+
|
|
97
|
+ // setAddress(res)
|
|
98
|
+ },
|
84
|
99
|
})
|
85
|
100
|
}
|
86
|
101
|
|
|
@@ -113,7 +128,7 @@ const index = (props) => {
|
113
|
128
|
<View className='map-view'>
|
114
|
129
|
<Text className='title'>具体地址</Text>
|
115
|
130
|
<Container className='map-view-card'>
|
116
|
|
- <Input value={address.lngLat} onInput={onChange} placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
|
|
131
|
+ <Input onInput={onChange} placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
|
117
|
132
|
</Container>
|
118
|
133
|
</View>
|
119
|
134
|
</Layout>
|