diff --git a/src/api/Requester.ts b/src/api/Requester.ts index 2cbfc96..e33fce5 100644 --- a/src/api/Requester.ts +++ b/src/api/Requester.ts @@ -2,8 +2,9 @@ import axios from 'axios' import {md5Hex} from "./CryptoUtils"; import {User} from "../entities/User.ts"; import {Auth} from "../entities/Auth.ts"; +import {UnwrapRef} from "vue"; -export const baseUrl = 'http://localhost:8081'; +export const baseUrl = 'https://localhost:8081'; export interface Result { data: T; @@ -17,6 +18,11 @@ export interface Page { total: number; } +export interface File { + page: number; + num: number; +} + export type PageResult = Result> const instance = axios.create({ baseURL: baseUrl, @@ -54,4 +60,8 @@ export const register = (username: string, password: string, auth: Auth, verifyC auth: auth, verifyCode: verifyCode, }) +} + +export const getAllFiles = (page: UnwrapRef, num: UnwrapRef) => { + return instance.get>(`/api/file/getAll?page=${page}&num=${num}`); } \ No newline at end of file diff --git a/src/views/AppMobile.vue b/src/views/AppMobile.vue index 26743c7..93b5f9f 100644 --- a/src/views/AppMobile.vue +++ b/src/views/AppMobile.vue @@ -30,6 +30,7 @@
- + @@ -55,34 +56,39 @@ - +
+ + + +
\ No newline at end of file