refactor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import fetch from '@/utils/fetch';
|
||||
import fetch from '@/utils/fetch'
|
||||
|
||||
export function login(email, password) {
|
||||
return fetch({
|
||||
@@ -8,7 +8,7 @@ export function login(email, password) {
|
||||
email,
|
||||
password
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
export function getInfo(token) {
|
||||
@@ -16,15 +16,12 @@ export function getInfo(token) {
|
||||
url: '/user/info',
|
||||
method: 'get',
|
||||
params: { token }
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
export function logout() {
|
||||
return fetch({
|
||||
url: '/user/logout',
|
||||
method: 'post'
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -1,11 +1,9 @@
|
||||
import fetch from '@/utils/fetch';
|
||||
import fetch from '@/utils/fetch'
|
||||
|
||||
export function getList(params) {
|
||||
return fetch({
|
||||
url: '/table/list',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user