Explorar el Código

Merge branch 'dev' of http://git.ycjcjy.com/shigongli/miniapp-v2 into dev

李志伟 hace 3 años
padre
commit
f333451974

+ 21
- 0
src/components/SearchBar/index.jsx Ver fichero

@@ -0,0 +1,21 @@
1
+import Taro, { View } from "@tarojs/components"
2
+
3
+import './style.less'
4
+
5
+export default (props) => {
6
+
7
+  const { placeholder, onBlur } = props
8
+
9
+
10
+
11
+
12
+  return (
13
+    <View className='search'>
14
+      <mp-searchbar
15
+        placeholder={placeholder}
16
+        onBlur={onBlur}
17
+      >
18
+      </mp-searchbar>
19
+    </View>
20
+  )
21
+}

+ 41
- 0
src/components/SearchBar/style.less Ver fichero

@@ -0,0 +1,41 @@
1
+
2
+.search{
3
+  margin: 35px 0;
4
+  .weui-search-bar{
5
+    padding: 0px;
6
+    border-radius: 45px;
7
+    background: #F8F8F8;
8
+
9
+    .weui-search-bar__label{
10
+      background: #F8F8F8;
11
+    }
12
+    .weui-search-bar__form{
13
+      border-radius: 45px;
14
+      background: #F8F8F8;
15
+      
16
+
17
+    }
18
+
19
+    .weui-search-bar__label{
20
+      border-radius: 45px;
21
+      background: #F8F8F8;
22
+
23
+
24
+    }
25
+    .weui-search-bar__input{
26
+      text-align: center;
27
+      background: #F8F8F8;
28
+
29
+    }
30
+  
31
+    .weui-search-bar__cancel-btn{
32
+      position: relative;
33
+      left: -10px;
34
+      font-size: 31px;
35
+      padding-left: 5px;
36
+      background: #F8F8F8;
37
+
38
+
39
+    }
40
+  }
41
+}

+ 0
- 1
src/pages/RoomOrder/index.jsx Ver fichero

@@ -9,7 +9,6 @@ import './style.less'
9 9
 
10 10
 
11 11
 
12
-
13 12
 export default withLayout((props) => {
14 13
   const { router, person } = props
15 14
   const { roomId, roomOrderId, status } = router.params

+ 10
- 18
src/shop/components/ShopKeeper/shopKeeper.jsx Ver fichero

@@ -5,6 +5,7 @@ import Picker from '@/components/Picker'
5 5
 import Popup from '@/components/Popup'
6 6
 import ShopUsed from '@/components/ShopUsed' //已核销
7 7
 import ShopUnused from '@/components/ShopUnused' //未核销
8
+import SearchBar from '@/components/SearchBar'
8 9
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
9 10
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
10 11
 import iconsearch from '@/assets/icons/housemantj/search.png'
@@ -42,24 +43,16 @@ export default (props) => {
42 43
   }
43 44
 
44 45
 
45
-  //搜索
46
-  const search = (value) => {
47
-    console.log(value);
48 46
 
49
-    return new Promise((resolve, reject) => {
50
-      console.log(resolve, reject);
51
-      resolve([{ text: '搜索结果', value: 1 }, { text: '搜索结果2', value: 2 }])
52 47
 
53
-    })
54
-  }
55
-  const handeInput = (e) => {
56
-    const value = e.detail.value
57
-    console.log("🚀 ~ file: shopKeeper.jsx ~ line 57 ~ handeInput ~ value", value)
58 48
 
59 49
 
60
-  }
50
+  const handleChange = (e) => {
51
+    console.log("🚀 ~ file: shopKeeper.jsx ~ line 67 ~ handleChange ~ e", e)
61 52
 
62 53
 
54
+  }
55
+
63 56
 
64 57
   useEffect(() => {
65 58
     if (tabJump) {
@@ -80,6 +73,9 @@ export default (props) => {
80 73
     },
81 74
   ]
82 75
 
76
+  const onSeacrh = (e) => {
77
+    console.log('eeeeeeeeeeeeeeeeee', e.detail.value);
78
+  }
83 79
 
84 80
   const [showCutover, setShowCutover] = useState(false)
85 81
   const ShowMoldeOn = () => {
@@ -120,12 +116,8 @@ export default (props) => {
120 116
             </view>
121 117
           </view>
122 118
           <view className='search'>
123
-            <mp-searchbar
124
-              placeholder='搜索订单(输入客户手机号码)'
125
-              search={search}
126
-              onInput={(e) => handeInput(e)}
127
-            >
128
-            </mp-searchbar>
119
+
120
+            <SearchBar placeholder='搜索订单(输入客户手机号码)' onBlur={onSeacrh} />
129 121
           </view>
130 122
           <view className='index-tabs'>
131 123
             <mp-tabs

+ 0
- 40
src/shop/components/ShopKeeper/shopKeeper.less Ver fichero

@@ -145,46 +145,6 @@
145 145
   }
146 146
 }
147 147
 
148
-.search{
149
-  margin: 35px 0;
150
-  .weui-search-bar{
151
-    padding: 0px;
152
-    border-radius: 45px;
153
-    background: #F8F8F8;
154
-
155
-    .weui-search-bar__label{
156
-      background: #F8F8F8;
157
-    }
158
-    .weui-search-bar__form{
159
-      border-radius: 45px;
160
-      background: #F8F8F8;
161
-      
162
-
163
-    }
164
-
165
-    .weui-search-bar__label{
166
-      border-radius: 45px;
167
-      background: #F8F8F8;
168
-
169
-
170
-    }
171
-    .weui-search-bar__input{
172
-      text-align: center;
173
-      background: #F8F8F8;
174
-
175
-    }
176
-  
177
-    .weui-search-bar__cancel-btn{
178
-      position: relative;
179
-      left: -10px;
180
-      font-size: 31px;
181
-      padding-left: 5px;
182
-      background: #F8F8F8;
183
-
184
-
185
-    }
186
-  }
187
-}
188 148
 
189 149
 
190 150
 .index-tabs {