瀏覽代碼

静态页面

1002884655 3 年之前
父節點
當前提交
4562ea7c89

二進制
src/assets/logo.png 查看文件


二進制
src/assets/tabbar/index1.png 查看文件


二進制
src/assets/tabbar/index2.png 查看文件


二進制
src/assets/tabbar/mine1.png 查看文件


二進制
src/assets/tabbar/mine2.png 查看文件


+ 25
- 0
src/pages/index/components/IndexBanner/index.jsx 查看文件

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import { Swiper, SwiperItem, Image } from '@tarojs/components'
4
+
5
+export default function IndexBanner (props) {
6
+  const { List = [] } = props
7
+  return (
8
+    <view className='components IndexBanner'>
9
+      <Swiper autoplay={true} interval={2000} indicator-dots={true}>
10
+        {
11
+          List.map((item, index) => (
12
+            <SwiperItem key={`Banner-${index}`}>
13
+              <view className="swiper-item">
14
+                {
15
+                  item.img &&
16
+                  <Image mode='aspectFill' className='centerLabel' src={item.img || null} />
17
+                }
18
+              </view>
19
+            </SwiperItem>
20
+          ))
21
+        }
22
+      </Swiper>
23
+    </view>
24
+  )
25
+}

+ 18
- 0
src/pages/index/components/IndexBanner/index.scss 查看文件

1
+.components.IndexBanner {
2
+  width: 100%;
3
+  height: 100%;
4
+  border-radius: 10px;
5
+  background: #ccc;
6
+  position: relative;
7
+  overflow: hidden;
8
+  > swiper {
9
+    width: 100%;
10
+    height: 100%;
11
+    .swiper-item {
12
+      > image {
13
+        width: 100%;
14
+        height: 100%;
15
+      }
16
+    }
17
+  }
18
+}

+ 20
- 0
src/pages/index/components/IndexColumnTitle/index.jsx 查看文件

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+
4
+export default function IndexColumnTitle (props) {
5
+  const { Icon = '', Name = '', ToMore = () => { }, children } = props
6
+  return (
7
+    <view className='components IndexColumnTitle flex-h'>
8
+      <text className={`iconfont ${Icon}`}></text>
9
+      <text className='Name'>{Name}</text>
10
+      {
11
+        children
12
+      }
13
+      <view className='flex-item'></view>
14
+      <view className='More' onClick={ToMore}>
15
+        <text>更多</text>
16
+        <text className='iconfont'></text>
17
+      </view>
18
+    </view>
19
+  )
20
+}

+ 21
- 0
src/pages/index/components/IndexColumnTitle/index.scss 查看文件

1
+.components.IndexColumnTitle {
2
+  align-items: center;
3
+  padding: 0 30px;
4
+  margin-top: 30px;
5
+  > text {
6
+    font-size: 32px;
7
+    font-weight: bold;
8
+    color: #000;
9
+    line-height: 40px;
10
+  }
11
+  > .More {
12
+    white-space: nowrap;
13
+    font-size: 0;
14
+    > text {
15
+      display: inline-block;
16
+      vertical-align: middle;
17
+      font-size: 24px;
18
+      line-height: 40px;
19
+    }
20
+  }
21
+}

+ 27
- 0
src/pages/index/components/IndexHotActivity/index.jsx 查看文件

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import { ScrollView, Image } from '@tarojs/components'
4
+
5
+export default function IndexHotActivity (props) {
6
+  const { List = [] } = props
7
+  return (
8
+    <view className='components IndexHotActivity'>
9
+      <ScrollView scroll-x={true}>
10
+        <view className='Content'>
11
+          {
12
+            List.map((item, index) => (
13
+              <view className={`IndexHotActivity-${index}`}>
14
+                <view>
15
+                  {
16
+                    item.img &&
17
+                    <Image mode='aspectFill' className='centerLabel' src={item.img || null} />
18
+                  }
19
+                </view>
20
+              </view>
21
+            ))
22
+          }
23
+        </view>
24
+      </ScrollView>
25
+    </view>
26
+  )
27
+}

+ 30
- 0
src/pages/index/components/IndexHotActivity/index.scss 查看文件

1
+.components.IndexHotActivity {
2
+  margin-top: 30px;
3
+  .Content {
4
+    position: relative;
5
+    font-size: 0;
6
+    white-space: nowrap;
7
+    > view {
8
+      display: inline-block;
9
+      vertical-align: middle;
10
+      margin-right: 30px;
11
+      width: calc((100vw - 90px) / 2);
12
+      position: relative;
13
+      &:first-child {
14
+        margin-left: 30px;
15
+      }
16
+      > view {
17
+        width: 100%;
18
+        position: relative;
19
+        overflow: hidden;
20
+        padding-bottom: 56.25%;
21
+        background: #ccc;
22
+        height: 0;
23
+        > image {
24
+          width: 100%;
25
+          height: 100%;
26
+        }
27
+      }
28
+    }
29
+  }
30
+}

+ 45
- 0
src/pages/index/components/IndexMenu/index.jsx 查看文件

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import { Image } from '@tarojs/components'
4
+
5
+export default function IndexMenu (props) {
6
+  const { List = [] } = props
7
+  return (
8
+    <view className='components IndexMenu'>
9
+
10
+      {/* tab */}
11
+      <view className='Tab flex-h'>
12
+        <view>
13
+          <text className='active'>住宅</text>
14
+        </view>
15
+        <view>
16
+          <text>文旅</text>
17
+        </view>
18
+        <view>
19
+          <text>商办</text>
20
+        </view>
21
+        <view>
22
+          <text>康养</text>
23
+        </view>
24
+      </view>
25
+
26
+      {/* menu */}
27
+      <view className='MenuList'>
28
+        {
29
+          List.map((item, index) => (
30
+            <view className='MenuItem' key={`MenuItem-${index}`}>
31
+              <view className='Img'>
32
+                {
33
+                  item.img &&
34
+                  <Image mode='aspectFit' className='centerLabel' src={item.img || null} />
35
+                }
36
+              </view>
37
+              <view className='Name'>菜单名称</view>
38
+            </view>
39
+          ))
40
+        }
41
+      </view>
42
+
43
+    </view>
44
+  )
45
+}

+ 99
- 0
src/pages/index/components/IndexMenu/index.scss 查看文件

1
+.components.IndexMenu {
2
+  padding: 0 20px;
3
+  position: relative;
4
+  overflow: hidden;
5
+  > .Tab {
6
+    border-bottom: 2px solid #eee;
7
+    align-items: center;
8
+    position: relative;
9
+    overflow: hidden;
10
+    > view {
11
+      flex: 5;
12
+      -webkit-flex: 5;
13
+      text-align: center;
14
+      font-size: 0;
15
+      position: relative;
16
+      overflow: hidden;
17
+      &::after {
18
+        content: "";
19
+        display: block;
20
+        height: 40px;
21
+        width: 2px;
22
+        top: 50%;
23
+        left: 0;
24
+        position: absolute;
25
+        transform: translateY(-50%);
26
+        -webkit-transform: translateY(-50%);
27
+        background: #eee;
28
+      }
29
+      &:first-child {
30
+        text-align: left;
31
+        flex: 3;
32
+        -webkit-flex: 3;
33
+        &::after {
34
+          display: none;
35
+        }
36
+      }
37
+      &:last-child {
38
+        text-align: right;
39
+        flex: 3;
40
+        -webkit-flex: 3;
41
+      }
42
+      > text {
43
+        display: inline-block;
44
+        font-size: 32px;
45
+        position: relative;
46
+        line-height: 80px;
47
+        &.active {
48
+          font-weight: bold;
49
+          &::after {
50
+            content: "";
51
+            display: block;
52
+            position: absolute;
53
+            left: 50%;
54
+            bottom: 0;
55
+            transform: translateX(-50%);
56
+            -webkit-transform: translateX(-50%);
57
+            height: 4px;
58
+            width: 100%;
59
+            background: blue;
60
+          }
61
+        }
62
+      }
63
+    }
64
+  }
65
+  > .MenuList {
66
+    position: relative;
67
+    overflow: hidden;
68
+    font-size: 0;
69
+    padding-bottom: 30px;
70
+    > view {
71
+      display: inline-block;
72
+      vertical-align: middle;
73
+      width: 20%;
74
+      position: relative;
75
+      overflow: hidden;
76
+      text-align: center;
77
+      margin-top: 30px;
78
+      > .Img {
79
+        width: 90px;
80
+        height: 90px;
81
+        position: relative;
82
+        overflow: hidden;
83
+        background: #ccc;
84
+        margin: 0 auto;
85
+        > image {
86
+          width: 100%;
87
+          height: 100%;
88
+        }
89
+      }
90
+      > .Name {
91
+        text-align: center;
92
+        font-size: 28px;
93
+        line-height: 40px;
94
+        text-align: center;
95
+        margin-top: 6px;
96
+      }
97
+    }
98
+  }
99
+}

+ 25
- 0
src/pages/index/components/SubBanner/index.jsx 查看文件

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import { Swiper, SwiperItem, Image } from '@tarojs/components'
4
+
5
+export default function SubBanner (props) {
6
+  const { List = [] } = props
7
+  return (
8
+    <view className='components SubBanner'>
9
+      <Swiper autoplay={true} interval={2000} indicator-dots={true}>
10
+        {
11
+          List.map((item, index) => (
12
+            <SwiperItem key={`Banner-${index}`}>
13
+              <view className="swiper-item">
14
+                {
15
+                  item.img &&
16
+                  <Image mode='aspectFill' className='centerLabel' src={item.img || null} />
17
+                }
18
+              </view>
19
+            </SwiperItem>
20
+          ))
21
+        }
22
+      </Swiper>
23
+    </view>
24
+  )
25
+}

+ 18
- 0
src/pages/index/components/SubBanner/index.scss 查看文件

1
+.components.SubBanner {
2
+  width: 100%;
3
+  height: 100%;
4
+  border-radius: 10px;
5
+  background: #ccc;
6
+  position: relative;
7
+  overflow: hidden;
8
+  > swiper {
9
+    width: 100%;
10
+    height: 100%;
11
+    .swiper-item {
12
+      > image {
13
+        width: 100%;
14
+        height: 100%;
15
+      }
16
+    }
17
+  }
18
+}