From f93a5719f77508aae2eb45eaa7e68bd447d607e2 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 28 二月 2024 09:39:09 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/account/setting/components/security.jsx | 111 ++++++++++++++++++++++++++++++-------------------------
1 files changed, 61 insertions(+), 50 deletions(-)
diff --git a/zy-asrs-flow/src/pages/account/setting/components/security.jsx b/zy-asrs-flow/src/pages/account/setting/components/security.jsx
index 62663fa..0794cb0 100644
--- a/zy-asrs-flow/src/pages/account/setting/components/security.jsx
+++ b/zy-asrs-flow/src/pages/account/setting/components/security.jsx
@@ -1,59 +1,70 @@
-import { List } from 'antd';
+import { Card, Form, message } from 'antd';
import React from 'react';
-
-
-const passwordStrength = {
- strong: <span className="strong">寮�</span>,
- medium: <span className="medium">涓�</span>,
- weak: <span className="weak">寮� Weak</span>,
-};
+import {
+ ProForm,
+ ProFormText
+} from '@ant-design/pro-components';
+import { useModel } from '@umijs/max';
+import Http from '@/utils/http';
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 [form] = Form.useForm();
+ const { initialState } = useModel('@@initialState');
+ const { currentUser } = initialState || {};
- const data = getData();
+ const handleFinish = (values) => {
+ console.log(values);
+ }
+
return (
<>
- <List
- itemLayout="horizontal"
- dataSource={data}
- renderItem={(item) => (
- <List.Item actions={item.actions}>
- <List.Item.Meta title={item.title} description={item.description} />
- </List.Item>
- )}
- />
+ <Card>
+ <ProForm
+ form={form}
+ layout="vertical"
+ onFinish={handleFinish}
+ submitter={{
+ searchConfig: {
+ submitText: '淇敼瀵嗙爜',
+ },
+ render: (_, dom) => dom[1],
+ }}
+ >
+ <ProFormText.Password
+ width="md"
+ name="currentPwd"
+ label="褰撳墠瀵嗙爜"
+ rules={[
+ {
+ required: true,
+ message: '璇疯緭鍏ュ綋鍓嶅瘑鐮�!',
+ },
+ ]}
+ />
+ <ProFormText.Password
+ width="md"
+ name="newPwd"
+ label="鏂板瘑鐮�"
+ rules={[
+ {
+ required: true,
+ message: '璇疯緭鍏ユ柊瀵嗙爜!',
+ },
+ ]}
+ />
+ <ProFormText.Password
+ width="md"
+ name="newPwdRepeat"
+ label="纭瀵嗙爜"
+ rules={[
+ {
+ required: true,
+ message: '璇峰啀娆¤緭鍏ユ柊瀵嗙爜!',
+ },
+ ]}
+ />
+ </ProForm>
+ </Card>
</>
);
};
--
Gitblit v1.9.1