Browse Source

静态页面

1002884655 3 years ago
parent
commit
5fab559064

+ 2
- 2
config/dev.js View File

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

+ 1
- 1
project.config.json View File

@@ -2,7 +2,7 @@
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "miniapp",
4 4
 	"description": "",
5
-	"appid": "wxe44244d1a5ea3364",
5
+	"appid": "wxc96058d57e77f373",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,

+ 5
- 1
src/components/ProjectItemCard/style.scss View File

@@ -43,8 +43,12 @@
43 43
       }
44 44
     }
45 45
     > text {
46
-      font-size: 32px;
46
+      font-size: 30px;
47 47
       font-weight: bold;
48
+      max-width: 50%;
49
+      white-space: nowrap;
50
+      overflow: hidden;
51
+      text-overflow: ellipsis;
48 52
       &:last-child {
49 53
         color: #ff0000;
50 54
       }

+ 17
- 6
src/pages/index/buildingDetail/components/LivingActivity/index.jsx View File

@@ -36,13 +36,24 @@ export default function LivingActivity (props) {
36 36
 
37 37
       <view className='List flex-h'>
38 38
         {
39
-          List.map((item, index) => (
40
-            <view className='flex-item' key={`ListItem-${index}`} onClick={() => gotoDetail(item)}>
41
-              <view style={{display: item.listImg ? 'block' : 'none'}}>
42
-                <Image mode='aspectFill' src={getImgURL(item.listImg)} className='centerLabel'></Image>
43
-              </view>
39
+          List.length > 0 &&
40
+          <view className='flex-item' onClick={() => gotoDetail(List[0])}>
41
+            <view style={{display: List[0].listImg ? 'block' : 'none'}}>
42
+              <Image mode='aspectFill' src={getImgURL(List[0].listImg)} className='centerLabel'></Image>
44 43
             </view>
45
-          ))
44
+          </view>
45
+        }
46
+        {
47
+          List.length > 1 &&
48
+          <view className='flex-item' onClick={() => gotoDetail(List[1])}>
49
+            <view style={{display: List[1].listImg ? 'block' : 'none'}}>
50
+              <Image mode='aspectFill' src={getImgURL(List[1].listImg)} className='centerLabel'></Image>
51
+            </view>
52
+          </view>
53
+        }
54
+        {
55
+          List.length === 1 &&
56
+          <view className='flex-item'></view>
46 57
         }
47 58
       </view>
48 59
 

+ 2
- 1
src/pages/index/components/ActivityListItem/index.scss View File

@@ -41,7 +41,8 @@
41 41
         text-align: center;
42 42
         border-radius: 60px;
43 43
         background: #B9B2B2;
44
-        width: 144px;
44
+        min-width: 124px;
45
+        padding: 0 10px;
45 46
         &.yellow {
46 47
           background: #FA9730;
47 48
         }

+ 43
- 23
src/pages/index/components/HotRecommend/index.jsx View File

@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'
2 2
 import { useSelector } from 'react-redux'
3 3
 import Taro from '@tarojs/taro'
4 4
 import { queryActivityList } from '@/services/activity'
5
-import { Swiper, SwiperItem } from '@tarojs/components'
5
+import { Swiper, SwiperItem, Block } from '@tarojs/components'
6 6
 import '@/assets/css/iconfont.css'
7 7
 import './index.scss'
8 8
 
@@ -12,21 +12,23 @@ export default function HotRecommend (props) {
12 12
   const city = useSelector(state => state.city)
13 13
   const [MenuList] = useState([{ name: '热门活动', id: 'dymic' }, { name: '热门团房', id: 'house' }])
14 14
   const [CurrentId, setCurrentId] = useState('dymic')
15
-  const [list, setList] = useState([])
15
+  const [list, setList] = useState([[], []])
16 16
   const [CurrentContentInfo, setCurrentContentInfo] = useState({})
17 17
 
18 18
   useEffect(() => {
19 19
     if (city.curCity.name) {
20 20
       GetRecommendActivity()
21 21
     }
22
-  }, [city, CurrentId])
22
+  }, [city])
23 23
 
24 24
   const GetRecommendActivity = () => {
25
-
26
-    queryActivityList({ home: 1, cityId: city.curCity.id, type: CurrentId }).then((res) => {
25
+    queryActivityList({ home: 1, cityId: city.curCity.id, type: 'dymic' }).then((res) => {
27 26
       const resArr = res.records || []
28
-      setList(resArr)
29
-      change(!!resArr.length)
27
+      queryActivityList({ home: 1, cityId: city.curCity.id, type: 'house' }).then((subRes) => {
28
+        const subResArr = subRes.records || []
29
+        setList([resArr || [], subResArr || []])
30
+        change(resArr.length || subResArr.length)
31
+      })
30 32
     })
31 33
   }
32 34
 
@@ -62,24 +64,42 @@ export default function HotRecommend (props) {
62 64
           }
63 65
         </view>
64 66
         <view className='Content'>
65
-          {/* <view className='flex-h'>
66
-            <text className='flex-item'>{CurrentContentInfo.title || '暂无活动'}</text>
67
-            <text onClick={ToMore}>{CurrentId === 'dymic' ? '更多活动' : '更多团房'}</text>
68
-          </view>
69
-          <text>{CurrentContentInfo.halfTitle}</text> */}
70 67
           <Swiper autoplay interval={5000} vertical>
71 68
             {
72
-              list.map((item, index) => (
73
-                <SwiperItem key={`Banner-${index}`}>
74
-                  <view className='swiper-item'>
75
-                    <view className='flex-h'>
76
-                      <text className='flex-item' onClick={toDetail}>{item.title || '暂无活动'}</text>
77
-                      <text onClick={() => {ToMore()}}>{CurrentId === 'dymic' ? '更多活动' : '更多团房'}</text>
78
-                    </view>
79
-                    <text onClick={toDetail}>{item.halfTitle}</text>
80
-                  </view>
81
-                </SwiperItem>
82
-              ))
69
+              CurrentId === 'dymic' &&
70
+              <Block>
71
+                {
72
+                  list[0].map((item, index) => (
73
+                    <SwiperItem key={`Banner-${index}`}>
74
+                      <view className='swiper-item'>
75
+                        <view className='flex-h'>
76
+                          <text className='flex-item' onClick={toDetail}>{item.title || '暂无活动'}</text>
77
+                          <text onClick={() => { ToMore() }}>更多活动</text>
78
+                        </view>
79
+                        <text onClick={toDetail}>{item.halfTitle}</text>
80
+                      </view>
81
+                    </SwiperItem>
82
+                  ))
83
+                }
84
+              </Block>
85
+            }
86
+            {
87
+              CurrentId === 'house' &&
88
+              <Block>
89
+                {
90
+                  list[1].map((item, index) => (
91
+                    <SwiperItem key={`Banner-${index}`}>
92
+                      <view className='swiper-item'>
93
+                        <view className='flex-h'>
94
+                          <text className='flex-item' onClick={toDetail}>{item.title || '暂无活动'}</text>
95
+                          <text onClick={() => { ToMore() }}>更多团房</text>
96
+                        </view>
97
+                        <text onClick={toDetail}>{item.halfTitle}</text>
98
+                      </view>
99
+                    </SwiperItem>
100
+                  ))
101
+                }
102
+              </Block>
83 103
             }
84 104
           </Swiper>
85 105
         </view>

+ 0
- 1
src/pages/index/findHouseFromMap/index.jsx View File

@@ -164,7 +164,6 @@ export default withLayout((props) => {
164 164
               <view className='flex-item'>
165 165
                 <text>{current.buildingName}</text>
166 166
               </view>
167
-              <text></text>
168 167
               <text>{current.price}</text>
169 168
             </view>
170 169
             <text className='Address'>{current.address}</text>

+ 6
- 4
src/pages/index/findHouseFromMap/index.scss View File

@@ -141,11 +141,13 @@
141 141
             }
142 142
           }
143 143
           > text {
144
-            font-size: 32px;
144
+            font-size: 30px;
145 145
             font-weight: bold;
146
-            &:last-child {
147
-              color: #ff0000;
148
-            }
146
+            color: #ff0000;
147
+            max-width: 50%;
148
+            white-space: nowrap;
149
+            overflow: hidden;
150
+            text-overflow: ellipsis;
149 151
           }
150 152
         }
151 153
         > .Address {