吃个甘蔗嚼一年 3 anni fa
parent
commit
24886ed493

+ 2
- 2
src/hotel/pages/landlord/addRoom/addRoom.jsx Vedi File

@@ -185,7 +185,7 @@ export default withLayout((props) => {
185 185
             <mp-cells title='房屋位置'>
186 186
               <mp-cell>
187 187
                 <Input style={{ color: '#000', fontWeight: 'bold', marginBottom: '13px' }} onInput={(e) => setRoomModel({ ...roomModel, address: e.detail.value })} value={roomModel.address} placeholder='请输入房屋位置(必填)' />
188
-                <Label style={{ color: '#666' }} onClick={onRoomMap}>{isError(roomModel.location)? '房间定位(必填)' : roomModel.location}</Label>
188
+                <Label style={{ color: '#666' }} onClick={onRoomMap}>{isError(roomModel.location) ? '房间定位(必填)' : roomModel.location}</Label>
189 189
               </mp-cell>
190 190
             </mp-cells>
191 191
             {
@@ -193,7 +193,7 @@ export default withLayout((props) => {
193 193
                 <mp-cells title='停车场位置'>
194 194
                   <mp-cell>
195 195
                     <Input onInput={(e) => setRoomModel({ ...roomModel, parkingAddress: e.detail.value })} value={roomModel.parkingAddress} placeholder='请输入停车场位置' />
196
-                    <Label style={{ color: '#666', lineHeight: '30px' }} onClick={onParkMap}>{isError(roomModel.parkingLocation)? '停车场定位' : roomModel.parkingLocation}</Label>
196
+                    <Label style={{ color: '#666', lineHeight: '30px' }} onClick={onParkMap}>{isError(roomModel.parkingLocation) ? '停车场定位' : roomModel.parkingLocation}</Label>
197 197
                   </mp-cell>
198 198
                 </mp-cells> : null
199 199
             }

+ 14
- 14
src/hotel/pages/landlord/addRoom/addRoom.less Vedi File

@@ -1,16 +1,16 @@
1
-.roomDetail{
1
+.roomDetail {
2 2
   padding: 30px;
3
-  background-color: #F8F8F8;
4
-  .weui-cells__title{
3
+  background-color: #f8f8f8;
4
+  .weui-cells__title {
5 5
     font-size: 34px;
6 6
   }
7
-  .weui-cells_after-title{
7
+  .weui-cells_after-title {
8 8
     border-radius: 50px;
9 9
     font-size: 30px;
10 10
     margin-top: 40px;
11 11
   }
12
-    
13
-  .adds{
12
+
13
+  .adds {
14 14
     width: 100%;
15 15
     background-color: #fff;
16 16
     border-radius: 12px;
@@ -18,11 +18,11 @@
18 18
     margin-top: 20px;
19 19
     padding: 30px;
20 20
     position: relative;
21
-    .zuobian{
21
+    .zuobian {
22 22
       text-align: left;
23
-      font-size: 32px;      
23
+      font-size: 32px;
24 24
     }
25
-    .add{
25
+    .add {
26 26
       position: absolute;
27 27
       right: 90px;
28 28
       height: 60px;
@@ -34,15 +34,15 @@
34 34
       border-radius: 12px;
35 35
       letter-spacing: 5px;
36 36
       text-align: center;
37
-      .jiahao{        
37
+      .jiahao {
38 38
         font-size: 48px;
39 39
       }
40
-      .zengjia{
40
+      .zengjia {
41 41
         position: relative;
42
-        bottom:  4px;
42
+        bottom: 4px;
43 43
       }
44 44
     }
45
-  }  
45
+  }
46 46
   .button-OK {
47 47
     height: 92px;
48 48
     background: #274291;
@@ -54,4 +54,4 @@
54 54
     font-weight: bold;
55 55
     color: #fff;
56 56
   }
57
-}
57
+}

+ 17
- 6
src/pages/PayOrder/index.jsx Vedi File

@@ -44,12 +44,22 @@ export default withLayout((props) => {
44 44
     setShowDialog(false);
45 45
   };
46 46
   const ButtonOK = (e) => {
47
-    setList(
48
-      list.map((x) =>
49
-        x.packageId == detail.packageId ? { ...x, amount: BuyNumber } : x
50
-      )
51
-    );
52
-    setShowDialog(false);
47
+
48
+    if (BuyNumber <= 0) {
49
+      Taro.showToast({
50
+        title: '最少需要一笔订单哦',
51
+        icon: 'none',
52
+        duration: 2000
53
+      })
54
+    } else {
55
+      setList(
56
+        list.map((x) =>
57
+          x.packageId == detail.packageId ? { ...x, amount: BuyNumber } : x
58
+        )
59
+      );
60
+      setShowDialog(false);
61
+
62
+    }
53 63
   };
54 64
 
55 65
   const NumberAdd = () => {
@@ -186,6 +196,7 @@ export default withLayout((props) => {
186 196
     setTotalPrice(total);
187 197
   }, [list]);
188 198
 
199
+
189 200
   return (
190 201
     !person.phone ? <AuthPage /> :
191 202
       <view class='page-index container'>