张涛 1 年間 前
コミット
a48fb949dc

+ 1
- 0
config/prod.js ファイルの表示

@@ -3,6 +3,7 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
+    // HOST: '"http://192.168.89.25:9087"',
6 7
     HOST: '"https://wmcj.huoshannews.com"',
7 8
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
8 9
     DEFAULT_POS: '"116.3476917447715,31.409912844296578"', // 霍山县人民政府 gcj02

+ 0
- 1
src/app.config.js ファイルの表示

@@ -28,7 +28,6 @@ export default defineAppConfig({
28 28
     "pages/feedback/issuelist/index",
29 29
     "pages/user/list/index",
30 30
     "pages/user/add/index",
31
-    // "pages/reportList/index",
32 31
   ],
33 32
   subpackages: [
34 33
     {

+ 1
- 0
src/app.js ファイルの表示

@@ -7,6 +7,7 @@ const App = (props) => {
7 7
   Taro.useLaunch(() => {
8 8
     Taro.login({
9 9
       success: (res) => {
10
+        console.log(res)
10 11
         store.getState('user').login(res.code);
11 12
       }
12 13
     });

+ 1
- 1
src/layouts/TabBar.jsx ファイルの表示

@@ -83,7 +83,7 @@ export default (props) => {
83 83
 
84 84
     // 责任单位用户
85 85
     if (duty == ROLE_ORG_USER || duty == ROLE_ORG_MANAGER) {
86
-      return [home, notice, mine];
86
+      return [home, notice,feedback, mine];
87 87
     }
88 88
 
89 89
     if (duty == ROLE_CITIZEN) {

+ 89
- 50
src/pages/feedback/issue/index.jsx ファイルの表示

@@ -1,18 +1,22 @@
1
-import React from 'react';
2
-import Taro from '@tarojs/taro';
3
-import { View } from '@tarojs/components';
4
-import Page from '@/layouts/index';
5
-import { Button, Notify, Field, Cell, CellGroup } from '@antmjs/vantui';
6
-import Map from '@/components/map';
7
-import Uploader from '@/components/Uploader/index';
8
-import mapIcon from '@/assets/icons/marker.png';
9
-import { warn } from '@/utils/message';
10
-import { postTaFeedback } from '@/services/tafeedback';
11
-import { geocoder } from '@/utils/map';
1
+import React from "react";
2
+import Taro from "@tarojs/taro";
3
+import { View } from "@tarojs/components";
4
+import Page from "@/layouts/index";
5
+import { Button, Notify, Field, Cell, CellGroup } from "@antmjs/vantui";
6
+import Map from "@/components/map";
7
+import Uploader from "@/components/Uploader/index";
8
+import mapIcon from "@/assets/icons/marker.png";
9
+import { warn } from "@/utils/message";
10
+import { postTaFeedback } from "@/services/tafeedback";
11
+import { geocoder } from "@/utils/map";
12
+// import { authPhone } from "@/services/wxma";
13
+// import { useModel } from "@/store";
12 14
 
13 15
 export default (props) => {
16
+  // const { setPerson, person } = useModel("user");
17
+  // console.log(person);
14 18
   const readOnly = false;
15
-
19
+  // const [phone, setPhone] = React.useState();
16 20
   const [loading, setLoading] = React.useState(false);
17 21
   const fmRef = React.useRef({
18 22
     typeId: undefined,
@@ -34,47 +38,64 @@ export default (props) => {
34 38
 
35 39
     fmRef.current = data;
36 40
     setFormData(data);
37
-  }
41
+  };
38 42
 
39 43
   const onSubmit = () => {
40
-    console.log(formData)
41 44
     try {
42
-      warn(!formData.addr, '请填写地址')
43
-      warn(!formData.content, '请填写问题描述')
44
-      warn(!formData.attachList || formData.attachList.length < 1, '请上传照片')
45
+      warn(!formData.addr, "请填写地址");
46
+      warn(!formData.content, "请填写问题描述");
47
+      warn(
48
+        !formData.attachList || formData.attachList.length < 1,
49
+        "请上传照片"
50
+      );
45 51
     } catch (e) {
46 52
       return;
47 53
     }
48 54
 
49
-    setLoading(true)
50
-    postTaFeedback(formData).then(() => {
51
-      setLoading(false);
52
-      Taro.navigateBack({
53
-        delta: 1,
54
-        fail: () => {
55
-          Taro.reLaunch({
56
-            url: '/pages/home/index'
57
-          })
58
-        } 
55
+    setLoading(true);
56
+    postTaFeedback(formData)
57
+      .then(() => {
58
+        setLoading(false);
59
+        Taro.navigateBack({
60
+          delta: 1,
61
+          fail: () => {
62
+            Taro.reLaunch({
63
+              url: "/pages/home/index",
64
+            });
65
+          },
66
+        });
67
+      })
68
+      .catch(() => {
69
+        setLoading(false);
59 70
       });
60
-    }).catch(() => {
61
-      setLoading(false);
62
-    })
71
+  };
63 72
 
64
-  }
65
-    
66 73
   const onLocationChange = (loc) => {
67
-    setFieldChange('location', loc);
74
+    setFieldChange("location", loc);
68 75
 
69 76
     if (loc) {
70 77
       // 交换经纬度位置
71
-      const [x, y] = loc.split(',');
72
-      const location = [y, x].join(',');
73
-      geocoder(location).then(e => setFieldChange('addr', e?.address_component?.street_number || e?.address)).catch(console.error)
78
+      const [x, y] = loc.split(",");
79
+      const location = [y, x].join(",");
80
+      geocoder(location)
81
+        .then((e) =>
82
+          setFieldChange(
83
+            "addr",
84
+            e?.address_component?.street_number || e?.address
85
+          )
86
+        )
87
+        .catch(console.error);
74 88
     }
75
-  }
76
-
77
-
89
+  };
90
+
91
+  const onGetPhoneNumber = (e) => {
92
+    // const code = e?.detail?.code;
93
+    // authPhone(code).then((res) => {
94
+    //   setPerson(res.person)
95
+    //   // Taro.setStorage({ key: "phone", data: res.person.phone });
96
+    // });
97
+    // onSubmit();
98
+  };
78 99
   return (
79 100
     <Page tabBar="feedback">
80 101
       <Map
@@ -89,25 +110,24 @@ export default (props) => {
89 110
           value={formData.addr}
90 111
           leftIcon={mapIcon}
91 112
           readonly={readOnly}
92
-          onChange={e => setFieldChange('addr', e.detail)}
113
+          onChange={(e) => setFieldChange("addr", e.detail)}
93 114
         />
94 115
       </CellGroup>
95 116
 
96
-      <CellGroup style={{ marginTop: '20px' }}>
97
-
117
+      <CellGroup style={{ marginTop: "20px" }}>
98 118
         <Cell title="问题描述" size="large" border={false} />
99 119
 
100 120
         <Field
101 121
           type="textarea"
102 122
           placeholder="请输入问题描述"
103 123
           readonly={readOnly}
104
-          autosize={{ minHeight: '120px' }}
124
+          autosize={{ minHeight: "120px" }}
105 125
           value={formData.content}
106
-          onChange={e => setFieldChange('content', e.detail)}
126
+          onChange={(e) => setFieldChange("content", e.detail)}
107 127
         />
108 128
       </CellGroup>
109 129
 
110
-      <CellGroup style={{ marginTop: '20px' }}>
130
+      <CellGroup style={{ marginTop: "20px" }}>
111 131
         <Cell title="拍照" size="large" border={false} />
112 132
 
113 133
         <Cell
@@ -115,15 +135,34 @@ export default (props) => {
115 135
             <Uploader
116 136
               value={formData.attachList}
117 137
               disabled={readOnly}
118
-              onChange={e => setFieldChange('attachList', e)}
138
+              onChange={(e) => setFieldChange("attachList", e)}
119 139
             />
120 140
           }
121 141
         />
122 142
       </CellGroup>
123 143
 
124
-      <View style={{ padding: 'var(--main-space)', background: '#fff' }}>
125
-        <Button block type="primary" onClick={onSubmit}>提交</Button>
144
+      <View style={{ padding: "var(--main-space)", background: "#fff" }}>
145
+        {
146
+      //   person?.phone ?
147
+        
148
+      //  : (
149
+      //     <Button
150
+      //       block
151
+      //       type="primary"
152
+      //       openType="getPhoneNumber"
153
+      //       onGetPhoneNumber={onGetPhoneNumber}
154
+      //       // onClick={onSubmit}
155
+      //     >
156
+      //       提交
157
+      //     </Button>
158
+      //   )
159
+        (
160
+          <Button block type="primary" onClick={onSubmit}>
161
+            提交
162
+          </Button>
163
+        )
164
+        }
126 165
       </View>
127 166
     </Page>
128
-  )
129
-}
167
+  );
168
+};

+ 1
- 0
src/pages/feedback/issuelist/index.jsx ファイルの表示

@@ -27,6 +27,7 @@ export default (props) => {
27 27
   }, [title]);
28 28
 
29 29
   const onClick = (item) => {
30
+    console.log(item)
30 31
     Taro.navigateTo({
31 32
       url: `/pages/issue/edit/index?id=${item.issueId}`
32 33
     })

+ 1
- 0
src/pages/home/components/Head.jsx ファイルの表示

@@ -32,6 +32,7 @@ export default (props) => {
32 32
   }
33 33
 
34 34
   const onSelect = (e) => {
35
+    console.log(e)
35 36
     updateDuty(e.detail.value)
36 37
   }
37 38
 

+ 4
- 3
src/pages/home/index.jsx ファイルの表示

@@ -4,7 +4,7 @@ import Page from '@/layouts/index';
4 4
 import { useModel } from '@/store';
5 5
 import MenuIcon from '@/components/MenuIcon';
6 6
 import { ROLE_CITIZEN, ROLE_INSPECTOR, ROLE_MANAGER, ROLE_ORG_MANAGER, ROLE_ORG_USER, ROLE_QUERY_PERSON } from '@/utils/user';
7
-import { PROCESS_APPLY_DELAY, PROCESS_APPLY_END, PROCESS_APPLY_REJECT, PROCESS_APPLY_VERIFY, PROCESS_ASSIGNED, PROCESS_END, PROCESS_START } from '@/utils/biz';
7
+import { PROCESS_APPLY_DELAY, PROCESS_APPLY_END, PROCESS_APPLY_REJECT, PROCESS_APPLY_VERIFY, PROCESS_ASSIGNED, PROCESS_END, PROCESS_START ,APPLY_REJECT} from '@/utils/biz';
8 8
 import { getApplyNum } from '@/services/taissueapply';
9 9
 import Head from './components/Head';
10 10
 import Banner from './components/Banner';
@@ -44,7 +44,8 @@ const menus = {
44 44
     { icon: 'icon3', text: '已 办 结', link: `/pages/org/issue/list/index?title=已办结&bizStatus=${PROCESS_END}` },
45 45
     { icon: 'icon5', text: '已 逾 期', link: '/pages/org/issue/list/index?title=已逾期&bizStatus=expired' },
46 46
     { icon: 'icon11', text: '消息通知', link: '/pages/message/list/index'},
47
-    // { icon: 'icon10', text: '我的上报', link: '/pages/reportList/index?title=我的上报'},
47
+    { icon: 'icon10', text: '我的上报', link: `/pages/feedback/issuelist/index?title=我的上报&bizStatus=`},
48
+
48 49
   ],
49 50
 
50 51
   // 责任交办单位管理员
@@ -70,7 +71,7 @@ const menus = {
70 71
   [ROLE_CITIZEN]: [
71 72
     { icon: 'icon1', text: '未处理', link: `/pages/feedback/issuelist/index?title=未处理&bizStatus=${PROCESS_START}` },
72 73
     { icon: 'icon2', text: '已处理', link: `/pages/feedback/issuelist/index?title=已处理&bizStatus=${PROCESS_ASSIGNED}` },
73
-    { icon: 'icon12', text: '已打回', link: `/pages/feedback/issuelist/index?title=已打回&bizStatus=reject` },
74
+    { icon: 'icon12', text: '已打回', link: `/pages/feedback/issuelist/index?title=已打回&bizStatus=${APPLY_REJECT}` },
74 75
   ],
75 76
 }
76 77
 

+ 94
- 88
src/pages/issue/edit/index.jsx ファイルの表示

@@ -1,26 +1,31 @@
1
-import React from 'react';
2
-import Taro from '@tarojs/taro';
3
-import { View } from '@tarojs/components';
4
-import { CellGroup, Cell } from '@antmjs/vantui';
5
-import Page from '@/layouts/index';
6
-import { useModel } from '@/store';
7
-import { ROLE_INSPECTOR, ROLE_MANAGER, ROLE_CITIZEN, ROLE_QUERY_PERSON } from '@/utils/user';
8
-import { getTaIssueById } from '@/services/taissue';
9
-import { getSysOrgById } from '@/services/sysorg';
10
-import IssueForm from '../components/Issue';
11
-import Save from './components/Save';
12
-import Edit from './components/Edit';
13
-import Assigned from './components/Assigned';
14
-import Cancel from './components/Cancel';
1
+import React from "react";
2
+import Taro from "@tarojs/taro";
3
+import { View } from "@tarojs/components";
4
+import { CellGroup, Cell } from "@antmjs/vantui";
5
+import Page from "@/layouts/index";
6
+import { useModel } from "@/store";
7
+import {
8
+  ROLE_INSPECTOR,
9
+  ROLE_MANAGER,
10
+  ROLE_CITIZEN,
11
+  ROLE_QUERY_PERSON,
12
+  ROLE_ORG_USER,
13
+} from "@/utils/user";
14
+import { getTaIssueById } from "@/services/taissue";
15
+import { getSysOrgById } from "@/services/sysorg";
16
+import IssueForm from "../components/Issue";
17
+import Save from "./components/Save";
18
+import Edit from "./components/Edit";
19
+import Assigned from "./components/Assigned";
20
+import Cancel from "./components/Cancel";
15 21
 // eslint-disable-next-line import/first
16
-import { PROCESS_END, PROCESS_START } from '@/utils/biz';
22
+import { PROCESS_END, PROCESS_START } from "@/utils/biz";
17 23
 
18 24
 export default (props) => {
19
-
20 25
   const router = Taro.useRouter();
21 26
   const { id } = router.params;
22 27
 
23
-  const { user, duty } = useModel('user');
28
+  const { user, duty } = useModel("user");
24 29
 
25 30
   const [loading, setLoading] = React.useState(false);
26 31
   const [issue, setIssue] = React.useState();
@@ -28,65 +33,53 @@ export default (props) => {
28 33
   React.useMemo(() => {
29 34
     if (id) {
30 35
       Taro.setNavigationBarTitle({
31
-        title: '问题单详情'
32
-      })
36
+        title: "问题单详情",
37
+      });
33 38
     } else {
34 39
       Taro.setNavigationBarTitle({
35
-        title: '我要上报'
36
-      })
40
+        title: "我要上报",
41
+      });
37 42
     }
38 43
   }, [id]);
39 44
 
40 45
   // 各按钮状态
41
-  const [
42
-    readOnly,
43
-    showOrg,
44
-    canEdit,
45
-    canAssigned,
46
-    canCancel,
47
-  ] = React.useMemo(() => {
48
-    // 如果是督查员
49
-    if (duty == ROLE_INSPECTOR) {
50
-      return [
51
-        issue && issue.processNode != PROCESS_START,
52
-        issue?.processNode && issue?.processNode != PROCESS_START, // true,
53
-        issue && issue.processNode == PROCESS_START,
54
-        false,
55
-        false,
56
-      ]
57
-    }
46
+  const [readOnly, showOrg, canEdit, canAssigned, canCancel] =
47
+    React.useMemo(() => {
48
+      // 如果是督查员
49
+      if (duty == ROLE_INSPECTOR) {
50
+        return [
51
+          issue && issue.processNode != PROCESS_START,
52
+          issue?.processNode && issue?.processNode != PROCESS_START, // true,
53
+          issue && issue.processNode == PROCESS_START,
54
+          false,
55
+          false,
56
+        ];
57
+      }
58 58
 
59
-    // 如果是管理员
60
-    if (duty == ROLE_MANAGER) {
61
-      return [
62
-        issue && issue.processNode != PROCESS_START,
63
-        true,
64
-        false,
65
-        issue && issue.processNode == PROCESS_START,
66
-        issue && issue.processNode == PROCESS_START,
67
-      ]
68
-    }
59
+      // 如果是管理员
60
+      if (duty == ROLE_MANAGER) {
61
+        return [
62
+          issue && issue.processNode != PROCESS_START,
63
+          true,
64
+          false,
65
+          issue && issue.processNode == PROCESS_START,
66
+          issue && issue.processNode == PROCESS_START,
67
+        ];
68
+      }
69 69
 
70
-    // 如果是查询员
71
-    if (duty == ROLE_QUERY_PERSON) {
72
-      return [
73
-        true,
74
-        true,
75
-        false,
76
-        false,
77
-        false,
78
-      ]
79
-    }
70
+      // 如果是查询员
71
+      if (duty == ROLE_QUERY_PERSON) {
72
+        return [true, true, false, false, false];
73
+      }
80 74
 
81
-    // 其他人员
82
-    return [
83
-      true,
84
-      false,
85
-      false,
86
-      false,
87
-      false,
88
-    ]
89
-  }, [issue, duty]);
75
+      // 如果是交办单位人员
76
+      if (duty == ROLE_ORG_USER) {
77
+        return [true, true, false, false, false];
78
+      }
79
+
80
+      // 其他人员
81
+      return [true, false, false, false, false];
82
+    }, [issue, duty]);
90 83
 
91 84
   // const onIssueChange = (val = {}) => {
92 85
   //   setIssue({
@@ -97,29 +90,42 @@ export default (props) => {
97 90
 
98 91
   React.useEffect(() => {
99 92
     if (id) {
100
-      setLoading(true)
101
-      getTaIssueById(id).then(res => {
102
-        setLoading(false);
103
-        if (res.orgId) {
104
-          getSysOrgById(res.orgId).then(r => {
105
-            setIssue({
106
-              ...res,
107
-              orgName: r?.name
108
-            });
109
-          }).catch(() => {
93
+      setLoading(true);
94
+      getTaIssueById(id)
95
+        .then((res) => {
96
+          setLoading(false);
97
+          if (res.orgId) {
98
+            getSysOrgById(res.orgId)
99
+              .then((r) => {
100
+                setIssue({
101
+                  ...res,
102
+                  orgName: r?.name,
103
+                });
104
+              })
105
+              .catch(() => {
106
+                setIssue(res);
107
+              });
108
+          } else {
110 109
             setIssue(res);
111
-          })
112
-        } else {
113
-          setIssue(res);
114
-        }
115
-      }).catch(() => {
116
-        setLoading(false);
117
-      });
110
+          }
111
+        })
112
+        .catch(() => {
113
+          setLoading(false);
114
+        });
118 115
     }
119 116
   }, [id]);
120 117
 
121 118
   return (
122
-    <Page roles={[ROLE_INSPECTOR, ROLE_MANAGER, ROLE_CITIZEN, ROLE_QUERY_PERSON]} loading={loading}>
119
+    <Page
120
+      roles={[
121
+        ROLE_INSPECTOR,
122
+        ROLE_MANAGER,
123
+        ROLE_CITIZEN,
124
+        ROLE_ORG_USER,
125
+        ROLE_QUERY_PERSON,
126
+      ]}
127
+      loading={loading}
128
+    >
123 129
       <IssueForm
124 130
         issueId={id}
125 131
         issue={issue}
@@ -127,7 +133,7 @@ export default (props) => {
127 133
         showOrg={showOrg}
128 134
         showExpireDate={showOrg}
129 135
         renderAction={(formData) => (
130
-          <View style={{ padding: 'var(--main-space)', background: '#fff' }}>
136
+          <View style={{ padding: "var(--main-space)", background: "#fff" }}>
131 137
             {!id && <Save formData={formData} />}
132 138
             {canEdit && <Edit issue={issue} formData={formData} />}
133 139
             {canAssigned && <Assigned issue={issue} formData={formData} />}
@@ -136,5 +142,5 @@ export default (props) => {
136 142
         )}
137 143
       />
138 144
     </Page>
139
-  )
140
-}
145
+  );
146
+};

+ 1
- 0
src/pages/login/components/Bottom.jsx ファイルの表示

@@ -9,6 +9,7 @@ export default (props) => {
9 9
   const { signinByPhone } = useModel('user');
10 10
 
11 11
   const onGetPhoneNumber = (e) => {
12
+    console.log(e)
12 13
     const code = e.detail.code;
13 14
     signinByPhone(code).then(props.onSuccess);
14 15
   }

+ 0
- 12
src/pages/reportList/index.jsx ファイルの表示

@@ -1,12 +0,0 @@
1
-// import React from "react";
2
-// import Taro from "@tarojs/taro";
3
-// import Page from "@/layouts/index";
4
-// import PowerList from "@/components/PowerList";
5
-
6
-// export default (props) => {
7
-//   return (
8
-//     <Page>
9
-//       <PowerList request={}/>
10
-//     </Page>
11
-//   )
12
-// };

+ 42
- 32
src/store/user.js ファイルの表示

@@ -1,9 +1,15 @@
1
-import React from 'react';
2
-import Taro from '@tarojs/taro';
3
-import md5 from 'md5';
4
-import { login, signin, currentUser, authPhone, authUser } from '@/services/wxma';
5
-import { changePassword } from '@/services/sysuser';
6
-import { ROLE_CITIZEN } from '@/utils/user';
1
+import React from "react";
2
+import Taro from "@tarojs/taro";
3
+import md5 from "md5";
4
+import {
5
+  login,
6
+  signin,
7
+  currentUser,
8
+  authPhone,
9
+  authUser,
10
+} from "@/services/wxma";
11
+import { changePassword } from "@/services/sysuser";
12
+import { ROLE_CITIZEN } from "@/utils/user";
7 13
 
8 14
 export default function useUser() {
9 15
   const [person, setPerson] = React.useState();
@@ -11,20 +17,23 @@ export default function useUser() {
11 17
   const [duty, setDuty] = React.useState();
12 18
 
13 19
   const maLogin = (code) => {
14
-    login(code).then(res => {
20
+    console.log(code);
21
+    login(code).then((res) => {
15 22
       setPerson(res.person);
16
-      Taro.setStorage({ key: 'personId', data: res.person.personId })
17
-      Taro.setStorage({ key: 'sessionKey', data: res.sessionKey })
23
+      Taro.setStorage({ key: "personId", data: res.person.personId });
24
+      Taro.setStorage({ key: "sessionKey", data: res.sessionKey });
18 25
     });
19
-  }
26
+  };
20 27
 
21 28
   const updateDuty = (d = ROLE_CITIZEN) => {
22 29
     setDuty(d);
23
-    Taro.setStorageSync('duty', d);
24
-  }
30
+    Taro.setStorageSync("duty", d);
31
+  };
25 32
 
26 33
   const initDuty = (u) => {
27
-    const d = Taro.getStorageSync('duty');
34
+    console.log(u)
35
+    const d = Taro.getStorageSync("duty");
36
+    console.log(d)
28 37
     const dutyList = u?.dutyList || [];
29 38
     if (d) {
30 39
       if (dutyList.indexOf(d) < 0) {
@@ -35,55 +44,55 @@ export default function useUser() {
35 44
     } else {
36 45
       updateDuty(dutyList[0]);
37 46
     }
38
-  }
47
+  };
39 48
 
40 49
   const maSignIn = (params) => {
41 50
     const data = {
42 51
       ...params,
43
-      password: md5(params.password)
52
+      password: md5(params.password),
44 53
     };
45 54
 
46
-    return signin(data).then(res => {
55
+    return signin(data).then((res) => {
47 56
       setUser(res.user);
48 57
       initDuty(res.user);
49
-    })
50
-  }
58
+    });
59
+  };
51 60
 
52 61
   const current = () => {
53
-    currentUser().then(res => {
62
+    currentUser().then((res) => {
54 63
       setUser(res.user);
55 64
       initDuty(res.user);
56
-    })
57
-  }
65
+    });
66
+  };
58 67
 
59 68
   const signinByPhone = (code) => {
60
-    return authPhone(code).then(res => {
69
+    return authPhone(code).then((res) => {
61 70
       setUser(res.user);
62 71
       initDuty(res.user);
63 72
       setPerson(res.person);
64
-    })
65
-  }
73
+    });
74
+  };
66 75
 
67 76
   const authProfile = (data) => {
68
-    const sessionKey = Taro.getStorageSync('sessionKey');
69
-    authUser({ ...data, sessionKey }).then(res => {
77
+    const sessionKey = Taro.getStorageSync("sessionKey");
78
+    authUser({ ...data, sessionKey }).then((res) => {
70 79
       setPerson(res);
71
-    })
72
-  }
80
+    });
81
+  };
73 82
 
74 83
   const signOut = () => {
75 84
     setUser(null);
76 85
     initDuty([]);
77
-  }
86
+  };
78 87
 
79 88
   const changePwd = (params) => {
80 89
     const data = {
81 90
       originPassword: md5(params.originPassword),
82 91
       newPassword: md5(params.newPassword),
83
-    }
92
+    };
84 93
 
85 94
     changePassword(data);
86
-  }
95
+  };
87 96
 
88 97
   return {
89 98
     user,
@@ -97,5 +106,6 @@ export default function useUser() {
97 106
     authProfile,
98 107
     signOut,
99 108
     changePwd,
100
-  }
109
+    // setPerson,
110
+  };
101 111
 }