mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-13 04:02:56 +08:00
umi-request 替换为 axios
This commit is contained in:
@@ -22,10 +22,8 @@ const SecuritySettings = ({ user, userChange }: any) => {
|
||||
const handleOk = (values: any) => {
|
||||
request
|
||||
.put(`${config.apiPrefix}user`, {
|
||||
data: {
|
||||
username: values.username,
|
||||
password: values.password,
|
||||
},
|
||||
username: values.username,
|
||||
password: values.password,
|
||||
})
|
||||
.then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
@@ -64,7 +62,7 @@ const SecuritySettings = ({ user, userChange }: any) => {
|
||||
const completeTowFactor = () => {
|
||||
setLoading(true);
|
||||
request
|
||||
.put(`${config.apiPrefix}user/two-factor/active`, { data: { code } })
|
||||
.put(`${config.apiPrefix}user/two-factor/active`, { code })
|
||||
.then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
if (data) {
|
||||
|
||||
Reference in New Issue
Block a user