吃个甘蔗嚼一年 3 years ago
parent
commit
ecbd33c05c
1 changed files with 14 additions and 14 deletions
  1. 14
    14
      src/hotel/components/HouseManage/houseManage.jsx

+ 14
- 14
src/hotel/components/HouseManage/houseManage.jsx View File

37
             getRoomList({ hotelId: hotel.hotelId }).then((res) => {
37
             getRoomList({ hotelId: hotel.hotelId }).then((res) => {
38
               setDetail(res.records || [])
38
               setDetail(res.records || [])
39
             })
39
             })
40
-          })       
41
-        } 
40
+          })
41
+        }
42
       }
42
       }
43
-    })   
43
+    })
44
   }
44
   }
45
-  const handelDetail=(val)=>{
45
+  const handelDetail = (val) => {
46
     Taro.navigateTo({ url: `/hotel/pages/landlord/addRoom/addRoom?hotelId=${hotel.hotelId}&hotelName=${hotel.hotelName}&roomId=${val.roomId}` });
46
     Taro.navigateTo({ url: `/hotel/pages/landlord/addRoom/addRoom?hotelId=${hotel.hotelId}&hotelName=${hotel.hotelName}&roomId=${val.roomId}` });
47
   }
47
   }
48
 
48
 
100
     Taro.navigateTo({ url: `/hotel/pages/landlord/roomOrder/roomOrder?roomId=${val.roomId}&roomName=${val.roomName}` });
100
     Taro.navigateTo({ url: `/hotel/pages/landlord/roomOrder/roomOrder?roomId=${val.roomId}&roomName=${val.roomName}` });
101
   }
101
   }
102
 
102
 
103
-  const onSearch=(e)=>{
104
-    if(e.detail.value==''){
103
+  const onSearch = (e) => {
104
+    if (e.detail.value == '') {
105
       getRoomList({ hotelId: hotel.hotelId }).then((res) => {
105
       getRoomList({ hotelId: hotel.hotelId }).then((res) => {
106
         setDetail(res.records || [])
106
         setDetail(res.records || [])
107
       })
107
       })
108
     }
108
     }
109
-    else{
110
-      getRoomList({ hotelId: hotel.hotelId,roomName:e.detail.value }).then((res) => {
111
-      setDetail(res.records || [])
112
-    })
113
-    }    
109
+    else {
110
+      getRoomList({ hotelId: hotel.hotelId, roomName: e.detail.value }).then((res) => {
111
+        setDetail(res.records || [])
112
+      })
113
+    }
114
   }
114
   }
115
   return (
115
   return (
116
     <view>
116
     <view>
117
       <view style={{ padding: '0 30rpx', height: '100%' }}>
117
       <view style={{ padding: '0 30rpx', height: '100%' }}>
118
-        <SearchBar placeholder='请输入房源名搜索' onBlur={onSearch}/>
118
+        <SearchBar placeholder='请输入房源名搜索' onBlur={onSearch} />
119
         <ShareRoom showCutover={showCutover} onClose={onClose} room={room} onFinish={handleFinish} />
119
         <ShareRoom showCutover={showCutover} onClose={onClose} room={room} onFinish={handleFinish} />
120
         <ShareCard showCutover={showCard} onClose={onClose2} />
120
         <ShareCard showCutover={showCard} onClose={onClose2} />
121
         <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 244px)' }}>
121
         <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 244px)' }}>
122
           {
122
           {
123
             (detail || []).map((item) =>
123
             (detail || []).map((item) =>
124
-              <view className='houseCard' onClick={()=>{handelDetail(item)}}>
125
-                <view className='houseName'>{item.roomName||''}</view>
124
+              <view className='houseCard'>
125
+                <view className='houseName' onClick={() => { handelDetail(item) }} >{item.roomName || ''}</view>
126
                 <view className='operation'>
126
                 <view className='operation'>
127
                   <view onClick={() => handelOrder(item)}><image src={see} />查看入住人</view>
127
                   <view onClick={() => handelOrder(item)}><image src={see} />查看入住人</view>
128
                   <view onClick={() => ShowMoldeOn(item)}><image src={share} />分享链接</view>
128
                   <view onClick={() => ShowMoldeOn(item)}><image src={share} />分享链接</view>