fix
This commit is contained in:
@@ -83,7 +83,7 @@ export function getContestProblem(id: number) {
|
|||||||
export function getUserList(
|
export function getUserList(
|
||||||
offset = 0,
|
offset = 0,
|
||||||
limit = 10,
|
limit = 10,
|
||||||
admin = false,
|
admin = "0",
|
||||||
keyword: string,
|
keyword: string,
|
||||||
) {
|
) {
|
||||||
return http.get("admin/user", {
|
return http.get("admin/user", {
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ const options: SelectOption[] = [
|
|||||||
|
|
||||||
async function listUsers() {
|
async function listUsers() {
|
||||||
const offset = (query.page - 1) * query.limit
|
const offset = (query.page - 1) * query.limit
|
||||||
const res = await getUserList(offset, query.limit, query.admin, query.keyword)
|
const isAdmin = query.admin ? "1" : "0"
|
||||||
|
const res = await getUserList(offset, query.limit, isAdmin, query.keyword)
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
users.value = res.data.results
|
users.value = res.data.results
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user