This commit is contained in:
2025-04-30 10:09:23 +08:00
parent 40a9a1414b
commit dbd9486d8e
2 changed files with 3 additions and 2 deletions

View File

@@ -83,7 +83,7 @@ export function getContestProblem(id: number) {
export function getUserList(
offset = 0,
limit = 10,
admin = false,
admin = "0",
keyword: string,
) {
return http.get("admin/user", {

View File

@@ -72,7 +72,8 @@ const options: SelectOption[] = [
async function listUsers() {
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
users.value = res.data.results
}