|
@@ -24,7 +24,7 @@ import './sceneryDetails.less'
|
24
|
24
|
|
25
|
25
|
export default withLayout((props) => {
|
26
|
26
|
const { router, person ,location } = props
|
27
|
|
- const { id, distance, location2 } = props.router.params
|
|
27
|
+ const { id, distance, loc } = props.router.params
|
28
|
28
|
const [detail, setDetail] = useState({})
|
29
|
29
|
const [isSaved, toggleSave] = useSave(detail.isSaved, 'tourist', id)
|
30
|
30
|
const [isLike, toggleLike] = useLike(detail.isLike, 'tourist', id)
|
|
@@ -66,7 +66,8 @@ export default withLayout((props) => {
|
66
|
66
|
}
|
67
|
67
|
const log = useRef('')
|
68
|
68
|
const lat = useRef('')
|
69
|
|
-
|
|
69
|
+ const [queryParams, setQueryParams] = useState({ location: location, pageNum: 1, pageSize: 10, typeId: '',targetId:id })
|
|
70
|
+ const [nloction,setNLoction]=useState()
|
70
|
71
|
|
71
|
72
|
useEffect(() => {
|
72
|
73
|
getTouristDetail(id).then((res) => {
|
|
@@ -81,9 +82,13 @@ export default withLayout((props) => {
|
81
|
82
|
setAllextNum(res.total)
|
82
|
83
|
setNewextNum(res.records.length)
|
83
|
84
|
})
|
84
|
|
- getRecommendList({ location: location }).then((res) => {
|
|
85
|
+ getRecommendList({ location: loc }).then((res) => {
|
85
|
86
|
setRecommend(res || [])
|
86
|
87
|
})
|
|
88
|
+ getResourceList(queryParams).then((res)=>{
|
|
89
|
+ console.log(queryParams)
|
|
90
|
+ console.log(res)
|
|
91
|
+ })
|
87
|
92
|
}, [])
|
88
|
93
|
|
89
|
94
|
// 分享
|