refine code
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
import fetch from 'utils/fetch';
|
||||
import fetch from 'utils/fetch'
|
||||
|
||||
export function loginByUsername(username, password) {
|
||||
const data = {
|
||||
username,
|
||||
password
|
||||
};
|
||||
}
|
||||
return fetch({
|
||||
url: '/login/login',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
export function logout() {
|
||||
return fetch({
|
||||
url: '/login/logout',
|
||||
method: 'post'
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
export function getInfo(token) {
|
||||
@@ -24,6 +24,6 @@ export function getInfo(token) {
|
||||
url: '/user/info',
|
||||
method: 'get',
|
||||
params: { token }
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user