mirror of
https://github.com/jiangrui1994/CloudSaver.git
synced 2026-01-11 07:38:45 +08:00
feat:版本迭代
This commit is contained in:
@@ -2,22 +2,22 @@ import request from "@/utils/request";
|
||||
import type { ShareInfoResponse, Folder, Save115FileParams } from "@/types";
|
||||
|
||||
export const cloud115Api = {
|
||||
async getShareInfo(shareCode: string, receiveCode = ""): Promise<ShareInfoResponse> {
|
||||
const { data } = await request.get("/api/cloud115/share-info", {
|
||||
async getShareInfo(shareCode: string, receiveCode = "") {
|
||||
const { data } = await request.get<ShareInfoResponse>("/api/cloud115/share-info", {
|
||||
params: { shareCode, receiveCode },
|
||||
});
|
||||
return data;
|
||||
return data as ShareInfoResponse;
|
||||
},
|
||||
|
||||
async getFolderList(parentCid = "0"): Promise<{ data: Folder[] }> {
|
||||
const { data } = await request.get("/api/cloud115/folders", {
|
||||
async getFolderList(parentCid = "0") {
|
||||
const res = await request.get<Folder[]>("/api/cloud115/folders", {
|
||||
params: { parentCid },
|
||||
});
|
||||
return data;
|
||||
return res;
|
||||
},
|
||||
|
||||
async saveFile(params: Save115FileParams) {
|
||||
const { data } = await request.post("/api/cloud115/save", params);
|
||||
return data;
|
||||
const res = await request.post("/api/cloud115/save", params);
|
||||
return res;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user