张延森 3 년 전
부모
커밋
b4579cf0ef

BIN
src/assets/addTime.png 파일 보기


BIN
src/assets/certificate.png 파일 보기


BIN
src/assets/dog.png 파일 보기


BIN
src/assets/dogCared.png 파일 보기


BIN
src/assets/handle.png 파일 보기


BIN
src/assets/listImage.png 파일 보기


BIN
src/assets/lost.png 파일 보기


BIN
src/assets/main.png 파일 보기


BIN
src/assets/notice.png 파일 보기


BIN
src/assets/personal.png 파일 보기


BIN
src/assets/renewal.png 파일 보기


BIN
src/assets/replacement.png 파일 보기


BIN
src/assets/speed.png 파일 보기


BIN
src/assets/tipsLogo.png 파일 보기


+ 13
- 21
src/pages/index/components/MenuItem/index.jsx 파일 보기

@@ -1,34 +1,26 @@
1 1
 import React, { useMemo } from 'react'
2 2
 import { View } from '@tarojs/components'
3
+import RatioItem from '@/components/RatioItem'
3 4
 
4 5
 import './style.less'
5 6
 
6
-let inx = 0;
7
-const colorList = [
8
-  '#d48806',
9
-  '#7cb305',
10
-  '#08979c',
11
-  '#096dd9',
12
-  '#531dab',
13
-  '#c41d7f',
14
-]
15
-
16 7
 export default (props) => {
17
-  const { title } = props;
18
-
19
-  const style = useMemo(() => {
20
-    const back = colorList[inx % 6];
21
-    inx += 1;
8
+  const { title, subtitle, desc, icon, ratio = '470:310' } = props;
22 9
 
10
+  const iconStyle = useMemo(() => {
23 11
     return {
24
-      background: back
12
+      background: `url(@/assets/${icon}.png)`
25 13
     }
26
-  }, [])
14
+  }, [icon])
27 15
 
28 16
   return (
29
-    <View className='index-menu-item weui-flex'>
30
-      <View className='index-menu-item-title weui-flex__item'>{title}</View>
31
-      <View className='index-menu-item-icon weui-flex__item' style={style}></View>
32
-    </View>
17
+    <RatioItem ratio={ratio}>
18
+      <View className='index-menu-item'>
19
+        <View className='index-menu-item-title'>{title}</View>
20
+        <View className='index-menu-item-subtitle'>{subtitle}</View>
21
+        <View className='index-menu-item-desc'>{desc}</View>
22
+        <View className='index-menu-item-icon' style={iconStyle}></View>
23
+      </View>
24
+    </RatioItem>
33 25
   )
34 26
 }

+ 29
- 9
src/pages/index/components/MenuItem/style.less 파일 보기

@@ -1,19 +1,39 @@
1
+
2
+@index-menu-space: 16rpx;
3
+
1 4
 .index-menu-item {
2 5
   width: 100%;
6
+  height: 100%;
3 7
   box-sizing: border-box;
4
-  padding: 16rpx;
5
-  border-radius: 12rpx;
6
-  background: rgba(0, 0, 0, 0.08);
8
+  padding: @index-menu-space;
9
+  border-radius: 24rpx;
10
+  background: #FBD802;
11
+  position: relative;
7 12
 
8 13
   .index-menu-item-title {
9
-    line-height: 64px;
14
+    font-size: 1.1em;
15
+    letter-spacing: 6px;
16
+    font-weight: bold;
17
+  }
18
+  
19
+  .index-menu-item-subtitle {
20
+    margin-top: 8px;
21
+    font-size: 12px;
22
+    font-weight: bold;
23
+  }
24
+
25
+  .index-menu-item-desc {
26
+    position: absolute;
27
+    left: @index-menu-space;
28
+    bottom: @index-menu-space;
29
+    line-height: 2em;
30
+    font-size: 16px;
31
+    letter-spacing: 2px;
10 32
   }
11 33
 
12 34
   .index-menu-item-icon {
13
-    flex: none;
14
-    width: 64px;
15
-    height: 64px;
16
-    border-radius: 50%;
17
-    background: #999;
35
+    position: absolute;
36
+    right: @index-menu-space;
37
+    bottom: @index-menu-space;
18 38
   }
19 39
 }

+ 30
- 19
src/pages/index/index.jsx 파일 보기

@@ -15,10 +15,14 @@ import MenuItem from './components/MenuItem'
15 15
 
16 16
 import './style.less'
17 17
 
18
-const spaceStyle = {
18
+const pt16 = {
19 19
   paddingTop: '16px'
20 20
 }
21 21
 
22
+const ml16 = {
23
+  marginLeft: '16px'
24
+}
25
+
22 26
 export default (props) => {
23 27
 
24 28
   const banner = [
@@ -51,28 +55,35 @@ export default (props) => {
51 55
     }}
52 56
     >
53 57
       <View className='index-page-box'>
54
-          <View>
55
-            <Banner banner={banner} />
58
+        <View style={{ padding: '16px', boxSizing: 'border-box' }}>
59
+          <Banner banner={banner} />
60
+        </View>
61
+        <View className='border-card-group'>
62
+          <View class='weui-flex'>
63
+            <View class='weui-flex__item'>
64
+              <MenuItem title='办证申请' subtitle='Registration application' desc='您有1条办证申请记录' icon='dog' />
65
+            </View>
66
+            <View class='weui-flex__item' style={ml16}>
67
+              <MenuItem title='证件查看' subtitle='Certificate check' desc='您有1条办证申请记录' icon='certificate' />
68
+            </View>
69
+          </View>
70
+          <View class='weui-flex' style={pt16}>
71
+              <View class='weui-flex__item'>
72
+                <MenuItem title='个人中心' subtitle='Personal center' ratio='470:452' icon='personal' />
73
+              </View>
74
+              <View class='weui-flex__item' style={ml16}>
75
+                <MenuItem title='证件续期' subtitle='Certificate renewal' ratio='470:206' icon='renewal' />
76
+
77
+                <View style={pt16}>
78
+                  <MenuItem title='证件补办' subtitle='Replacement certificate' ratio='470:206' icon='repalcement' />
79
+                </View>
80
+              </View>
56 81
           </View>
57
-        <View style={spaceStyle}>
58
-          <Notice Notice={NoticeList} />
59 82
         </View>
60 83
 
61
-<View className='border-card-group'>
62
-  <View class='weui-flex'>
63
-        <View class='weui-flex__item'><MenuItem title='办证申请' /></View>
64
-        <View class='weui-flex__item' style={{ marginLeft: '16px' }}><MenuItem title='证件查看' /></View>
65
-    </View>
66
-  <View class='weui-flex' style={spaceStyle}>
67
-        <View class='weui-flex__item'><MenuItem title='证件续期' /></View>
68
-        <View class='weui-flex__item' style={{ marginLeft: '16px' }}><MenuItem title='挂失补办' /></View>
69
-    </View>
70
-  <View class='weui-flex' style={spaceStyle}>
71
-        <View class='weui-flex__item'><MenuItem title='消息通知' /></View>
72
-        <View class='weui-flex__item' style={{ marginLeft: '16px' }}><MenuItem title='个人中心' /></View>
73
-    </View>
74
-</View>
84
+        <View className='message-box'>
75 85
 
86
+        </View>
76 87
       </View>
77 88
     </ScrollView>
78 89
   )

+ 7
- 71
src/pages/index/style.less 파일 보기

@@ -1,77 +1,13 @@
1
+@index-spaceing: 16PX;
2
+
1 3
 .index-page-box {
2
-  padding: 0 16PX;
3
-  box-sizing: border-box;
4
-  background: linear-gradient(180deg, #FBD804, transparent 75%);
4
+  background-color: #F7F8FC;
5 5
 }
6 6
 
7 7
 .border-card-group {
8
-  border-radius: 12px;
9
-  background: #fff;
10
-  padding: 16PX;
11
-  margin-top: 16PX;
12
-  border: 1px solid rgba(0,0,0, .1);
13
-  box-shadow: 0 5px 5px rgba(0,0,0, .1);
14
-}
15
-
16
-.haderBox {
17
-  width: 100vw;
18
-  height: 56vw;
19
-  margin: 0 auto;
20
-  background-color: #fff;
21
-  border-bottom-left-radius: 30px;
22
-  border-bottom-right-radius: 30px;
23
-}
24
-.FastEntry-Box {
25
-  width: 100%;
26
-  display: flex;
27
-  align-items: center;
28
-  justify-content: space-around;
29
-  padding: 3vh 0 3vh 0;
30
-  &-content {
31
-    width: 42%;
32
-    height: 150px;
33
-    // border: 2px dashed red;
34
-    background-image: linear-gradient(to right, #fbd804, #ffe96ade);
35
-    border-radius: 10px;
36
-    padding: 15px;
37
-    > View {
38
-      font-weight: 700;
39
-      color: #fff;
40
-    }
41
-    > Image {
42
-      width: 80px;
43
-      height: 80px;
44
-      position: relative;
45
-      top: -15px;
46
-      left: 200px;
47
-    }
48
-  }
8
+  padding: @index-spaceing;
49 9
 }
50
-.Operation-box {
51
-  width: 100vw;
52
-  height: 50vw;
53
-  margin: 0 auto;
10
+.message-box {
54 11
   background-color: #fff;
55
-  border-bottom-left-radius: 30px;
56
-  border-bottom-right-radius: 30px;
57
-  &-header {
58
-    width: 95%;
59
-    display: flex;
60
-    align-items: center;
61
-    justify-content: space-around;
62
-    padding: 2vh 0 2vh 0;
63
-    &-centent {
64
-      width: 38%;
65
-      height: 10vh;
66
-      // border: 1px solid #fbd804;
67
-      border: 1px solid #000;
68
-      display: flex;
69
-      align-items: center;
70
-      border-radius: 10px;
71
-      // > Image {
72
-      //   width: 60px;
73
-      //   height: 50px;
74
-      // }
75
-    }
76
-  }
77
-}
12
+  padding: @index-spaceing;
13
+}