Browse Source

静态页面

1002884655 3 years ago
parent
commit
5fab559064

+ 2
- 2
config/dev.js View File

3
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
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
     // HOST: '"http://127.0.0.1:8567"',
8
     // HOST: '"http://127.0.0.1:8567"',
9
     WSS_HOST: '"wss://xlk.njyz.tech"',
9
     WSS_HOST: '"wss://xlk.njyz.tech"',
10
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',

+ 1
- 1
project.config.json View File

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

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

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

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

36
 
36
 
37
       <view className='List flex-h'>
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
             </view>
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
       </view>
58
       </view>
48
 
59
 

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

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

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

2
 import { useSelector } from 'react-redux'
2
 import { useSelector } from 'react-redux'
3
 import Taro from '@tarojs/taro'
3
 import Taro from '@tarojs/taro'
4
 import { queryActivityList } from '@/services/activity'
4
 import { queryActivityList } from '@/services/activity'
5
-import { Swiper, SwiperItem } from '@tarojs/components'
5
+import { Swiper, SwiperItem, Block } from '@tarojs/components'
6
 import '@/assets/css/iconfont.css'
6
 import '@/assets/css/iconfont.css'
7
 import './index.scss'
7
 import './index.scss'
8
 
8
 
12
   const city = useSelector(state => state.city)
12
   const city = useSelector(state => state.city)
13
   const [MenuList] = useState([{ name: '热门活动', id: 'dymic' }, { name: '热门团房', id: 'house' }])
13
   const [MenuList] = useState([{ name: '热门活动', id: 'dymic' }, { name: '热门团房', id: 'house' }])
14
   const [CurrentId, setCurrentId] = useState('dymic')
14
   const [CurrentId, setCurrentId] = useState('dymic')
15
-  const [list, setList] = useState([])
15
+  const [list, setList] = useState([[], []])
16
   const [CurrentContentInfo, setCurrentContentInfo] = useState({})
16
   const [CurrentContentInfo, setCurrentContentInfo] = useState({})
17
 
17
 
18
   useEffect(() => {
18
   useEffect(() => {
19
     if (city.curCity.name) {
19
     if (city.curCity.name) {
20
       GetRecommendActivity()
20
       GetRecommendActivity()
21
     }
21
     }
22
-  }, [city, CurrentId])
22
+  }, [city])
23
 
23
 
24
   const GetRecommendActivity = () => {
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
       const resArr = res.records || []
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
           }
64
           }
63
         </view>
65
         </view>
64
         <view className='Content'>
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
           <Swiper autoplay interval={5000} vertical>
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
           </Swiper>
104
           </Swiper>
85
         </view>
105
         </view>

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

164
               <view className='flex-item'>
164
               <view className='flex-item'>
165
                 <text>{current.buildingName}</text>
165
                 <text>{current.buildingName}</text>
166
               </view>
166
               </view>
167
-              <text></text>
168
               <text>{current.price}</text>
167
               <text>{current.price}</text>
169
             </view>
168
             </view>
170
             <text className='Address'>{current.address}</text>
169
             <text className='Address'>{current.address}</text>

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

141
             }
141
             }
142
           }
142
           }
143
           > text {
143
           > text {
144
-            font-size: 32px;
144
+            font-size: 30px;
145
             font-weight: bold;
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
         > .Address {
153
         > .Address {