浏览代码

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

张延森 3 年前
父节点
当前提交
215c28c8d0
共有 3 个文件被更改,包括 38 次插入75 次删除
  1. 14
    59
      src/hotel/components/shareRoom/ShareRoom.jsx
  2. 3
    3
      src/pages/index/tabs/Guide.jsx
  3. 21
    13
      src/pages/index/tabs/GuideCss/style.less

+ 14
- 59
src/hotel/components/shareRoom/ShareRoom.jsx 查看文件

19
     setEndDate(e.detail.value)
19
     setEndDate(e.detail.value)
20
   }
20
   }
21
   const handelShare = () => {
21
   const handelShare = () => {
22
-    if (roomNum != '' && startDate != '' && endDate != '') {
23
-      shareRoom({ hotelId: room.hotelId, personNum: roomNum, roomId: room.roomId, startDate: startDate, endDate: endDate }).then((res) => {
24
-        onFinish(res)
25
-        setStartDate('')
26
-        setEndDate('')
27
-        setRoomNum()
28
-      })
29
-    }
22
+    var myDate = new Date();
23
+    shareRoom({
24
+      hotelId: room.hotelId,
25
+      personNum: roomNum == '' ? 0 : roomNum, roomId: room.roomId,
26
+      startDate: startDate == '' ? myDate.toLocaleDateString() : startDate,
27
+      endDate: endDate == '' ? myDate.toLocaleDateString() : endDate
28
+    }).then((res) => {
29
+      onFinish(res)
30
+      setStartDate('')
31
+      setEndDate('')
32
+      setRoomNum()
33
+    })
34
+
30
   }
35
   }
31
   return (
36
   return (
32
     <Popup show={showCutover} onClose={onClose}>
37
     <Popup show={showCutover} onClose={onClose}>
33
       <View className='from-room srl'>
38
       <View className='from-room srl'>
34
-        <View style={{marginBottom:'25px'}}>
39
+        <View style={{ marginBottom: '25px' }}>
35
           <View className='rzline' /><Label className='srl mg'>请输入入住人信息</Label><View className='rzline' />
40
           <View className='rzline' /><Label className='srl mg'>请输入入住人信息</Label><View className='rzline' />
36
         </View>
41
         </View>
37
         <View className='srleft'>
42
         <View className='srleft'>
54
           <Button className='cancel' onClick={onClose}>取消</Button>
59
           <Button className='cancel' onClick={onClose}>取消</Button>
55
           <Button className='btn' onClick={handelShare}>分享</Button>
60
           <Button className='btn' onClick={handelShare}>分享</Button>
56
         </View>
61
         </View>
57
-
58
-
59
-
60
-
61
-        {/* <mp-form  >
62
-        <Label style={{color:'black'}}>请输入入住人信息</Label>
63
-        <mp-cells    footer='  ' >
64
-          <mp-cell title='入住人数:' extClass='font'>
65
-            <Input focus dataField='nm' onInput={(e) => setRoomNum(e.detail.value)} value={roomNum} type='number' placeholder='请输入入住人数' />
66
-          </mp-cell>
67
-          <mp-cell title='入住开始时间:' extClass='font'>
68
-            <Picker mode='date' onChange={handelStartDate}>
69
-              {startDate == '' ? '请选择入住开始时间' : startDate}
70
-            </Picker>
71
-          </mp-cell>
72
-          <mp-cell title='入住结束时间:' extClass='font'>
73
-            <Picker  mode='date' onChange={handelEndDate}>
74
-            {endDate == '' ? '请选择入住结束时间' : endDate}
75
-          </Picker>
76
-          </mp-cell>
77
-          <mp-cell>
78
-            <Button className='cancel' onClick={onClose}>取消</Button><Button className='btn' onClick={handelShare}>分享</Button>
79
-          </mp-cell>
80
-        </mp-cells>
81
-      </mp-form> */}
82
       </View>
62
       </View>
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-      {/* <View className='from-room'>
91
-        <Label style={{ color: 'black' }}>请输入入住人信息</Label>
92
-        <View className='flex'>
93
-          <Label>入住人数:</Label><Input focus dataField='nm' onInput={(e) => setRoomNum(e.detail.value)} value={roomNum} type='number' placeholder='请输入入住人数' /></View>
94
-        <View className='flex'>
95
-          <Label>入住开始时间:</Label>
96
-          <Picker mode='date' className='picker' onChange={handelStartDate}>
97
-            {startDate == '' ? '请选择入住开始时间' : startDate}
98
-          </Picker>
99
-        </View>
100
-        <View className='flex'>
101
-          <Label>入住结束时间:</Label>
102
-          <Picker className='picker' mode='date' onChange={handelEndDate}>
103
-            {endDate == '' ? '请选择入住结束时间' : endDate}
104
-          </Picker>
105
-        </View>
106
-        <View><Button className='cancel' onClick={onClose}>取消</Button><Button className='btn' onClick={handelShare}>分享</Button></View>
107
-      </View> */}
108
     </Popup>
63
     </Popup>
109
   )
64
   )
110
 }
65
 }

+ 3
- 3
src/pages/index/tabs/Guide.jsx 查看文件

88
         setAllextNum(res.total)
88
         setAllextNum(res.total)
89
         setNewextNum(res.records.length)
89
         setNewextNum(res.records.length)
90
       })
90
       })
91
-      getRecommendList({ location: RoomLocation }).then((res) => {
92
-        setPackage(res || [])
93
-      })
91
+      // getRecommendList({ location: RoomLocation }).then((res) => {
92
+      //   setPackage(res || [])
93
+      // })
94
 
94
 
95
 
95
 
96
     } else {
96
     } else {

+ 21
- 13
src/pages/index/tabs/GuideCss/style.less 查看文件

39
       margin-left: 30px;
39
       margin-left: 30px;
40
 
40
 
41
       .MessageCard-name {
41
       .MessageCard-name {
42
-        width: 400px;
43
         height: 40px;
42
         height: 40px;
44
         font-size: 32px;
43
         font-size: 32px;
45
         font-weight: bold;
44
         font-weight: bold;
50
         white-space: nowrap;
49
         white-space: nowrap;
51
       }
50
       }
52
       .MessageCard-info {
51
       .MessageCard-info {
52
+        display: flex;
53
+        width: 998em;
53
         height: 23px;
54
         height: 23px;
54
         font-size: 24px;
55
         font-size: 24px;
55
         font-weight: 400;
56
         font-weight: 400;
178
       margin-left: 30px;
179
       margin-left: 30px;
179
 
180
 
180
       .MessageCard-name-hotle {
181
       .MessageCard-name-hotle {
181
-  
182
-        width: 100%;
183
-        /* height: 40rpx; */
184
-        font-size: 32px;
185
-        font-weight: bold;
186
-        color: #202020;
187
-        line-height: 44px;
188
-        /* overflow: hidden; */
189
-        /* -o-text-overflow: ellipsis; */
190
-        text-overflow: ellipsis;
191
-        /* white-space: nowrap; */
192
-        display: flex;
182
+        // width: 100%;
183
+        // font-size: 32px;
184
+        // font-weight: bold;
185
+        // color: #202020;
186
+        // line-height: 44px;
187
+        // display: flex;
188
+
189
+    font-size: 32px;
190
+    font-weight: bold;
191
+    color: #202020;
192
+    line-height: 44px;
193
+    display: flex;
194
+    overflow: hidden;
195
+    -webkit-line-clamp: 2;
196
+    text-overflow: ellipsis;
197
+    -webkit-box-orient: vertical;
198
+    display: -webkit-box;
199
+        
193
       }
200
       }
194
       .MessageCard-info-hotle {
201
       .MessageCard-info-hotle {
195
         height: 23px;
202
         height: 23px;
209
       text-align: center;
216
       text-align: center;
210
       display: inline-block;
217
       display: inline-block;
211
       left: 1.5em;
218
       left: 1.5em;
219
+      top: -48px;
212
       .MessageCard-image-hotle {
220
       .MessageCard-image-hotle {
213
         width: 30px;
221
         width: 30px;
214
         height: 30px;
222
         height: 30px;