1002884655 hace 3 años
padre
commit
4a3c1f781f

+ 1
- 1
config/dev.js Ver fichero

@@ -3,7 +3,7 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"https://xlk.njyz.tech"',
6
+    HOST: '"https://xlj.newlandsh.com"',
7 7
     // HOST: '"http://127.0.0.1:8081"',
8 8
     WSS_HOST: '"wss://xlk.njyz.tech"',
9 9
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',

+ 4
- 4
src/pages/index/components/HotRecommend/index.jsx Ver fichero

@@ -61,7 +61,7 @@ export default function HotRecommend (props) {
61 61
             ))
62 62
           }
63 63
         </view>
64
-        <view className='Content' onClick={toDetail}>
64
+        <view className='Content'>
65 65
           {/* <view className='flex-h'>
66 66
             <text className='flex-item'>{CurrentContentInfo.title || '暂无活动'}</text>
67 67
             <text onClick={ToMore}>{CurrentId === 'dymic' ? '更多活动' : '更多团房'}</text>
@@ -73,10 +73,10 @@ export default function HotRecommend (props) {
73 73
                 <SwiperItem key={`Banner-${index}`}>
74 74
                   <view className='swiper-item'>
75 75
                     <view className='flex-h'>
76
-                      <text className='flex-item'>{item.title || '暂无活动'}</text>
77
-                      <text onClick={ToMore}>{CurrentId === 'dymic' ? '更多活动' : '更多团房'}</text>
76
+                      <text className='flex-item' onClick={toDetail}>{item.title || '暂无活动'}</text>
77
+                      <text onClick={() => {ToMore()}}>{CurrentId === 'dymic' ? '更多活动' : '更多团房'}</text>
78 78
                     </view>
79
-                    <text>{item.halfTitle}</text>
79
+                    <text onClick={toDetail}>{item.halfTitle}</text>
80 80
                   </view>
81 81
                 </SwiperItem>
82 82
               ))

+ 4
- 3
src/pages/index/specialPriceHouse/index.jsx Ver fichero

@@ -31,6 +31,7 @@ export default withLayout((props) => {
31 31
   const GetPageList = () => {
32 32
     setHasNextPage(false)
33 33
     fetch({ url: API_SPECIAL_ROOM_LIST, method: 'get', payload: { pageNumber, pageSize: 10, cityId: city?.id } }).then((res) => {
34
+      console.log(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
34 35
       setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
35 36
       setHasNextPage(res.current < res.pages)
36 37
       setPull(false)
@@ -73,10 +74,10 @@ export default withLayout((props) => {
73 74
           <view className='List'>
74 75
             {
75 76
               PageList.map((item, index) => {
76
-                const mainImg = getImgURL(item?.buildingListImg?.length ? item.buildingListImg[0].url : null)
77
+                const mainImg = getImgURL((item?.buildingListImg || []).length ? item.buildingListImg[0].url : null)
77 78
                 const price = item.price || '价格待定'
78 79
                 const shareNum = item.shareList?.total || 0
79
-                const uvNum = item.uvList?.length || 0
80
+                const uvNum = (item?.uvList || []).length || 0
80 81
 
81 82
                 // 最多6个
82 83
                 const tags = (item.buildingTag || []).map(x => x.tagName).slice(0, 6)
@@ -98,7 +99,7 @@ export default withLayout((props) => {
98 99
                       <view className='Img' onClick={() => goto(item)}>
99 100
                         <Image mode='scaleToFill' src={mainImg} className='centerLabel'></Image>
100 101
                         {
101
-                          item.panoramaList.length > 0 &&
102
+                          (item?.panoramaList || []).length > 0 &&
102 103
                           <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
103 104
                         }
104 105
                         {

+ 2
- 2
src/pages/video/components/VideoListItem/index.jsx Ver fichero

@@ -19,7 +19,7 @@ export default function VideoListItem (props) {
19 19
     <view className='components VideoListItem' onClick={()=>toDetail()}>
20 20
       <view className='Img'>
21 21
         <view>
22
-          <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.images) || null} />
22
+          <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.images || Data.videImg) || null} />
23 23
           {
24 24
             Data.type === 'live' && new Date(Data.startTime).getTime() <= Date.now() &&
25 25
             <text className='active'>直播中</text>
@@ -35,7 +35,7 @@ export default function VideoListItem (props) {
35 35
         </view>
36 36
       </view>
37 37
       <view className='Title'>
38
-        <text>{Data.title}</text>
38
+        <text>{Data.title || Data.name}</text>
39 39
       </view>
40 40
       <view className='Location flex-h'>
41 41
         <text className='iconfont icon-dingwei'></text>

+ 5
- 29
src/pages/video/index.jsx Ver fichero

@@ -18,6 +18,7 @@ export default withLayout((props) => {
18 18
     { name: '新房推荐', id: 'new' },
19 19
     { name: '视频', id: 'video' }
20 20
   ])
21
+  const [PageList, setPageList] = useState([])
21 22
   // 全部或者新房的列表
22 23
   const [activityList, setActivityList] = useState([])
23 24
   // 预告与直播的列表
@@ -36,18 +37,18 @@ export default withLayout((props) => {
36 37
     if (['all', 'new'].indexOf(CurrnetMenuId) > -1) {
37 38
       // 全部与新房用的一个接口
38 39
       fetch({ url: API_LIVE_LIST, payload: { ...params, cityId: city.id }, spin: true }).then((res) => {
39
-        setActivityList(res.records || [])
40
+        setPageList(res.records || [])
40 41
       })
41 42
     } else if (['notice', 'live'].indexOf(CurrnetMenuId) > -1) {
42 43
       // 预告与直播是虽然是同一个接口, 但是返回值字段不一样
43 44
       const process = 'notice' === CurrnetMenuId ? 1 : 2;
44 45
       fetch({ url: API_LIVE_LIST, payload: { ...params, cityId: city.id, process }, spin: true}).then((res) => {
45
-        setLiveList(res.records || [])
46
+        setPageList(res.records || [])
46 47
       })
47 48
     } else {
48 49
       // 视频另外一个接口
49 50
       fetch({ url: API_VIDEO_LIST, payload: { ...params, cityId: city.id }, spin: true }).then((res) => {
50
-        setVideoList(res.records || [])
51
+        setPageList(res.records || [])
51 52
       })
52 53
     }
53 54
   }
@@ -87,32 +88,7 @@ export default withLayout((props) => {
87 88
           <ScrollView scroll-y>
88 89
             <view className='PageContent'>
89 90
               {
90
-                /* 全部 与 新房 */
91
-                ['all', 'new'].indexOf(CurrnetMenuId) > -1 && activityList.map((item, index) => (
92
-                  <view className='ListItem' key={`List-${index}`}>
93
-                    <view>
94
-                      <view>
95
-                        <VideoListItem Data={item}></VideoListItem>
96
-                      </view>
97
-                    </view>
98
-                  </view>
99
-                ))
100
-              }
101
-              {
102
-                /* 预告 与 直播 */
103
-                ['notice', 'live'].indexOf(CurrnetMenuId) > -1 && activityList.map((item, index) => (
104
-                  <view className='ListItem' key={`List-${index}`}>
105
-                    <view>
106
-                      <view>
107
-                        <VideoListItem Data={item}></VideoListItem>
108
-                      </view>
109
-                    </view>
110
-                  </view>
111
-                ))
112
-              }
113
-              {
114
-                /* 视频 */
115
-                'video' === CurrnetMenuId && activityList.map((item, index) => (
91
+                PageList.map((item, index) => (
116 92
                   <view className='ListItem' key={`List-${index}`}>
117 93
                     <view>
118 94
                       <view>