From ea697d45be8af9a42bec7f8dfcf5bfa739b62f53 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 27 二月 2024 15:21:27 +0800
Subject: [PATCH] #

---
 /dev/null                                                        |  335 -----------------------
 zy-asrs-flow/src/pages/account/setting/style.style.js            |   74 +++++
 zy-asrs-flow/src/pages/account/setting/components/index.style.js |   60 ++++
 zy-asrs-flow/config/routes.ts                                    |    5 
 zy-asrs-flow/src/pages/account/setting/components/base.jsx       |  155 +++++++++++
 zy-asrs-flow/src/pages/account/setting/components/security.jsx   |   61 ++++
 zy-asrs-flow/src/pages/account/setting/index.jsx                 |   94 ++++++
 zy-asrs-flow/src/components/RightContent/AvatarDropdown.jsx      |   11 
 zy-asrs-flow/tsconfig.json                                       |    2 
 zy-asrs-flow/src/services/route.js                               |   17 +
 10 files changed, 464 insertions(+), 350 deletions(-)

diff --git a/zy-asrs-flow/config/routes.ts b/zy-asrs-flow/config/routes.ts
index cc8e0e9..914e4f3 100644
--- a/zy-asrs-flow/config/routes.ts
+++ b/zy-asrs-flow/config/routes.ts
@@ -24,11 +24,6 @@
         path: '/user/login',
         component: './User/Login/index',
       },
-      {
-        name: 'setting',
-        path: '/user/setting',
-        component: './User/Setting/index',
-      },
     ],
   },
   {
diff --git a/zy-asrs-flow/src/components/RightContent/AvatarDropdown.jsx b/zy-asrs-flow/src/components/RightContent/AvatarDropdown.jsx
index ea718d8..9f1889b 100644
--- a/zy-asrs-flow/src/components/RightContent/AvatarDropdown.jsx
+++ b/zy-asrs-flow/src/components/RightContent/AvatarDropdown.jsx
@@ -110,14 +110,9 @@
     //     },
     //   ]
     //   : []),
-    {
-      key: 'setting',
-      icon: <SettingOutlined />,
-      label: '涓汉璁剧疆',
-    },
-    {
-      type: 'divider'
-    },
+    // {
+    //   type: 'divider'
+    // },
     {
       key: 'logout',
       icon: <LogoutOutlined />,
diff --git a/zy-asrs-flow/src/pages/User/Setting/index.jsx b/zy-asrs-flow/src/pages/User/Setting/index.jsx
deleted file mode 100644
index de71cd0..0000000
--- a/zy-asrs-flow/src/pages/User/Setting/index.jsx
+++ /dev/null
@@ -1,335 +0,0 @@
-import {
-    LockOutlined,
-    MobileOutlined,
-    UserOutlined,
-} from '@ant-design/icons';
-import {
-    LoginFormPage,
-    ProConfigProvider,
-    ProFormCaptcha,
-    ProFormCheckbox,
-    ProFormText,
-    ProFormSelect
-} from '@ant-design/pro-components';
-import { Button, Divider, Alert, Tabs, message, theme, Form } from 'antd';
-import { useState, useEffect } from 'react';
-import { FormattedMessage, history, SelectLang, useIntl, useModel, Helmet } from '@umijs/max';
-import { flushSync } from 'react-dom';
-import { request } from '@umijs/max';
-import { setToken } from '@/utils/token-util'
-import { PROJECT_NAME } from '@/config/setting'
-import Http from '@/utils/http';
-
-import logo from '/public/img/logo.png'
-import logoBg from '/public/login-bg.mp4'
-
-const LoginMessage = ({ content }) => {
-    return (
-        <Alert
-            style={{
-                marginBottom: 24,
-            }}
-            message={content}
-            type="error"
-            showIcon
-        />
-    );
-};
-
-const Page = () => {
-    const intl = useIntl();
-    const { initialState, setInitialState } = useModel('@@initialState');
-    const { token } = theme.useToken();
-
-    const [form] = Form.useForm();
-    const [loginType, setLoginType] = useState('account');
-    const [status, setStatus] = useState(200);
-    const [rememberMe, setRememberMe] = useState(() => {
-        const storedValue = localStorage.getItem('rememberMe');
-        return storedValue !== null ? JSON.parse(storedValue) : true;
-    });
-    const [rememberData, setRememberData] = useState(() => {
-        const storedValue = localStorage.getItem('rememberData');
-        return storedValue !== null ? JSON.parse(storedValue) : true;
-    });
-    const [hostList, setHostList] = useState([]);
-
-    useEffect(() => {
-        form.setFieldsValue({
-            autoLogin: rememberMe
-        });
-        localStorage.setItem('rememberMe', JSON.stringify(rememberMe));
-    }, [rememberMe])
-
-    useEffect(() => {
-        form.setFieldsValue({
-            username: rememberData.username,
-            password: rememberData.password
-        });
-        localStorage.setItem('rememberData', JSON.stringify(rememberData));
-    }, [rememberData])
-
-    useEffect(() => {
-        const fetchHostList = async () => {
-            const resp = await Http.doGet('api/auth/host');
-            const list = resp.data.map(item => ({
-                label: item.name,
-                value: item.id
-            }));
-            setHostList(list);
-            if (list && list.length > 0) {
-                form.setFieldsValue({
-                    hostId: list[0].value
-                });
-            }
-        }
-        fetchHostList();
-    }, []);
-
-    const fetchUserInfo = async () => {
-        const userInfo = await initialState?.fetchUserInfo?.();
-        if (userInfo) {
-            flushSync(() => {
-                setInitialState((s) => ({
-                    ...s,
-                    currentUser: userInfo,
-                }));
-            });
-        }
-    };
-
-
-    const handleSubmit = async (values) => {
-        try {
-            const r = await request('/api/login', {
-                method: 'POST',
-                headers: {
-                    'Content-Type': 'application/json'
-                },
-                data: values
-            })
-
-            if (r.code === 200) {
-                localStorage.removeItem("rememberData");
-                if (rememberMe) {
-                    setRememberData({
-                        username: values.username,
-                        password: values.password
-                    })
-                }
-                message.success(intl.formatMessage({
-                    id: 'pages.login.success',
-                    defaultMessage: '鐧诲綍鎴愬姛锛�',
-                }));
-                setToken(r.data.accessToken, values.autoLogin);
-                await fetchUserInfo();
-                const urlParams = new URL(window.location.href).searchParams;
-                history.push(urlParams.get('redirect') || '/');
-                return;
-            }
-            setStatus(r.code);
-        } catch (error) {
-            console.log(error);
-            message.error(intl.formatMessage({
-                id: 'pages.login.failure',
-                defaultMessage: '鐧诲綍澶辫触锛岃閲嶈瘯锛�',
-            }));
-        }
-    }
-
-    return (
-        <div
-            style={{
-                backgroundColor: 'white',
-                height: '100vh',
-            }}
-        >
-            <LoginFormPage
-                form={form}
-                logo={logo}
-                backgroundVideoUrl={logoBg}
-                // title="闄嗘檽娑�"
-                // subTitle="闄嗘檽娑�..."
-                containerStyle={{
-                    backgroundColor: 'rgba(0, 0, 0,0.65)',
-                    backdropFilter: 'blur(4px)',
-                }}
-                onFinish={async (values) => {
-                    await handleSubmit(values);
-                }}
-                initialValue={{
-                }}
-            >
-                <Tabs
-                    centered
-                    activeKey={loginType}
-                    onChange={(activeKey) => setLoginType(activeKey)}
-                >
-                    <Tabs.TabPane key={'account'} tab={'璐﹀彿瀵嗙爜鐧诲綍'} />
-                    <Tabs.TabPane key={'phone'} tab={'鎵嬫満鍙风櫥褰�'} />
-                </Tabs>
-                {loginType === 'account' && (
-                    <>
-                        <ProFormSelect
-                            className="centered-select"
-                            name="hostId"
-                            placeholder="鏈烘瀯锛�"
-                            rules={[
-                                {
-                                    required: true,
-                                    message: '璇烽�夋嫨鏈烘瀯!',
-                                },
-                            ]}
-                            options={hostList}
-                        />
-                        <ProFormText
-                            name="username"
-                            fieldProps={{
-                                size: 'large',
-                                prefix: (
-                                    <UserOutlined
-                                        style={{
-                                            color: token.colorText,
-                                        }}
-                                        className={'prefixIcon'}
-                                    />
-                                ),
-                            }}
-                            placeholder={'鐢ㄦ埛鍚�: '}
-                            rules={[
-                                {
-                                    required: true,
-                                    message: '璇疯緭鍏ョ敤鎴峰悕!',
-                                },
-                            ]}
-                        />
-                        <ProFormText.Password
-                            name="password"
-                            fieldProps={{
-                                size: 'large',
-                                prefix: (
-                                    <LockOutlined
-                                        style={{
-                                            color: token.colorText,
-                                        }}
-                                        className={'prefixIcon'}
-                                    />
-                                ),
-                            }}
-                            placeholder={'瀵嗙爜: '}
-                            rules={[
-                                {
-                                    required: true,
-                                    message: '璇疯緭鍏ュ瘑鐮侊紒',
-                                },
-                            ]}
-                        />
-                    </>
-                )}
-                {status !== 200 && loginType === 'account' && (
-                    <LoginMessage
-                        content={'璐︽埛鎴栧瘑鐮侀敊璇�'}
-                    />
-                )}
-                {loginType === 'phone' && (
-                    <>
-                        <ProFormSelect
-                            className="centered-select"
-                            name="hostId"
-                            placeholder="鏈烘瀯锛�"
-                            rules={[
-                                {
-                                    required: true,
-                                    message: '璇烽�夋嫨鏈烘瀯!',
-                                },
-                            ]}
-                            options={hostList}
-                        />
-                        <ProFormText
-                            fieldProps={{
-                                size: 'large',
-                                prefix: (
-                                    <MobileOutlined
-                                        style={{
-                                            color: token.colorText,
-                                        }}
-                                        className={'prefixIcon'}
-                                    />
-                                ),
-                            }}
-                            name="mobile"
-                            placeholder={'鎵嬫満鍙�'}
-                            rules={[
-                                {
-                                    required: true,
-                                    message: '璇疯緭鍏ユ墜鏈哄彿锛�',
-                                },
-                                {
-                                    pattern: /^1\d{10}$/,
-                                    message: '鎵嬫満鍙锋牸寮忛敊璇紒',
-                                },
-                            ]}
-                        />
-                        <ProFormCaptcha
-                            fieldProps={{
-                                size: 'large',
-                                prefix: (
-                                    <LockOutlined
-                                        style={{
-                                            color: token.colorText,
-                                        }}
-                                        className={'prefixIcon'}
-                                    />
-                                ),
-                            }}
-                            captchaProps={{
-                                size: 'large',
-                            }}
-                            placeholder={'璇疯緭鍏ラ獙璇佺爜'}
-                            captchaTextRender={(timing, count) => {
-                                if (timing) {
-                                    return `${count} ${'鑾峰彇楠岃瘉鐮�'}`;
-                                }
-                                return '鑾峰彇楠岃瘉鐮�';
-                            }}
-                            name="captcha"
-                            rules={[
-                                {
-                                    required: true,
-                                    message: '璇疯緭鍏ラ獙璇佺爜锛�',
-                                },
-                            ]}
-                            onGetCaptcha={async () => {
-                                // message.success('鑾峰彇楠岃瘉鐮佹垚鍔燂紒楠岃瘉鐮佷负锛�1234');
-                                message.warning('鏈紑鍚墜鏈哄彿鐧诲綍! ');
-                            }}
-                        />
-                    </>
-                )}
-                <div
-                    style={{
-                        marginBlockEnd: 24,
-                    }}
-                >
-                    <ProFormCheckbox
-                        noStyle
-                        name="autoLogin"
-                        onChange={(e) => {
-                            setRememberMe(e.target.checked);
-                        }}
-                    >
-                        鑷姩鐧诲綍
-                    </ProFormCheckbox>
-                </div>
-            </LoginFormPage>
-        </div>
-    );
-};
-
-export default () => {
-    return (
-        <ProConfigProvider dark>
-            <Page />
-        </ProConfigProvider>
-    );
-};
diff --git a/zy-asrs-flow/src/pages/account/setting/components/base.jsx b/zy-asrs-flow/src/pages/account/setting/components/base.jsx
new file mode 100644
index 0000000..be178d1
--- /dev/null
+++ b/zy-asrs-flow/src/pages/account/setting/components/base.jsx
@@ -0,0 +1,155 @@
+import { UploadOutlined } from '@ant-design/icons';
+import {
+  ProForm,
+  ProFormDependency,
+  ProFormFieldSet,
+  ProFormSelect,
+  ProFormText,
+  ProFormTextArea,
+} from '@ant-design/pro-components';
+import { useRequest } from '@umijs/max';
+import { Button, Input, message, Upload } from 'antd';
+import React from 'react';
+import useStyles from './index.style';
+
+const queryCurrent = () => {
+
+}
+
+const validatorPhone = (rule, value, callback) => {
+  if (!value[0]) {
+    callback('Please input your area code!');
+  }
+  if (!value[1]) {
+    callback('Please input your phone number!');
+  }
+  callback();
+};
+
+const BaseView = () => {
+  const { styles } = useStyles();
+  // 澶村儚缁勪欢 鏂逛究浠ュ悗鐙珛锛屽鍔犺鍓箣绫荤殑鍔熻兘
+  const AvatarView = ({ avatar }) => (
+    <>
+      <div className={styles.avatar_title}>澶村儚</div>
+      <div className={styles.avatar}>
+        <img src={avatar} alt="avatar" />
+      </div>
+      <Upload showUploadList={false}>
+        <div className={styles.button_view}>
+          <Button>
+            <UploadOutlined />
+            鏇存崲澶村儚
+          </Button>
+        </div>
+      </Upload>
+    </>
+  );
+  const { data: currentUser, loading } = useRequest(() => {
+    return queryCurrent();
+  });
+  const getAvatarURL = () => {
+    if (currentUser) {
+      if (currentUser.avatar) {
+        return currentUser.avatar;
+      }
+      const url = 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png';
+      return url;
+    }
+    return '';
+  };
+  const handleFinish = async () => {
+    message.success('鏇存柊鍩烘湰淇℃伅鎴愬姛');
+  };
+  return (
+    <div className={styles.baseView}>
+      {loading ? null : (
+        <>
+          <div className={styles.left}>
+            <ProForm
+              layout="vertical"
+              onFinish={handleFinish}
+              submitter={{
+                searchConfig: {
+                  submitText: '鏇存柊鍩烘湰淇℃伅',
+                },
+                render: (_, dom) => dom[1],
+              }}
+              initialValues={{
+                ...currentUser,
+                phone: currentUser?.phone.split('-'),
+              }}
+              hideRequiredMark
+            >
+              <ProFormText
+                width="md"
+                name="email"
+                label="閭"
+                rules={[
+                  {
+                    required: true,
+                    message: '璇疯緭鍏ユ偍鐨勯偖绠�!',
+                  },
+                ]}
+              />
+              <ProFormText
+                width="md"
+                name="name"
+                label="鏄电О"
+                rules={[
+                  {
+                    required: true,
+                    message: '璇疯緭鍏ユ偍鐨勬樀绉�!',
+                  },
+                ]}
+              />
+              <ProFormTextArea
+                name="profile"
+                label="涓汉绠�浠�"
+                rules={[
+                  {
+                    required: true,
+                    message: '璇疯緭鍏ヤ釜浜虹畝浠�!',
+                  },
+                ]}
+                placeholder="涓汉绠�浠�"
+              />
+
+              <ProFormText
+                width="md"
+                name="address"
+                label="鍦板潃"
+                rules={[
+                  {
+                    required: true,
+                    message: '璇疯緭鍏ユ偍鐨勫湴鍧�!',
+                  },
+                ]}
+              />
+              <ProFormFieldSet
+                name="phone"
+                label="鑱旂郴鐢佃瘽"
+                rules={[
+                  {
+                    required: true,
+                    message: '璇疯緭鍏ユ偍鐨勮仈绯荤數璇�!',
+                  },
+                  {
+                    validator: validatorPhone,
+                  },
+                ]}
+              >
+                <Input className={styles.area_code} />
+                <Input className={styles.phone_number} />
+              </ProFormFieldSet>
+            </ProForm>
+          </div>
+          <div className={styles.right}>
+            <AvatarView avatar={getAvatarURL()} />
+          </div>
+        </>
+      )}
+    </div>
+  );
+};
+export default BaseView;
diff --git a/zy-asrs-flow/src/pages/account/setting/components/index.style.js b/zy-asrs-flow/src/pages/account/setting/components/index.style.js
new file mode 100644
index 0000000..5e4a790
--- /dev/null
+++ b/zy-asrs-flow/src/pages/account/setting/components/index.style.js
@@ -0,0 +1,60 @@
+import { createStyles } from 'antd-style';
+
+const useStyles = createStyles(({ token }) => {
+  return {
+    baseView: {
+      display: 'flex',
+      paddingTop: '12px',
+      '.ant-legacy-form-item .ant-legacy-form-item-control-wrapper': {
+        width: '100%',
+      },
+      [`@media screen and (max-width: ${token.screenXL}px)`]: {
+        flexDirection: 'column-reverse',
+      },
+    },
+    left: {
+      minWidth: '224px',
+      maxWidth: '448px',
+    },
+    right: {
+      flex: '1',
+      paddingLeft: '104px',
+      [`@media screen and (max-width: ${token.screenXL}px)`]: {
+        display: 'flex',
+        flexDirection: 'column',
+        alignItems: 'center',
+        maxWidth: '448px',
+        padding: '20px',
+      },
+    },
+    avatar_title: {
+      height: '22px',
+      marginBottom: '8px',
+      color: token.colorTextHeading,
+      fontSize: token.fontSize,
+      lineHeight: '22px',
+      [`@media screen and (max-width: ${token.screenXL}px)`]: {
+        display: 'none',
+      },
+    },
+    avatar: {
+      width: '144px',
+      height: '144px',
+      marginBottom: '12px',
+      overflow: 'hidden',
+      img: { width: '100%' },
+    },
+    button_view: {
+      width: '144px',
+      textAlign: 'center',
+    },
+    area_code: {
+      width: '72px',
+    },
+    phone_number: {
+      width: '214px',
+    },
+  };
+});
+
+export default useStyles;
diff --git a/zy-asrs-flow/src/pages/account/setting/components/security.jsx b/zy-asrs-flow/src/pages/account/setting/components/security.jsx
new file mode 100644
index 0000000..62663fa
--- /dev/null
+++ b/zy-asrs-flow/src/pages/account/setting/components/security.jsx
@@ -0,0 +1,61 @@
+import { List } from 'antd';
+import React from 'react';
+
+
+const passwordStrength = {
+  strong: <span className="strong">寮�</span>,
+  medium: <span className="medium">涓�</span>,
+  weak: <span className="weak">寮� Weak</span>,
+};
+
+const SecurityView = () => {
+  const getData = () => [
+    {
+      title: '璐︽埛瀵嗙爜',
+      description: (
+        <>
+          褰撳墠瀵嗙爜寮哄害锛�
+          {passwordStrength.strong}
+        </>
+      ),
+      actions: [<a key="Modify">淇敼</a>],
+    },
+    {
+      title: '瀵嗕繚鎵嬫満',
+      description: `宸茬粦瀹氭墜鏈猴細138****8293`,
+      actions: [<a key="Modify">淇敼</a>],
+    },
+    {
+      title: '瀵嗕繚闂',
+      description: '鏈缃瘑淇濋棶棰橈紝瀵嗕繚闂鍙湁鏁堜繚鎶よ处鎴峰畨鍏�',
+      actions: [<a key="Set">璁剧疆</a>],
+    },
+    {
+      title: '澶囩敤閭',
+      description: `宸茬粦瀹氶偖绠憋細ant***sign.com`,
+      actions: [<a key="Modify">淇敼</a>],
+    },
+    {
+      title: 'MFA 璁惧',
+      description: '鏈粦瀹� MFA 璁惧锛岀粦瀹氬悗锛屽彲浠ヨ繘琛屼簩娆$‘璁�',
+      actions: [<a key="bind">缁戝畾</a>],
+    },
+  ];
+
+  const data = getData();
+  return (
+    <>
+      <List
+        itemLayout="horizontal"
+        dataSource={data}
+        renderItem={(item) => (
+          <List.Item actions={item.actions}>
+            <List.Item.Meta title={item.title} description={item.description} />
+          </List.Item>
+        )}
+      />
+    </>
+  );
+};
+
+export default SecurityView;
diff --git a/zy-asrs-flow/src/pages/account/setting/index.jsx b/zy-asrs-flow/src/pages/account/setting/index.jsx
new file mode 100644
index 0000000..7f3a7cc
--- /dev/null
+++ b/zy-asrs-flow/src/pages/account/setting/index.jsx
@@ -0,0 +1,94 @@
+import { GridContent } from '@ant-design/pro-components';
+import { Menu } from 'antd';
+import React, { useLayoutEffect, useRef, useState } from 'react';
+import BaseView from './components/base';
+import SecurityView from './components/security';
+import useStyles from './style.style';
+
+const Settings = () => {
+    const { styles } = useStyles();
+    const menuMap = {
+        base: '鍩烘湰璁剧疆',
+        security: '瀹夊叏璁剧疆',
+        binding: '璐﹀彿缁戝畾',
+        notification: '鏂版秷鎭�氱煡',
+    };
+    const [initConfig, setInitConfig] = useState({
+        mode: 'inline',
+        selectKey: 'base',
+    });
+    const dom = useRef();
+    const resize = () => {
+        requestAnimationFrame(() => {
+            if (!dom.current) {
+                return;
+            }
+            let mode = 'inline';
+            const { offsetWidth } = dom.current;
+            if (dom.current.offsetWidth < 641 && offsetWidth > 400) {
+                mode = 'horizontal';
+            }
+            if (window.innerWidth < 768 && offsetWidth > 400) {
+                mode = 'horizontal';
+            }
+            setInitConfig({
+                ...initConfig,
+                mode: mode,
+            });
+        });
+    };
+    useLayoutEffect(() => {
+        if (dom.current) {
+            window.addEventListener('resize', resize);
+            resize();
+        }
+        return () => {
+            window.removeEventListener('resize', resize);
+        };
+    }, [dom.current]);
+    const getMenu = () => {
+        return Object.keys(menuMap).map((item) => ({ key: item, label: menuMap[item] }));
+    };
+    const renderChildren = () => {
+        const { selectKey } = initConfig;
+        switch (selectKey) {
+            case 'base':
+                return <BaseView />;
+            case 'security':
+                return <SecurityView />;
+            default:
+                return null;
+        }
+    };
+    return (
+        <GridContent>
+            <div
+                className={styles.main}
+                ref={(ref) => {
+                    if (ref) {
+                        dom.current = ref;
+                    }
+                }}
+            >
+                <div className={styles.leftMenu}>
+                    <Menu
+                        mode={initConfig.mode}
+                        selectedKeys={[initConfig.selectKey]}
+                        onClick={({ key }) => {
+                            setInitConfig({
+                                ...initConfig,
+                                selectKey: key,
+                            });
+                        }}
+                        items={getMenu()}
+                    />
+                </div>
+                <div className={styles.right}>
+                    <div className={styles.title}>{menuMap[initConfig.selectKey]}</div>
+                    {renderChildren()}
+                </div>
+            </div>
+        </GridContent>
+    );
+};
+export default Settings;
diff --git a/zy-asrs-flow/src/pages/account/setting/style.style.js b/zy-asrs-flow/src/pages/account/setting/style.style.js
new file mode 100644
index 0000000..8ff0576
--- /dev/null
+++ b/zy-asrs-flow/src/pages/account/setting/style.style.js
@@ -0,0 +1,74 @@
+import { createStyles } from 'antd-style';
+
+const useStyles = createStyles(({ token }) => {
+  return {
+    main: {
+      display: 'flex',
+      width: '100%',
+      height: '100%',
+      paddingTop: '16px',
+      paddingBottom: '16px',
+      backgroundColor: token.colorBgContainer,
+      '.ant-list-split .ant-list-item:last-child': {
+        borderBottom: `1px solid ${token.colorSplit}`,
+      },
+      '.ant-list-item': { paddingTop: '14px', paddingBottom: '14px' },
+      [`@media screen and (max-width: ${token.screenMD}px)`]: {
+        flexDirection: 'column',
+      },
+    },
+    leftMenu: {
+      width: '224px',
+      borderRight: `${token.lineWidth}px solid ${token.colorSplit}`,
+      '.ant-menu-inline': { border: 'none' },
+      '.ant-menu-horizontal': { fontWeight: 'bold' },
+      [`@media screen and (max-width: ${token.screenMD}px)`]: {
+        width: '100%',
+        border: 'none',
+      },
+    },
+    right: {
+      flex: '1',
+      padding: '8px 40px',
+      [`@media screen and (max-width: ${token.screenMD}px)`]: {
+        padding: '40px',
+      },
+    },
+    title: {
+      marginBottom: '12px',
+      color: token.colorTextHeading,
+      fontWeight: '500',
+      fontSize: '20px',
+      lineHeight: '28px',
+    },
+    taobao: {
+      display: 'block',
+      color: '#ff4000',
+      fontSize: '48px',
+      lineHeight: '48px',
+      borderRadius: token.borderRadius,
+    },
+    dingding: {
+      margin: '2px',
+      padding: '6px',
+      color: '#fff',
+      fontSize: '32px',
+      lineHeight: '32px',
+      backgroundColor: '#2eabff',
+      borderRadius: token.borderRadius,
+    },
+    alipay: {
+      color: '#2eabff',
+      fontSize: '48px',
+      lineHeight: '48px',
+      borderRadius: token.borderRadius,
+    },
+    ':global': {
+      'font.strong': { color: token.colorSuccess },
+      'font.medium': { color: token.colorWarning },
+      'font.weak': { color: token.colorError },
+    },
+  };
+});
+
+export default useStyles;
diff --git a/zy-asrs-flow/src/services/route.js b/zy-asrs-flow/src/services/route.js
index 0d77554..34cbd68 100644
--- a/zy-asrs-flow/src/services/route.js
+++ b/zy-asrs-flow/src/services/route.js
@@ -62,12 +62,13 @@
             break;
         }
     }
+    addUserSettingMenu(remoteMenu);
     patchRouteItems(proLayout, remoteMenu);
 }
 
 function patchRouteItems(parent, children) {
     for (const menu of children) {
-        if (menu.component !== null) {
+        if (menu.component !== null && menu.component !== undefined) {
             // children
             const Component = require(`@/pages${menu.path}/index.jsx`).default
             const newRoute = {
@@ -94,5 +95,19 @@
             }
         }
     }
+}
 
+function addUserSettingMenu(remoteMenu) {
+    const settingRoute = {
+        name: "涓汉璁剧疆",
+        path: "/account/setting",
+        component: "/account/setting"
+    }
+    remoteMenu.push({
+        name: "涓汉涓績",
+        path: "/account",
+        component: null,
+        routes: [settingRoute],
+        icon: createIcon('UserOutlined')
+    })
 }
\ No newline at end of file
diff --git a/zy-asrs-flow/tsconfig.json b/zy-asrs-flow/tsconfig.json
index 773d6da..b8ac807 100644
--- a/zy-asrs-flow/tsconfig.json
+++ b/zy-asrs-flow/tsconfig.json
@@ -19,5 +19,5 @@
       "@@test/*": ["./src/.umi-test/*"]
     }
   },
-  "include": ["./**/*.d.ts", "./**/*.ts", "./**/*.tsx", "src/app.tsx", "src/utils/icon-util.js", "src/pages/User/Login/index1.jsx", "src/components/Footer/index.jsx", "src/components/HeaderDropdown/index.jsx", "src/pages/system/host/components/UpdateForm.jsx", "src/pages/system/host/index.jsx", "src/utils/tree-util.js", "src/components/RightContent/index.jsx", "src/components/RightContent/AvatarDropdown.jsx"]
+  "include": ["./**/*.d.ts", "./**/*.ts", "./**/*.tsx", "src/app.tsx", "src/utils/icon-util.js", "src/pages/User/Login/index1.jsx", "src/components/Footer/index.jsx", "src/components/HeaderDropdown/index.jsx", "src/pages/system/host/components/UpdateForm.jsx", "src/pages/system/host/index.jsx", "src/utils/tree-util.js", "src/components/RightContent/index.jsx", "src/components/RightContent/AvatarDropdown.jsx", "src/pages/account/setting/style.style.js", "src/pages/account/setting/components/index.style.js", "src/pages/account/setting/components/security.jsx", "src/pages/account/setting/components/base.jsx"]
 }

--
Gitblit v1.9.1