吃个甘蔗嚼一年 3 vuotta sitten
vanhempi
commit
a73727bd41

+ 16
- 12
src/hotel/components/HouseManage/houseManage.jsx Näytä tiedosto

137
     }
137
     }
138
   }
138
   }
139
   //本店指南
139
   //本店指南
140
-  const [loading,setLoading]=useState(false)
140
+  const [loading, setLoading] = useState(false)
141
   const handelCopy = (e, val) => {
141
   const handelCopy = (e, val) => {
142
     //阻止冒泡不允许执行父元素的点击事件
142
     //阻止冒泡不允许执行父元素的点击事件
143
     e.stopPropagation()
143
     e.stopPropagation()
154
           //如果原房源有更多指引查出列表遍历每条拿出来放到新的房源的更多指引里
154
           //如果原房源有更多指引查出列表遍历每条拿出来放到新的房源的更多指引里
155
           res2.records.map((item) => {
155
           res2.records.map((item) => {
156
             saveExtend({ ...item, targetId: res.roomId })
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
         setDetail([...detail.slice(0, copy), res, ...detail.slice(copy)])
163
         setDetail([...detail.slice(0, copy), res, ...detail.slice(copy)])
164
       })
164
       })
165
     })
165
     })
174
   }
174
   }
175
   return (
175
   return (
176
     <View style={{ padding: '0 30rpx', height: '100%', display: 'flex', flexDirection: 'column' }}>
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
       <View style={{ flex: 'none' }}>
181
       <View style={{ flex: 'none' }}>
180
         <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder="请选择民宿" value={hotel?.hotelId} kv={['hotelName', 'hotelId']} dicts={hotelList} onChange={handleHotelChange} /></view>
182
         <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder="请选择民宿" value={hotel?.hotelId} kv={['hotelName', 'hotelId']} dicts={hotelList} onChange={handleHotelChange} /></view>
181
         <view onClick={ShowMoldeOn3} className='User-info-cutover'>
183
         <view onClick={ShowMoldeOn3} className='User-info-cutover'>
185
       <View style={{ flex: 'none' }}>
187
       <View style={{ flex: 'none' }}>
186
         <SearchBar placeholder='请输入房源名搜索' onBlur={onSearch} />
188
         <SearchBar placeholder='请输入房源名搜索' onBlur={onSearch} />
187
       </View>
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
         <List
195
         <List
192
           style={{ height: '100%' }}
196
           style={{ height: '100%' }}
193
           request={getRoomList}
197
           request={getRoomList}

+ 1
- 2
src/hotel/components/Income/income.jsx Näytä tiedosto

51
         </view>
51
         </view>
52
       </view>
52
       </view>
53
       <view className='title' style={{flex:'none'}}>推广收入记录</view>
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
         <List
55
         <List
56
           style={{ height: '100%' }}
56
           style={{ height: '100%' }}
57
           request={fetchAPI}
57
           request={fetchAPI}
58
           params={queryParams}
58
           params={queryParams}
59
           noData={<NoData />}
59
           noData={<NoData />}
60
           refresherEnabled={false}
60
           refresherEnabled={false}
61
-
62
           render={({ item, index }) => (
61
           render={({ item, index }) => (
63
             <view className='spreadCard' key={index}>
62
             <view className='spreadCard' key={index}>
64
               <view className='card'>
63
               <view className='card'>

+ 12
- 13
src/hotel/pages/components/Extend/index.jsx Näytä tiedosto

31
     setShowCutover(true)
31
     setShowCutover(true)
32
   }
32
   }
33
   const onClose = () => {
33
   const onClose = () => {
34
+    setContent2(content)
34
     setShowCutover(false)
35
     setShowCutover(false)
35
     setReset(true)
36
     setReset(true)
36
   }
37
   }
61
     newstr = newstr.substr(0, i + 1);
62
     newstr = newstr.substr(0, i + 1);
62
     return newstr;
63
     return newstr;
63
   }
64
   }
65
+  const [content2,setContent2]=useState(content)
64
   const handelEdit = () => {
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
     const date = {
75
     const date = {
77
-      content,
76
+      content:content2,
78
       contentType: 'text'
77
       contentType: 'text'
79
     }
78
     }
80
     update(item.extId, { ...item, ...date })
79
     update(item.extId, { ...item, ...date })
88
             <View className='rzline' /><Label className='srl mg'>修改文字</Label><View className='rzline' />
87
             <View className='rzline' /><Label className='srl mg'>修改文字</Label><View className='rzline' />
89
           </View>
88
           </View>
90
           <View>
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
           </View>
91
           </View>
93
           <View>
92
           <View>
94
             <Button className='cancel' onClick={onClose}>取消</Button>
93
             <Button className='cancel' onClick={onClose}>取消</Button>

+ 1
- 1
src/hotel/pages/landlord/addRoom/addRoom.jsx Näytä tiedosto

173
         <CustomNav title={hotelName} />
173
         <CustomNav title={hotelName} />
174
       </view>
174
       </view>
175
       <view className='roomDetail' style={{ height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }} >
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
           <View id='det'>
177
           <View id='det'>
178
             <Popup show={showCutover} onClose={onClose}>
178
             <Popup show={showCutover} onClose={onClose}>
179
               <View className='editword'>
179
               <View className='editword'>

+ 24
- 22
src/pages/index/tabs/Recommend.jsx Näytä tiedosto

1
-import Taro from '@tarojs/taro'
1
+import Taro, { useDidShow } from '@tarojs/taro'
2
 import { React, useState, useEffect, useRef, useMemo } from 'react'
2
 import { React, useState, useEffect, useRef, useMemo } from 'react'
3
 import iconsearch from '@/assets/icons/housemantj/search.png'
3
 import iconsearch from '@/assets/icons/housemantj/search.png'
4
 import locationimg from '@/assets/icons/housemantj/location.png'
4
 import locationimg from '@/assets/icons/housemantj/location.png'
5
 import Tip from '@/components/tip'
5
 import Tip from '@/components/tip'
6
 import List from '@/components/List';
6
 import List from '@/components/List';
7
+import NoData from '@/components/NoData'
8
+import Waterfall from '@/components/MasonryLayout/Waterfall';
7
 import MasonryLayout from '@/components/MasonryLayout';
9
 import MasonryLayout from '@/components/MasonryLayout';
8
 import { getIndexType, getResourceList } from '@/services/home'
10
 import { getIndexType, getResourceList } from '@/services/home'
9
 import { random } from '@/utils'
11
 import { random } from '@/utils'
11
 import './less/Recommend.less'
13
 import './less/Recommend.less'
12
 import { OfficialAccount } from '@tarojs/components'
14
 import { OfficialAccount } from '@tarojs/components'
13
 
15
 
14
-const listStyle = { height: 'calc(100% - 145px)' }
16
+const listStyle = { height: '100%' }
15
 
17
 
16
 export default (props) => {
18
 export default (props) => {
17
   const { router, person, location } = props
19
   const { router, person, location } = props
76
   // })
78
   // })
77
 
79
 
78
   return (
80
   return (
79
-    <>
81
+    <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
80
       <OfficialAccount>s21</OfficialAccount>
82
       <OfficialAccount>s21</OfficialAccount>
81
       <view className='search' onClick={onSearch} >
83
       <view className='search' onClick={onSearch} >
82
         <input className='searchInput' disabled />
84
         <input className='searchInput' disabled />
103
           </mp-tabs>
105
           </mp-tabs>
104
         </scroll-view>
106
         </scroll-view>
105
       </view>
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
 }