|
@@ -26,7 +26,6 @@ export default withLayout((props) => {
|
26
|
26
|
const [detail, setDetail] = useState({})
|
27
|
27
|
const [isSaved, toggleSave] = useSave(detail.isSaved, 'tourist', id)
|
28
|
28
|
const [isLike, toggleLike] = useLike(detail.isLike, 'tourist', id)
|
29
|
|
- const [distance, setDistance] = useState()
|
30
|
29
|
//banner图集数组
|
31
|
30
|
const [imglist, setimglist] = useState([])
|
32
|
31
|
const [index, setIndex] = useState(0)
|
|
@@ -54,7 +53,7 @@ export default withLayout((props) => {
|
54
|
53
|
const [recommend, setRecommend] = useState([])
|
55
|
54
|
|
56
|
55
|
const openMap = () => {
|
57
|
|
- const [lng, lat] = detail.location.split(',')
|
|
56
|
+ const [lng, lat] = detail.locaton.split(',')
|
58
|
57
|
|
59
|
58
|
Taro.openLocation({
|
60
|
59
|
longitude: lng - 0,
|
|
@@ -132,7 +131,7 @@ export default withLayout((props) => {
|
132
|
131
|
<view className='wz'>{detail.address}</view>
|
133
|
132
|
<view className='dpPosition' onClick={openMap}>
|
134
|
133
|
<image src={dw} className='dwTip' />
|
135
|
|
- <view className='distance'>{distance}公里<image src={zhuandao} className="zhuandao" /></view>
|
|
134
|
+ <view className='distance'>{(detail.distance / 1000).toFixed(2)}公里<image src={zhuandao} className="zhuandao" /></view>
|
136
|
135
|
</view>
|
137
|
136
|
</view>
|
138
|
137
|
</view>
|