fangmingyue 2 gadus atpakaļ
vecāks
revīzija
b5e961ec24

+ 2
- 1
src/app.config.js Parādīt failu

@@ -15,7 +15,6 @@ export default defineAppConfig({
15 15
     'pages/message/list/index',
16 16
     'pages/index3/index',
17 17
     'pages/index4/index',
18
-    'pages/index5/index',
19 18
     'pages/reporting/index',
20 19
     'pages/reporting/detail/index',
21 20
     'pages/reset-password/index',
@@ -24,6 +23,8 @@ export default defineAppConfig({
24 23
     'pages/check/edit/index',
25 24
     'pages/notice/list/index',
26 25
     'pages/notice/edit/index',
26
+    'pages/my/index',
27
+    'pages/my/edit/index',
27 28
   ],
28 29
   window: {
29 30
     // backgroundColor: '#1A7565',

Binārs
src/assets/icons/bell.png Parādīt failu


Binārs
src/assets/icons/headportrait.png Parādīt failu


Binārs
src/assets/icons/peopleicon.png Parādīt failu


Binārs
src/assets/icons/smallbell.png Parādīt failu


+ 1
- 1
src/layouts/TabBar.jsx Parādīt failu

@@ -54,7 +54,7 @@ const mine = {
54 54
   label: '我的',
55 55
   icon: mineIcon,
56 56
   activeIcon: mineActiveIcon,
57
-  page: '/pages/index5/index'
57
+  page: '/pages/my/index'
58 58
 }
59 59
 
60 60
 export default (props) => {

+ 0
- 24
src/pages/index5/index.jsx Parādīt failu

@@ -1,24 +0,0 @@
1
-import { Component } from 'react'
2
-import { View, Text } from '@tarojs/components'
3
-import './index.less'
4
-
5
-export default class Index extends Component {
6
-
7
-  componentWillMount () { }
8
-
9
-  componentDidMount () { }
10
-
11
-  componentWillUnmount () { }
12
-
13
-  componentDidShow () { }
14
-
15
-  componentDidHide () { }
16
-
17
-  render () {
18
-    return (
19
-      <View className='index'>
20
-        <Text>Hello world!</Text>
21
-      </View>
22
-    )
23
-  }
24
-}

+ 0
- 0
src/pages/index5/index.less Parādīt failu


+ 21
- 0
src/pages/my/components/Notice.jsx Parādīt failu

@@ -0,0 +1,21 @@
1
+import React from 'react';
2
+import { View, Image } from '@tarojs/components';
3
+import smallbell from '@/assets/icons/smallbell.png';
4
+import Taro from '@tarojs/taro';
5
+import style from './notice.module.less';
6
+
7
+export default (props) => {
8
+
9
+  const onClick = () => {
10
+    Taro.navigateTo({
11
+      url: `/pages/my/edit/index`
12
+    })
13
+  }
14
+
15
+  return (
16
+    <View className="wrapper-middle-box" onClick={onClick}>
17
+      <Image className="wrapper-middle-img" src={smallbell} />
18
+      <View className="wrapper-middle-text3">消息通知</View>
19
+    </View>
20
+  )
21
+}

+ 15
- 0
src/pages/my/components/notice.module.less Parādīt failu

@@ -0,0 +1,15 @@
1
+.wrapper-middle-box {
2
+  box-shadow: 0px 18px 22px 0px rgba(0, 0, 0, 0.06);
3
+  border-radius: 8px;
4
+  display: grid;
5
+  place-items: center;
6
+  margin-bottom: 20px;
7
+}
8
+.wrapper-middle-img {
9
+  width: 120px;
10
+  height: 120px;
11
+}
12
+.wrapper-middle-text3 {
13
+  font-size: 32px;
14
+  margin-bottom: 34px;
15
+}

+ 3
- 0
src/pages/my/edit/index.config.js Parādīt failu

@@ -0,0 +1,3 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '消息通知'
3
+})

+ 25
- 0
src/pages/my/edit/index.jsx Parādīt failu

@@ -0,0 +1,25 @@
1
+import React from 'react';
2
+import Page from '@/layouts/index';
3
+import { Cell, CellGroup } from '@antmjs/vantui'
4
+import { View, Image } from '@tarojs/components';
5
+import bell from '@/assets/icons/bell.png';
6
+import './index.less';
7
+
8
+export default (props) => {
9
+  return (
10
+    <Page>
11
+      <View className="news-card-wrapper">
12
+        <CellGroup>
13
+          <Cell
14
+            title="您的xxxx项目已完成,点击查看详情!"
15
+            isLink size="large"
16
+            renderIcon={(<>
17
+              <Image className="img-wrapper" src={bell} />
18
+            </>
19
+            )}
20
+          />
21
+        </CellGroup>
22
+      </View>
23
+    </Page>
24
+  )
25
+}

+ 11
- 0
src/pages/my/edit/index.less Parādīt failu

@@ -0,0 +1,11 @@
1
+.news-card-wrapper {
2
+  width: calc(100% - var(--main-space) * 2);
3
+  margin: var(--main-space);
4
+  box-shadow: 0px 9px 11px 0px rgba(0, 0, 0, 0.06);
5
+  border-radius: 8px;
6
+  .img-wrapper {
7
+    width: 32px;
8
+    height: 42px;
9
+    margin-right: 2vw;
10
+  }
11
+}

src/pages/index5/index.config.js → src/pages/my/index.config.js Parādīt failu


+ 35
- 0
src/pages/my/index.jsx Parādīt failu

@@ -0,0 +1,35 @@
1
+import React from 'react';
2
+import Page from '@/layouts/index';
3
+import { View, Image } from '@tarojs/components';
4
+import headportrait from '@/assets/icons/headportrait.png';
5
+import peopleicon from '@/assets/icons/peopleicon.png';
6
+import { Card } from '@antmjs/vantui';
7
+import Notice from './components/Notice';
8
+import './index.less';
9
+
10
+export default (props) => {
11
+  return (
12
+    <Page tabBar="mine">
13
+      <View className="wrapper-header">
14
+        <View className="wrapper-header-circle">
15
+          <View className="wrapper-header-circle2" />
16
+        </View>
17
+        <View className="wrapper-header-box">
18
+          <Image className="wrapper-header-img" src={headportrait} />
19
+        </View>
20
+        <View className="wrapper-header-box2">
21
+          <View className="wrapper-header-text">昵称:Tomorrow</View>
22
+        </View>
23
+      </View>
24
+
25
+      <View className="wrapper-middle">
26
+        <View className="wrapper-middle-box">
27
+          <Image className="wrapper-middle-img" src={peopleicon} />
28
+          <View className="wrapper-middle-text">所在部门</View>
29
+          <View className="wrapper-middle-text2">县文明办</View>
30
+        </View>
31
+        <Notice />
32
+      </View>
33
+    </Page>
34
+  )
35
+}

+ 77
- 0
src/pages/my/index.less Parādīt failu

@@ -0,0 +1,77 @@
1
+.wrapper-header {
2
+  background: var(--main-bg-color);
3
+  border-radius: 0px 0px 120px 120px;
4
+  height: 359px;
5
+  align-items: center;
6
+  display: flex;
7
+  justify-content: center;
8
+  .wrapper-header-circle {
9
+    position: relative;
10
+    opacity: 0.02;
11
+    border-radius: 50%;
12
+    background: #ffffff;
13
+    width: 298px;
14
+    height: 298px;
15
+    .wrapper-header-circle2 {
16
+      position: absolute;
17
+      left: 0;
18
+      right: 0;
19
+      top: 0;
20
+      bottom: 0;
21
+      margin: auto;
22
+      width: 198px;
23
+      height: 198px;
24
+      background: #ffffff;
25
+      border-radius: 50%;
26
+    }
27
+  }
28
+  .wrapper-header-box {
29
+    position: relative;
30
+    .wrapper-header-img {
31
+      position: absolute;
32
+      top: -49px;
33
+      right: 88px;
34
+      width: 115px;
35
+      height: 109px;
36
+      border-radius: 50%;
37
+    }
38
+  }
39
+  .wrapper-header-box2 {
40
+    position: relative;
41
+    .wrapper-header-text {
42
+      position: absolute;
43
+      width: 249px;
44
+      right: 17px;
45
+      top: 79px;
46
+      font-size: 32px;
47
+      color: #fff;
48
+    }
49
+  }
50
+}
51
+
52
+.wrapper-middle {
53
+  padding: var(--main-space);
54
+  display: grid;
55
+  grid-template-columns: repeat(2, 335px);
56
+  grid-auto-rows: 335px;
57
+  grid-gap: var(--main-space);
58
+  .wrapper-middle-box {
59
+    box-shadow: 0px 18px 22px 0px rgba(0, 0, 0, 0.06);
60
+    border-radius: 8px;
61
+    display: grid;
62
+    place-items: center;
63
+    margin-bottom: 20px;
64
+  }
65
+  .wrapper-middle-img {
66
+    width: 120px;
67
+    height: 120px;
68
+  }
69
+  .wrapper-middle-text {
70
+    font-size: 32px;
71
+    margin-bottom: -38px;
72
+  }
73
+  .wrapper-middle-text2 {
74
+    font-size: 28px;
75
+    color: #757575;
76
+  }
77
+}