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
     NODE_ENV: '"development"',
3
     NODE_ENV: '"development"',
4
   },
4
   },
5
   defineConstants: {
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
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
8
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
9
     DEFAULT_POS: '"116.3476917447715,31.409912844296578"', // 霍山县人民政府 gcj02
9
     DEFAULT_POS: '"116.3476917447715,31.409912844296578"', // 霍山县人民政府 gcj02
10
+    VERSION: '"1.1.13-20230325"',
10
   },
11
   },
11
   mini: {},
12
   mini: {},
12
   h5: {},
13
   h5: {},

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

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

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

1
 import React from 'react';
1
 import React from 'react';
2
 import Taro from '@tarojs/taro';
2
 import Taro from '@tarojs/taro';
3
 import Page from '@/layouts/index';
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
 import logo from '@/assets/image/logo.png';
6
 import logo from '@/assets/image/logo.png';
6
 import peopleicon from '@/assets/icons/peopleicon.png';
7
 import peopleicon from '@/assets/icons/peopleicon.png';
7
 import icon11 from '@/assets/icons/icon11.png';
8
 import icon11 from '@/assets/icons/icon11.png';
63
 
64
 
64
   return (
65
   return (
65
     <Page tabBar="mine">
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
             </View>
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
     </Page>
105
     </Page>
92
   )
106
   )
93
 }
107
 }

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

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

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

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

+ 5
- 13293
yarn.lock
文件差异内容过多而无法显示
查看文件