ソースを参照

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

张延森 3 年 前
コミット
fd941f0cb0
共有2 個のファイルを変更した23 個の追加5 個の削除を含む
  1. 11
    4
      src/hotel/pages/landlord/addRoom/addRoom.jsx
  2. 12
    1
      src/hotel/pages/landlord/addRoom/addRoom.less

+ 11
- 4
src/hotel/pages/landlord/addRoom/addRoom.jsx ファイルの表示

@@ -1,9 +1,10 @@
1 1
 import withLayout from '@/layouts'
2 2
 import Taro from '@tarojs/taro'
3 3
 import CustomNav from '@/components/CustomNav'
4
-import { View, Input, Button, Label, Textarea, Text } from '@tarojs/components';
4
+import { View, Input, Button, Label, Textarea, Text,Image } from '@tarojs/components';
5 5
 import { useEffect, useState } from "react"
6 6
 import { saveRoom, getRoomDetail, updateRoom } from '@/services/landlord'
7
+import GPS from '@/assets/icons/GuideCheck/GPS.png'
7 8
 import { getExtendContent } from "@/services/home";
8 9
 import { saveExtend } from '@/services/landlord'
9 10
 //export default是导出模块的   export也是导出模块的    如果引用时不加{}就是引用默认模块加了就是引用相应的模块
@@ -188,16 +189,22 @@ export default withLayout((props) => {
188 189
             </mp-cells>
189 190
             <mp-cells title='房屋位置'>
190 191
               <mp-cell>
191
-                <Input style={{ color: '#000', fontWeight: 'bold', marginBottom: '13px' }} onInput={(e) => setRoomModel({ ...roomModel, address: e.detail.value })} value={roomModel.address} placeholder='请输入房屋位置(必填)' />
192
-                <Label style={{ color: '#666' }} onClick={onRoomMap}>{isError(roomModel.location) ? '房间定位(必填)' : roomModel.location}</Label>
192
+                <View className='roomloc'>
193
+                <Input style={{ color: '#000', fontWeight: 'bold'}} onInput={(e) => setRoomModel({ ...roomModel, address: e.detail.value })} value={roomModel.address} placeholder='请输入房屋位置(必填)' />
194
+                <Label style={{display:'none' }} onClick={onRoomMap}>{isError(roomModel.location) ? '房间定位(必填)' : roomModel.location}</Label>
195
+                <Image className='location' src={GPS} onClick={onRoomMap} />
196
+                </View>
193 197
               </mp-cell>
194 198
             </mp-cells>
195 199
             {
196 200
               paddress != '' ?
197 201
                 <mp-cells title='停车场位置'>
198 202
                   <mp-cell>
203
+                  <View className='roomloc'>
199 204
                     <Input onInput={(e) => setRoomModel({ ...roomModel, parkingAddress: e.detail.value })} value={roomModel.parkingAddress} placeholder='请输入停车场位置' />
200
-                    <Label style={{ color: '#666', lineHeight: '30px' }} onClick={onParkMap}>{isError(roomModel.parkingLocation) ? '停车场定位' : roomModel.parkingLocation}</Label>
205
+                    <Label style={{ color: '#666', lineHeight: '30px',display:'none' }} onClick={onParkMap}>{isError(roomModel.parkingLocation) ? '停车场定位' : roomModel.parkingLocation}</Label>
206
+                    <Image className='location' src={GPS} onClick={onParkMap} />
207
+                    </View>
201 208
                   </mp-cell>
202 209
                 </mp-cells> : null
203 210
             }

+ 12
- 1
src/hotel/pages/landlord/addRoom/addRoom.less ファイルの表示

@@ -9,7 +9,18 @@
9 9
     font-size: 30px;
10 10
     margin-top: 40px;
11 11
   }
12
-
12
+  .roomloc{
13
+    position: relative;
14
+    .location{
15
+      width: 50px;
16
+      height: 50px;
17
+      position:absolute;
18
+      right: 0;
19
+      top: -2px;
20
+      z-index: 999;
21
+    }
22
+  }
23
+  
13 24
   .adds {
14 25
     width: 100%;
15 26
     background-color: #fff;