diff --git a/src/api/Requester.ts b/src/api/Requester.ts index e33fce5..91cc23f 100644 --- a/src/api/Requester.ts +++ b/src/api/Requester.ts @@ -1,10 +1,10 @@ import axios from 'axios' import {md5Hex} from "./CryptoUtils"; -import {User} from "../entities/User.ts"; -import {Auth} from "../entities/Auth.ts"; -import {UnwrapRef} from "vue"; +import {User} from "../entities/User"; +import {Auth} from "../entities/Auth"; +import {File} from "../entities/File"; -export const baseUrl = 'https://localhost:8081'; +export const baseUrl = 'http://localhost:8081'; export interface Result { data: T; @@ -14,15 +14,10 @@ export interface Result { } export interface Page { - data: T[]; + data: Array; total: number; } -export interface File { - page: number; - num: number; -} - export type PageResult = Result> const instance = axios.create({ baseURL: baseUrl, @@ -62,6 +57,6 @@ export const register = (username: string, password: string, auth: Auth, verifyC }) } -export const getAllFiles = (page: UnwrapRef, num: UnwrapRef) => { - return instance.get>(`/api/file/getAll?page=${page}&num=${num}`); +export const getAllFiles = (page: number, num: number) => { + return instance.get>("/api/file/getAll", {params: {num, page}}); } \ No newline at end of file diff --git a/src/entities/File.ts b/src/entities/File.ts new file mode 100644 index 0000000..8db8964 --- /dev/null +++ b/src/entities/File.ts @@ -0,0 +1,10 @@ +export interface File { + downloadCount: number; + hash: string; + id: number; + name: string; + size: number; + type: string; + uploadTime: string; + uploaderName: string; +} \ No newline at end of file diff --git a/src/style.css b/src/style.css index 6e1b86e..e69de29 100644 --- a/src/style.css +++ b/src/style.css @@ -1,3 +0,0 @@ -:root { - background-color: #242424; -} \ No newline at end of file diff --git a/src/views/AppMobile.vue b/src/views/AppMobile.vue index 93b5f9f..d425bd8 100644 --- a/src/views/AppMobile.vue +++ b/src/views/AppMobile.vue @@ -1,11 +1,11 @@