张延森 3 年之前
父節點
當前提交
532033126c
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      src/pages/details/mjDetails/sceneryDetails.jsx
  2. 1
    1
      src/services/home.js

+ 1
- 1
src/pages/details/mjDetails/sceneryDetails.jsx 查看文件

67
 
67
 
68
   useEffect(() => {
68
   useEffect(() => {
69
     if (id) {
69
     if (id) {
70
-      getTouristDetail(id).then((res) => {
70
+      getTouristDetail(id, { location }).then((res) => {
71
         setDetail(res)
71
         setDetail(res)
72
         setimglist(res.imageList || [])
72
         setimglist(res.imageList || [])
73
         getRecommendList({ location: res.locaton }).then((res2) => {
73
         getRecommendList({ location: res.locaton }).then((res2) => {

+ 1
- 1
src/services/home.js 查看文件

101
  * @param {*} id 
101
  * @param {*} id 
102
  * @returns 
102
  * @returns 
103
  */
103
  */
104
-export const getTouristDetail = (id) => request(`/tourist/${id}`)
104
+export const getTouristDetail = (id, params) => request(`/tourist/${id}`, { params })
105
 
105
 
106
 
106
 
107
 /**
107
 /**