|  | @@ -2,14 +2,11 @@ import React, { useEffect, useState } from 'react'
 | 
												
													
														
															|  |  import Header from '@/components/Header'
 |  |  import Header from '@/components/Header'
 | 
												
													
														
															|  |  import { Button, Form, Input, message } from 'antd'
 |  |  import { Button, Form, Input, message } from 'antd'
 | 
												
													
														
															|  |  import styles from './index.module.scss'
 |  |  import styles from './index.module.scss'
 | 
												
													
														
															|  | 
 |  | +import consts from '@/utils/consts'
 | 
												
													
														
															|  | 
 |  | +import { apiChangePassword } from './api'
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -interface iPassword {
 |  | 
 | 
												
													
														
															|  | -  password: string
 |  | 
 | 
												
													
														
															|  | -  newPassword: string
 |  | 
 | 
												
													
														
															|  | -  confirmPassword: string
 |  | 
 | 
												
													
														
															|  | -}
 |  | 
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -export default function index() {
 |  | 
 | 
												
													
														
															|  | 
 |  | +export default function Index() {
 | 
												
													
														
															|  |    const [ form ] = Form.useForm() 
 |  |    const [ form ] = Form.useForm() 
 | 
												
													
														
															|  |    const [ loading, setLoading ] = useState<boolean>(false)
 |  |    const [ loading, setLoading ] = useState<boolean>(false)
 | 
												
													
														
															|  |  
 |  |  
 | 
												
											
												
													
														
															|  | @@ -17,12 +14,10 @@ export default function index() {
 | 
												
													
														
															|  |    const changePassword = async (values:any) => {
 |  |    const changePassword = async (values:any) => {
 | 
												
													
														
															|  |      setLoading(true)
 |  |      setLoading(true)
 | 
												
													
														
															|  |      
 |  |      
 | 
												
													
														
															|  | -    console.log(values)
 |  | 
 | 
												
													
														
															|  | -    // const { code = -1 } = await apiAccountEdit(values)
 |  | 
 | 
												
													
														
															|  | -    // if (code === consts.RET_CODE.SUCCESS) {
 |  | 
 | 
												
													
														
															|  | -    //   message.success("更新成功!")
 |  | 
 | 
												
													
														
															|  | -    //   initData()
 |  | 
 | 
												
													
														
															|  | -    // }
 |  | 
 | 
												
													
														
															|  | 
 |  | +    const { code = -1 } = await apiChangePassword(values)
 | 
												
													
														
															|  | 
 |  | +    if (code === consts.RET_CODE.SUCCESS) {
 | 
												
													
														
															|  | 
 |  | +      message.success("更新成功!")
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  |     
 |  |     
 | 
												
													
														
															|  |      setLoading(false)
 |  |      setLoading(false)
 | 
												
													
														
															|  |    }
 |  |    }
 | 
												
											
												
													
														
															|  | @@ -32,7 +27,7 @@ export default function index() {
 | 
												
													
														
															|  |        <Header title="账号安全"></Header>
 |  |        <Header title="账号安全"></Header>
 | 
												
													
														
															|  |        <div className={styles.projectInfo}>
 |  |        <div className={styles.projectInfo}>
 | 
												
													
														
															|  |          <Form form={form} className={styles.formContent} layout="vertical" size="small">
 |  |          <Form form={form} className={styles.formContent} layout="vertical" size="small">
 | 
												
													
														
															|  | -          <Form.Item name="password" label="旧密码" rules={[ { required: true, message: '请输入旧密码' } ]}>
 |  | 
 | 
												
													
														
															|  | 
 |  | +          <Form.Item name="password" label="原密码" rules={[ { required: true, message: '请输入原密码' } ]}>
 | 
												
													
														
															|  |              <Input.Password></Input.Password>
 |  |              <Input.Password></Input.Password>
 | 
												
													
														
															|  |            </Form.Item>
 |  |            </Form.Item>
 | 
												
													
														
															|  |            <Form.Item name="newPassword" label="新密码" rules={[ { required: true, message: '请输入新密码' } ]}>
 |  |            <Form.Item name="newPassword" label="新密码" rules={[ { required: true, message: '请输入新密码' } ]}>
 |