Yansen 2 年之前
父節點
當前提交
503cd9f321
共有 7 個文件被更改,包括 65 次插入13322 次删除
  1. 3
    2
      config/dev.js
  2. 1
    0
      config/prod.js
  3. 39
    25
      src/pages/my/index.jsx
  4. 12
    0
      src/pages/my/style.module.less
  5. 3
    0
      src/utils/request.js
  6. 2
    2
      src/utils/user.js
  7. 5
    13293
      yarn.lock

+ 3
- 2
config/dev.js 查看文件

@@ -3,10 +3,11 @@ module.exports = {
3 3
     NODE_ENV: '"development"',
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"http://127.0.0.1:9087"',
7
-    HOST: '"http://192.168.89.147:9087"',
6
+    HOST: '"http://127.0.0.1:9087"',
7
+    // HOST: '"http://192.168.89.147:9087"',
8 8
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
9 9
     DEFAULT_POS: '"116.3476917447715,31.409912844296578"', // 霍山县人民政府 gcj02
10
+    VERSION: '"1.1.13-20230325"',
10 11
   },
11 12
   mini: {},
12 13
   h5: {},

+ 1
- 0
config/prod.js 查看文件

@@ -6,6 +6,7 @@ module.exports = {
6 6
     HOST: '"https://wmcj.huoshannews.com"',
7 7
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
8 8
     DEFAULT_POS: '"116.3476917447715,31.409912844296578"', // 霍山县人民政府 gcj02
9
+    VERSION: '"1.1.13-20230325"',
9 10
   },
10 11
   mini: {},
11 12
   h5: {

+ 39
- 25
src/pages/my/index.jsx 查看文件

@@ -1,7 +1,8 @@
1 1
 import React from 'react';
2 2
 import Taro from '@tarojs/taro';
3 3
 import Page from '@/layouts/index';
4
-import { View, Image } from '@tarojs/components';
4
+import VABC from '@/components/VABC';
5
+import { View, Text, Image } from '@tarojs/components';
5 6
 import logo from '@/assets/image/logo.png';
6 7
 import peopleicon from '@/assets/icons/peopleicon.png';
7 8
 import icon11 from '@/assets/icons/icon11.png';
@@ -63,31 +64,44 @@ export default (props) => {
63 64
 
64 65
   return (
65 66
     <Page tabBar="mine">
66
-      <Head
67
-        avatar={user?.avatar || person?.avatar || logo}
68
-        name={user?.name || person?.name || '市民'}
69
-        onChangePwd={onChangePwd}
70
-        onExit={onExit}
71
-      />
72
-      <View className={styles['bg-menu-box']}>
73
-        {
74
-          show1 && (
75
-            <View className={styles['bg-menu-item']}>
76
-              <Image src={peopleicon} />
77
-              <View className={styles['bg-menu-title']}>所在部门</View>
78
-              <View className={styles['bg-menu-subtitle']}>{org?.name || '暂无'}</View>
67
+      <VABC
68
+        header={(
69
+          <Head
70
+            avatar={user?.avatar || person?.avatar || logo}
71
+            name={user?.name || person?.name || '市民'}
72
+            onChangePwd={onChangePwd}
73
+            onExit={onExit}
74
+          />
75
+        )}
76
+        footer={(
77
+          <View className={styles['mine-pg-footer']}>
78
+            <View className={styles.version}>
79
+              <Text>版本: </Text>
80
+              <Text>{VERSION}</Text>
79 81
             </View>
80
-          )
81
-        }
82
-        {
83
-          show2 && (
84
-            <View className={styles['bg-menu-item']} onClick={onClick}>
85
-              <Image src={icon11} />
86
-              <View className={styles['bg-menu-title']}>消息通知</View>
87
-            </View>
88
-          )
89
-        }
90
-      </View>
82
+          </View>
83
+        )}
84
+      >
85
+        <View className={styles['bg-menu-box']}>
86
+          {
87
+            show1 && (
88
+              <View className={styles['bg-menu-item']}>
89
+                <Image src={peopleicon} />
90
+                <View className={styles['bg-menu-title']}>所在部门</View>
91
+                <View className={styles['bg-menu-subtitle']}>{org?.name || '暂无'}</View>
92
+              </View>
93
+            )
94
+          }
95
+          {
96
+            show2 && (
97
+              <View className={styles['bg-menu-item']} onClick={onClick}>
98
+                <Image src={icon11} />
99
+                <View className={styles['bg-menu-title']}>消息通知</View>
100
+              </View>
101
+            )
102
+          }
103
+        </View>
104
+      </VABC>
91 105
     </Page>
92 106
   )
93 107
 }

+ 12
- 0
src/pages/my/style.module.less 查看文件

@@ -60,3 +60,15 @@
60 60
     }
61 61
   }
62 62
 }
63
+
64
+.mine-pg-footer {
65
+  width: 100%;
66
+  left: 0;
67
+
68
+  .version {
69
+    text-align: center;
70
+    color: #999;
71
+    font-size: .95em;
72
+    line-height: 3em;
73
+  }
74
+}

+ 3
- 0
src/utils/request.js 查看文件

@@ -18,6 +18,7 @@ export default function request(api, options = {}) {
18 18
     // eslint-disable-next-line no-undef
19 19
     const url = queryStr ? `${HOST}${api}?${queryStr}` : `${HOST}${api}`;
20 20
     const personId = Taro.getStorageSync('personId');
21
+    const duty = Taro.getStorageSync('duty');
21 22
     
22 23
     const onError = (err) => {
23 24
       console.error(err);
@@ -40,7 +41,9 @@ export default function request(api, options = {}) {
40 41
       data,
41 42
       method,
42 43
       header: {
44
+        'x-client': 'miniapp',
43 45
         'x-personId': personId,
46
+        'x-duty': duty,
44 47
         'content-type': 'application/json',
45 48
         'authorization': getToken(),
46 49
         ...header,

+ 2
- 2
src/utils/user.js 查看文件

@@ -21,8 +21,8 @@ export const ROLE_CITIZEN = 'citizen';
21 21
 export const ROLES = {
22 22
   [ROLE_INSPECTOR]: '督查员',
23 23
   [ROLE_MANAGER]: '管理员',
24
-  [ROLE_ORG_USER]: '交办单位人员',
25
-  [ROLE_ORG_MANAGER]: '交办单位管理员',
24
+  [ROLE_ORG_USER]: '单位经办员',
25
+  [ROLE_ORG_MANAGER]: '单位管理员',
26 26
   [ROLE_QUERY_PERSON]: '查询员',
27 27
   [ROLE_CITIZEN]: '市民',
28 28
 }

+ 5
- 13293
yarn.lock
文件差異過大導致無法顯示
查看文件