吃个甘蔗嚼一年 3 years ago
parent
commit
24886ed493

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

185
             <mp-cells title='房屋位置'>
185
             <mp-cells title='房屋位置'>
186
               <mp-cell>
186
               <mp-cell>
187
                 <Input style={{ color: '#000', fontWeight: 'bold', marginBottom: '13px' }} onInput={(e) => setRoomModel({ ...roomModel, address: e.detail.value })} value={roomModel.address} placeholder='请输入房屋位置(必填)' />
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
               </mp-cell>
189
               </mp-cell>
190
             </mp-cells>
190
             </mp-cells>
191
             {
191
             {
193
                 <mp-cells title='停车场位置'>
193
                 <mp-cells title='停车场位置'>
194
                   <mp-cell>
194
                   <mp-cell>
195
                     <Input onInput={(e) => setRoomModel({ ...roomModel, parkingAddress: e.detail.value })} value={roomModel.parkingAddress} placeholder='请输入停车场位置' />
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
                   </mp-cell>
197
                   </mp-cell>
198
                 </mp-cells> : null
198
                 </mp-cells> : null
199
             }
199
             }

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

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

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

44
     setShowDialog(false);
44
     setShowDialog(false);
45
   };
45
   };
46
   const ButtonOK = (e) => {
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
   const NumberAdd = () => {
65
   const NumberAdd = () => {
186
     setTotalPrice(total);
196
     setTotalPrice(total);
187
   }, [list]);
197
   }, [list]);
188
 
198
 
199
+
189
   return (
200
   return (
190
     !person.phone ? <AuthPage /> :
201
     !person.phone ? <AuthPage /> :
191
       <view class='page-index container'>
202
       <view class='page-index container'>