🎨 update

This commit is contained in:
2025-03-22 01:44:22 +08:00
parent 0068d36ac2
commit 86053b6bd8
30 changed files with 774 additions and 98 deletions

22
src/api/admin/index.ts Normal file
View File

@@ -0,0 +1,22 @@
import {service} from "@/utils/alova/service.ts";
/**
* 管理员登录接口
* @param param
*/
export const adminAccountLoginApi = (param: any) => {
return service.Post('/api/user/admin/login', {
account: param.account,
password: param.password,
dots: param.dots,
key: param.key
},
{
meta: {
ignoreToken: true,
authRole: 'admin',
signature: true
}
}
);
};

View File

@@ -21,3 +21,14 @@ export const getSlideCaptchaDataApi = () => {
});
};
/**
* 获取文字验证码图片数据
*/
export const getTextCaptchaDataApi = () => {
return service.Get('/api/captcha/text/generate', {
meta: {
ignoreToken: false
},
});
};

View File

@@ -600,12 +600,16 @@ export const getShareStatisticsInfoApi = () => {
* @param provider
* @param bucket
* @param password
* @param key
* @param dots
*/
export const getPrivateImageListApi = (provider: string, bucket: string, password: string) => {
export const getPrivateImageListApi = (provider: string, bucket: string, password: string, key: string, dots: any) => {
return service.Post('/api/auth/storage/image/private/list', {
provider: provider,
bucket: bucket,
password: password,
key: key,
dots: dots,
}, {
cacheFor: {
expire: 60 * 5,
@@ -625,7 +629,7 @@ export const getPrivateImageListApi = (provider: string, bucket: string, passwor
export const getCoordinateListApi = () => {
return service.Post('/api/auth/storage/coordinate/list', {}, {
cacheFor: {
expire:60 * 60 * 24 * 7,
expire: 60 * 60 * 24 * 7,
mode: "restore",
},
meta: {
@@ -636,3 +640,28 @@ export const getCoordinateListApi = () => {
hitSource: ["upload-file", "delete-images"],
});
};
/**
* 获取单个隐私照片url
* @param id
* @param provider
* @param bucket
* @param password
*/
export const getPrivateImageSingleUrlApi = (id: number,password: string, provider: string, bucket: string, ) => {
return service.Post('/api/auth/storage/image/private/url/single', {
id: id,
provider: provider,
bucket: bucket,
password: password,
}, {
cacheFor: {
expire: 60 * 60 * 24,
mode: "restore",
},
meta: {
ignoreToken: false,
signature: false,
},
name: "get-private-image-single-url",
});
};