李志伟 3 years ago
parent
commit
88518357bb

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

@@ -84,6 +84,10 @@ export default React.forwardRef((props, ref) => {
84 84
   const handelOrder = (val) => {
85 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 91
   return (
88 92
     <view>
89 93
       <view style={{ padding: '0 30rpx', height: '100%' }}>
@@ -92,6 +96,8 @@ export default React.forwardRef((props, ref) => {
92 96
           <image className='searchicon' src={iconsearch} />
93 97
           <view className="searchword">请输入关键字搜索</view>
94 98
         </view>
99
+        <mp-searchbar onBlur={onSearch}></mp-searchbar>
100
+
95 101
         <ShareRoom showCutover={showCutover} onClose={onClose} room={room} onFinish={handleFinish} />
96 102
         <ShareCard showCutover={showCard} onClose={onClose} />
97 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,7 +4,8 @@ export default {
4 4
   styleIsolation: 'shared',
5 5
   usingComponents: {
6 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 10
   enableShareAppMessage: true
10 11
 }

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

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