吃个甘蔗嚼一年 vor 3 Jahren
Ursprung
Commit
a73727bd41

+ 16
- 12
src/hotel/components/HouseManage/houseManage.jsx Datei anzeigen

@@ -137,7 +137,7 @@ export default React.forwardRef((props, ref) => {
137 137
     }
138 138
   }
139 139
   //本店指南
140
-  const [loading,setLoading]=useState(false)
140
+  const [loading, setLoading] = useState(false)
141 141
   const handelCopy = (e, val) => {
142 142
     //阻止冒泡不允许执行父元素的点击事件
143 143
     e.stopPropagation()
@@ -154,12 +154,12 @@ export default React.forwardRef((props, ref) => {
154 154
           //如果原房源有更多指引查出列表遍历每条拿出来放到新的房源的更多指引里
155 155
           res2.records.map((item) => {
156 156
             saveExtend({ ...item, targetId: res.roomId })
157
-          }) :null
158
-          setLoading(false)
159
-          Taro.showToast({
160
-            title: '复制房源成功',
161
-            icon: 'none',
162
-          })
157
+          }) : null
158
+        setLoading(false)
159
+        Taro.showToast({
160
+          title: '复制房源成功',
161
+          icon: 'none',
162
+        })
163 163
         setDetail([...detail.slice(0, copy), res, ...detail.slice(copy)])
164 164
       })
165 165
     })
@@ -174,8 +174,10 @@ export default React.forwardRef((props, ref) => {
174 174
   }
175 175
   return (
176 176
     <View style={{ padding: '0 30rpx', height: '100%', display: 'flex', flexDirection: 'column' }}>
177
-      <Spin3 show={loading} />
178
-      <ToggleRole role='hotel' showCutover={showCutover3} maskClosable={showCutover3} onClose={onClose3} />
177
+      <View style={{ flex: 'none' }}>
178
+        <Spin3 show={loading} />
179
+        <ToggleRole role='hotel' showCutover={showCutover3} maskClosable={showCutover3} onClose={onClose3} />
180
+      </View>
179 181
       <View style={{ flex: 'none' }}>
180 182
         <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder="请选择民宿" value={hotel?.hotelId} kv={['hotelName', 'hotelId']} dicts={hotelList} onChange={handleHotelChange} /></view>
181 183
         <view onClick={ShowMoldeOn3} className='User-info-cutover'>
@@ -185,9 +187,11 @@ export default React.forwardRef((props, ref) => {
185 187
       <View style={{ flex: 'none' }}>
186 188
         <SearchBar placeholder='请输入房源名搜索' onBlur={onSearch} />
187 189
       </View>
188
-      <ShareRoom showCutover={showCutover} onClose={onClose} room={room} onFinish={handleFinish} />
189
-      <ShareCard showCutover={showCard} onClose={onClose2} />
190
-      <View style={{ flex: 'auto', overflow: 'hidden', position: 'relative' }}>
190
+      <View style={{ flex: 'none' }}>
191
+        <ShareRoom showCutover={showCutover} onClose={onClose} room={room} onFinish={handleFinish} />
192
+        <ShareCard showCutover={showCard} onClose={onClose2} />
193
+      </View>
194
+      <View style={{ flex: '1', overflow: 'hidden' }}>
191 195
         <List
192 196
           style={{ height: '100%' }}
193 197
           request={getRoomList}

+ 1
- 2
src/hotel/components/Income/income.jsx Datei anzeigen

@@ -51,14 +51,13 @@ export default (props) => {
51 51
         </view>
52 52
       </view>
53 53
       <view className='title' style={{flex:'none'}}>推广收入记录</view>
54
-      <View style={{flex:'auto',overflow:'hidden',position:'relative'}}>
54
+      <View style={{flex:1,overflow:'hidden'}}>
55 55
         <List
56 56
           style={{ height: '100%' }}
57 57
           request={fetchAPI}
58 58
           params={queryParams}
59 59
           noData={<NoData />}
60 60
           refresherEnabled={false}
61
-
62 61
           render={({ item, index }) => (
63 62
             <view className='spreadCard' key={index}>
64 63
               <view className='card'>

+ 12
- 13
src/hotel/pages/components/Extend/index.jsx Datei anzeigen

@@ -31,6 +31,7 @@ export default (props) => {
31 31
     setShowCutover(true)
32 32
   }
33 33
   const onClose = () => {
34
+    setContent2(content)
34 35
     setShowCutover(false)
35 36
     setReset(true)
36 37
   }
@@ -61,20 +62,18 @@ export default (props) => {
61 62
     newstr = newstr.substr(0, i + 1);
62 63
     return newstr;
63 64
   }
65
+  const [content2,setContent2]=useState(content)
64 66
   const handelEdit = () => {
65
-    // var content = document.getElementById('content').value
66
-
67
-    // content = content.replace(/\n/g, '');
68
-    // if (javaTrim(content) == '') {
69
-    //   Taro.showToast({
70
-    //     title: '您还没有添加文字哦',
71
-    //     icon: 'none'
72
-    //   })
73
-    //   return;
74
-    // }
75
-    // setContent(content)
67
+    if (javaTrim(content2) == '') {
68
+      Taro.showToast({
69
+        title: '您还没有添加文字哦',
70
+        icon: 'none'
71
+      })
72
+      return;
73
+    }
74
+    setContent(content2)
76 75
     const date = {
77
-      content,
76
+      content:content2,
78 77
       contentType: 'text'
79 78
     }
80 79
     update(item.extId, { ...item, ...date })
@@ -88,7 +87,7 @@ export default (props) => {
88 87
             <View className='rzline' /><Label className='srl mg'>修改文字</Label><View className='rzline' />
89 88
           </View>
90 89
           <View>
91
-            <Textarea className='storezn' value={content} id='content' onInput={e => setContent(e.detail.value)} />
90
+            <Textarea className='storezn' value={content2} onInput={e => setContent2(e.detail.value)} />
92 91
           </View>
93 92
           <View>
94 93
             <Button className='cancel' onClick={onClose}>取消</Button>

+ 1
- 1
src/hotel/pages/landlord/addRoom/addRoom.jsx Datei anzeigen

@@ -173,7 +173,7 @@ export default withLayout((props) => {
173 173
         <CustomNav title={hotelName} />
174 174
       </view>
175 175
       <view className='roomDetail' style={{ height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }} >
176
-        <scroll-view scrollY style={{ height: '100%', position: 'relative', overflow: "hidden", flex: 'auto' }}>
176
+        <scroll-view scrollY style={{ height: '100%',  overflow: "hidden", flex:1 }}>
177 177
           <View id='det'>
178 178
             <Popup show={showCutover} onClose={onClose}>
179 179
               <View className='editword'>

+ 24
- 22
src/pages/index/tabs/Recommend.jsx Datei anzeigen

@@ -1,9 +1,11 @@
1
-import Taro from '@tarojs/taro'
1
+import Taro, { useDidShow } from '@tarojs/taro'
2 2
 import { React, useState, useEffect, useRef, useMemo } from 'react'
3 3
 import iconsearch from '@/assets/icons/housemantj/search.png'
4 4
 import locationimg from '@/assets/icons/housemantj/location.png'
5 5
 import Tip from '@/components/tip'
6 6
 import List from '@/components/List';
7
+import NoData from '@/components/NoData'
8
+import Waterfall from '@/components/MasonryLayout/Waterfall';
7 9
 import MasonryLayout from '@/components/MasonryLayout';
8 10
 import { getIndexType, getResourceList } from '@/services/home'
9 11
 import { random } from '@/utils'
@@ -11,7 +13,7 @@ import Card from '../components/Card'
11 13
 import './less/Recommend.less'
12 14
 import { OfficialAccount } from '@tarojs/components'
13 15
 
14
-const listStyle = { height: 'calc(100% - 145px)' }
16
+const listStyle = { height: '100%' }
15 17
 
16 18
 export default (props) => {
17 19
   const { router, person, location } = props
@@ -76,7 +78,7 @@ export default (props) => {
76 78
   // })
77 79
 
78 80
   return (
79
-    <>
81
+    <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
80 82
       <OfficialAccount>s21</OfficialAccount>
81 83
       <view className='search' onClick={onSearch} >
82 84
         <input className='searchInput' disabled />
@@ -103,24 +105,24 @@ export default (props) => {
103 105
           </mp-tabs>
104 106
         </scroll-view>
105 107
       </view>
106
-
107
-      <List
108
-        ref={listRef}
109
-        style={listStyle}
110
-        request={getResourceList}
111
-        params={queryParams}
112
-        refresherEnabled={false}
113
-        onDataChange={handleDataChange}
114
-      >
115
-        <view style={{ padding: '30rpx 15rpx' }}>
116
-          <MasonryLayout
117
-            itemKey='resourceNo'
118
-            listData={listData}
119
-            render={(item) => <Card item={item} />}
120
-          />
121
-        </view>
122
-      </List>
123
-
124
-    </>
108
+      <view className={listClass} style={{ flex: '1', overflow: 'hidden' }}>
109
+        <List
110
+          ref={listRef}
111
+          style={listStyle}
112
+          request={getResourceList}
113
+          params={queryParams}
114
+          refresherEnabled={false}
115
+          onDataChange={handleDataChange}
116
+        >
117
+          <view style={{ padding: '30rpx 15rpx' }}>
118
+            <MasonryLayout
119
+              itemKey='resourceNo'
120
+              listData={listData}
121
+              render={(item, callback) => <Card item={item} onImageLoad={callback} />}
122
+            />
123
+          </view>
124
+        </List>
125
+      </view>
126
+    </view>
125 127
   )
126 128
 }