| | |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {reactive, ref} from "vue"; |
| | | import {ElForm} from "element-plus"; |
| | | import { sm3 } from "sm-crypto"; |
| | | import {encryptSm4} from "@/utils/Sm4Utils"; |
| | | |
| | | const { proxy } = useCurrentInstance(); |
| | | const pwdRef = ref<InstanceType<typeof ElForm>>(); |
| | |
| | | function submit() { |
| | | pwdRef.value!.validate(valid => { |
| | | if (valid) { |
| | | updateUserPwd({oldPassword:sm3(user.oldPassword!) ,newPassword:sm3( user.newPassword!)}).then(response => { |
| | | updateUserPwd({oldPassword:encryptSm4(user.oldPassword!) ,newPassword:encryptSm4( user.newPassword!)}).then(response => { |
| | | proxy.$modal.msgSuccess("修改成功"); |
| | | }); |
| | | } |