李志伟 3 years ago
parent
commit
88518357bb

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

84
   const handelOrder = (val) => {
84
   const handelOrder = (val) => {
85
     Taro.navigateTo({ url: `/hotel/pages/landlord/roomOrder/roomOrder?roomId=${val.roomId}&roomName=${val.roomName}` });
85
     Taro.navigateTo({ url: `/hotel/pages/landlord/roomOrder/roomOrder?roomId=${val.roomId}&roomName=${val.roomName}` });
86
   }
86
   }
87
+
88
+  const onSearch=(e)=>{
89
+    console.log(e.detail.value);
90
+  }
87
   return (
91
   return (
88
     <view>
92
     <view>
89
       <view style={{ padding: '0 30rpx', height: '100%' }}>
93
       <view style={{ padding: '0 30rpx', height: '100%' }}>
92
           <image className='searchicon' src={iconsearch} />
96
           <image className='searchicon' src={iconsearch} />
93
           <view className="searchword">请输入关键字搜索</view>
97
           <view className="searchword">请输入关键字搜索</view>
94
         </view>
98
         </view>
99
+        <mp-searchbar onBlur={onSearch}></mp-searchbar>
100
+
95
         <ShareRoom showCutover={showCutover} onClose={onClose} room={room} onFinish={handleFinish} />
101
         <ShareRoom showCutover={showCutover} onClose={onClose} room={room} onFinish={handleFinish} />
96
         <ShareCard showCutover={showCard} onClose={onClose} />
102
         <ShareCard showCutover={showCard} onClose={onClose} />
97
         <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 255px)' }}>
103
         <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 255px)' }}>

+ 2
- 1
src/hotel/pages/landlord/landlord.config.js View File

4
   styleIsolation: 'shared',
4
   styleIsolation: 'shared',
5
   usingComponents: {
5
   usingComponents: {
6
     "mp-tabbar": "weui-miniprogram/tabbar/tabbar",
6
     "mp-tabbar": "weui-miniprogram/tabbar/tabbar",
7
-    "mp-dialog": "weui-miniprogram/dialog/dialog"
7
+    "mp-dialog": "weui-miniprogram/dialog/dialog",
8
+    "mp-searchbar": "weui-miniprogram/searchbar/searchbar"
8
   },
9
   },
9
   enableShareAppMessage: true
10
   enableShareAppMessage: true
10
 }
11
 }

+ 1
- 9
src/pages/index/index.jsx View File

18
   const { params, path } = router
18
   const { params, path } = router
19
   const { tab } = params || {}
19
   const { tab } = params || {}
20
   const [currentTab, setCurrentTab] = useState(0)
20
   const [currentTab, setCurrentTab] = useState(0)
21
-
22
-
23
-
24
   const handleTabChange = (e) => {
21
   const handleTabChange = (e) => {
25
     const { index } = e.detail
22
     const { index } = e.detail
26
     setCurrentTab(index)
23
     setCurrentTab(index)
27
   }
24
   }
28
-
29
-
30
-
31
   useEffect(() => {
25
   useEffect(() => {
32
     if (tab) {
26
     if (tab) {
33
       setCurrentTab(tab - 0)
27
       setCurrentTab(tab - 0)
48
         <mp-tabbar extClass='custom-tabbar' current={currentTab} list={tabList} onChange={handleTabChange}></mp-tabbar>
42
         <mp-tabbar extClass='custom-tabbar' current={currentTab} list={tabList} onChange={handleTabChange}></mp-tabbar>
49
       </view>
43
       </view>
50
     </view>
44
     </view>
51
-
52
   )
45
   )
53
-
54
-})
46
+})