吃个甘蔗嚼一年 před 3 roky
rodič
revize
1bf99f6d39

+ 6
- 7
src/components/CollectList/MyCollect/index.jsx Zobrazit soubor

@@ -104,17 +104,16 @@ export default (props) => {
104 104
                   </view>
105 105
                 </view>
106 106
               </view>
107
-              <view class='right-complete-two'>
108
-                <view className='right-content' onClick={() => {
109
-                  if (item.targetType === "tourist") {
107
+              {/* if (item.targetType === "tourist") {
110 108
                     return Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` });
111 109
                   } else {
112
-                    return Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?shop=${item.shopId}` });
110
+                    console.log(item.targetType);
113 111
 
114
-                  }
115
-                }}
116
-                >
112
+                    return Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` });
117 113
 
114
+                  } */}
115
+              <view class='right-complete-two'>
116
+                <view className='right-content' onClick={() => { Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` }) }}>
118 117
                   <image className='right-image' src={SeeDetails} />
119 118
                   <view className='right-title'>查看详情</view>
120 119
                 </view>

+ 0
- 18
src/pages/MineUserAll/Collect/index.jsx Zobrazit soubor

@@ -13,16 +13,6 @@ export default withLayout((props) => {
13 13
   const [collectContent, setCollectContent] = useState([])
14 14
   const [queryParams, setQueryParams] = useState({ location: location, pageNum: 1, pageSize: 10 })
15 15
 
16
-  // useEffect(() => {
17
-  //   getCollectList({
18
-  //     pageNum: 1,
19
-  //     pageSize: 99,
20
-  //     location: location,
21
-  //   }).then(val => {
22
-  //     setCollectContent(val.records)
23
-  //   })
24
-  // }, [location])
25
-
26 16
   return (
27 17
     <view className='page-index box-content'>
28 18
       <view className='index-navbar'>
@@ -46,14 +36,6 @@ export default withLayout((props) => {
46 36
           }
47 37
         </List>
48 38
       </view>
49
-      {/* <view >
50
-        {
51
-          collectContent.map((item, index) => { return <MyCollect key={(index)} item={item} /> })
52
-        }
53
-      </view>
54
-      <view className='foot'> 
55
-        已经到底了~
56
-      </view>*/}
57 39
     </view>
58 40
   )
59 41
 })

+ 38
- 1
src/pages/index/index.jsx Zobrazit soubor

@@ -3,19 +3,31 @@
3 3
 import React, { useState, useEffect } from 'react'
4 4
 import CustomNav from '@/components/CustomNav'
5 5
 import logo from '@/assets/icons/comm/logo_small.png'
6
+import { getNowHotelManage, getHotelDetail } from '@/services/landlord'
7
+import { getTaRoom, goToRoomForm, getWorkerDetail } from '@/services/taRoom​'
8
+
6 9
 import withLayout from '@/layouts'
7 10
 import tabList from './tabbar'
8 11
 import Guide from './tabs/Guide'
9 12
 import Mine from './tabs/Mine'
10 13
 import Recommend from './tabs/Recommend'
14
+
11 15
 import './index.less'
12 16
 
13 17
 
14 18
 
15 19
 export default withLayout((props) => {
16 20
   const { router, person, location } = props
21
+  const { roomId, roomOrderId } = router.params
22
+
17 23
   const { params, path } = router
18 24
   const { tab } = params || {}
25
+  const [extend, setExtend] = useState([])
26
+  //默认
27
+  const [titleRoom, setTitleRoom] = useState('十公里')
28
+  const [titleLogo, settitleLogo] = useState(logo)
29
+  const { hotelId } = extend
30
+
19 31
   const [currentTab, setCurrentTab] = useState(0)
20 32
   const handleTabChange = (e) => {
21 33
     const { index } = e.detail
@@ -26,10 +38,35 @@ export default withLayout((props) => {
26 38
       setCurrentTab(tab - 0)
27 39
     }
28 40
   }, [tab])
41
+
42
+  useEffect(() => {
43
+
44
+  }, [])
45
+
46
+  useEffect(() => {
47
+    if (roomId) {
48
+      getTaRoom(roomId).then((res) => {
49
+        setExtend(res)
50
+
51
+        getHotelDetail(hotelId).then((e) => {
52
+          setTitleRoom(e?.hotelName || '十公里')
53
+          settitleLogo(e?.logo || logo)
54
+        })
55
+      })
56
+
57
+
58
+    } else {
59
+
60
+    }
61
+
62
+
63
+  }, [roomId, hotelId])
64
+
65
+
29 66
   return (
30 67
     <view className='page-index'>
31 68
       <view className='index-navbar'>
32
-        <CustomNav logo={logo} title='十公里' />
69
+        <CustomNav logo={titleLogo} title={titleRoom} />
33 70
       </view>
34 71
       <view className='index-container'>
35 72
         {currentTab === 0 && <Recommend location={location} />}

+ 6
- 15
src/pages/index/tabs/Guide.jsx Zobrazit soubor

@@ -1,5 +1,7 @@
1 1
 import { useState, useEffect, useRef } from "react";
2 2
 import Taro from '@tarojs/taro'
3
+import CustomNav from '@/components/CustomNav'
4
+
3 5
 import MoreGuide from "@/components/MoreGuide";
4 6
 import BossCard from '@/components/BossCard'
5 7
 import Taxi from '@/assets/icons/GuideCheck/taxi.png'
@@ -20,7 +22,7 @@ import './GuideCss/style.less'
20 22
 
21 23
 
22 24
 export default (props) => {
23
-  const { router, person, location } = props
25
+  const { router, person, location, } = props
24 26
   const { roomId, roomOrderId } = router.params
25 27
   const [extend, setExtend] = useState([])
26 28
   const [ifroomId, setIfroomId] = useState('havenot')
@@ -60,6 +62,8 @@ export default (props) => {
60 62
 
61 63
 
62 64
 
65
+
66
+
63 67
   useEffect(() => {
64 68
     if (roomOrderId) {
65 69
       goToRoomForm(roomOrderId).then((res) => {
@@ -113,18 +117,7 @@ export default (props) => {
113 117
     if (taRoomContent?.parkingAddress === "") {
114 118
       setParkingButtonStyle('none')
115 119
     }
116
-    // if (extend.length === 0) {
117
-    //   setGuideStyle('none')
118
-    // }
119
-    // if (extend) {
120
-    //   extend.map(item => {
121
-    //     if (item.pages) {
122
-    //       setGuideStyle('none')
123
-    //     } else {
124
-    //       setGuideStyle('')
125
-    //     }
126
-    //   })
127
-    // }
120
+
128 121
 
129 122
   }, [roomId, RoomLocation])
130 123
 
@@ -168,11 +161,9 @@ export default (props) => {
168 161
 
169 162
 
170 163
 
171
-
172 164
   return (
173 165
     <scroll-view scroll-y style='height:100%;'  >
174 166
 
175
-
176 167
       <view className='Guide-Home-box'>
177 168
         {
178 169
           ifroomId === 'havenot' && (

+ 4
- 2
src/services/landlord.js Zobrazit soubor

@@ -6,7 +6,9 @@ import request from '@/utils/request'
6 6
  * @param {*} id 
7 7
  * @returns 
8 8
  */
9
-export const getHotelDetail = (id) => request(`/taHotel/${id}`)
9
+export const getHotelDetail = (id) => request(`/hotel/${id}`)
10
+
11
+
10 12
 
11 13
 /**
12 14
  * 查询指定名宿的账户
@@ -36,7 +38,7 @@ export const getHotelManage = (params) => request('/hotel/manage/index', { param
36 38
  * @param {*} params 
37 39
  * @returns 
38 40
  */
39
-export const getAccountLogList = (id,params) => request(`/hotel/account/${id}/log`,{params})
41
+export const getAccountLogList = (id, params) => request(`/hotel/account/${id}/log`, { params })
40 42
 
41 43
 /**
42 44
  * 房源列表

+ 3
- 1
src/services/taRoom​.js Zobrazit soubor

@@ -30,4 +30,6 @@ export const goToRoomForm = (id) => request(`/roomOrder/${id}`)
30 30
  * @returns 
31 31
  */
32 32
 
33
-export const personSubmit = (id, data) => request(`/room-order/${id}/person`, { method: 'post', data })
33
+export const personSubmit = (id, data) => request(`/room-order/${id}/person`, { method: 'post', data })
34
+
35
+