diff --git a/components.d.ts b/components.d.ts index 7bee11b..4148205 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,7 +8,6 @@ export {} declare module 'vue' { export interface GlobalComponents { AAvatar: typeof import('ant-design-vue/es')['Avatar'] - AAvatarGroup: typeof import('ant-design-vue/es')['AvatarGroup'] ABadge: typeof import('ant-design-vue/es')['Badge'] AButton: typeof import('ant-design-vue/es')['Button'] ACard: typeof import('ant-design-vue/es')['Card'] @@ -89,6 +88,7 @@ declare module 'vue' { Ellipsis: typeof import('./src/components/MyUI/Ellipsis/Ellipsis.vue')['default'] Empty: typeof import('./src/components/MyUI/Empty/Empty.vue')['default'] EyeOutlined: typeof import('@ant-design/icons-vue')['EyeOutlined'] + FileImageOutlined: typeof import('@ant-design/icons-vue')['FileImageOutlined'] Flex: typeof import('./src/components/MyUI/Flex/Flex.vue')['default'] FloatButton: typeof import('./src/components/MyUI/FloatButton/FloatButton.vue')['default'] Folder: typeof import('./src/components/Folder/Folder.vue')['default'] diff --git a/package.json b/package.json index 8fde14b..8f33633 100644 --- a/package.json +++ b/package.json @@ -31,13 +31,13 @@ "@types/animejs": "^3.1.12", "@types/crypto-js": "^4.2.2", "@types/json-stringify-safe": "^5.0.3", - "@types/node": "^22.10.5", + "@types/node": "^22.10.6", "@types/nprogress": "^0.2.3", "@vladmandic/face-api": "^1.7.14", "@vuepic/vue-datepicker": "^11.0.1", "@vueuse/core": "^12.4.0", "@vueuse/integrations": "^12.4.0", - "alova": "^3.2.7", + "alova": "^3.2.8", "animejs": "^3.2.2", "ant-design-vue": "^4.2.6", "axios": "^1.7.9", @@ -75,9 +75,9 @@ "@vitejs/plugin-vue": "^5.2.1", "eslint-plugin-vue": "^9.32.0", "globals": "^15.14.0", - "sass": "^1.83.1", + "sass": "^1.83.3", "typescript": "^5.7.3", - "typescript-eslint": "^8.19.1", + "typescript-eslint": "^8.20.0", "unplugin-vue-components": "^28.0.0", "vite": "^6.0.7", "vite-plugin-bundle-obfuscator": "1.4.0", diff --git a/src/api/file/index.ts b/src/api/file/index.ts new file mode 100644 index 0000000..772544b --- /dev/null +++ b/src/api/file/index.ts @@ -0,0 +1,10 @@ +import {service} from "@/utils/alova/service.ts"; + +export const uploadFile = (formData) => { + return service.Post('/api/auth/file/uploads', formData, { + meta: { + ignoreToken: false, + signature: false, + } + }); +}; diff --git a/src/api/upscale/index.ts b/src/api/upscale/index.ts index 5359f99..3641b8b 100644 --- a/src/api/upscale/index.ts +++ b/src/api/upscale/index.ts @@ -2,7 +2,7 @@ import {service} from "@/utils/alova/service.ts"; import {uploadImageRequest} from "@/types/upscale"; export const uploadImage = (data: uploadImageRequest) => { - return service.Post('/api/auth/upscale/upload', { + return service.Post('/api/auth/upscale/phone/upload', { image: data.image, access_token: data.access_token, user_id: data.user_id, diff --git a/src/types/upload.d.ts b/src/types/upload.d.ts new file mode 100644 index 0000000..5d8aa32 --- /dev/null +++ b/src/types/upload.d.ts @@ -0,0 +1,12 @@ +export interface UploadedFile { + id: string; // 唯一标识符 + fileName: string; // 文件名 + file: File | Blob; // 图片数据 + type: string; // 文件类型 + detectionResults: { + isAnime: boolean; + hasFace: boolean; + objectArray: string[] | unknown[]; + landscape: string | null; + }; +} diff --git a/src/views/Photograph/ImageUpload/ImageUpload.vue b/src/views/Photograph/ImageUpload/ImageUpload.vue index 14d38ea..227e0ab 100644 --- a/src/views/Photograph/ImageUpload/ImageUpload.vue +++ b/src/views/Photograph/ImageUpload/ImageUpload.vue @@ -1,7 +1,7 @@ - + - + @@ -11,41 +11,39 @@ - - - - - - 单击或拖动文件到此区域以上传 - - 支持单次或批量上传,严禁上传非法图片,违者将受到法律惩戒。 - - - + + + + + 单击或拖动文件到此区域以上传 + + 支持单次或批量上传,严禁上传非法图片,违者将受到法律惩戒。 + + + AI 正在识别图片,请稍候... + + + - - - 取消 - 上传 - - - -
- -
单击或拖动文件到此区域以上传
- 支持单次或批量上传,严禁上传非法图片,违者将受到法律惩戒。 -
+ +
+ 支持单次或批量上传,严禁上传非法图片,违者将受到法律惩戒。 +
+ AI 正在识别图片,请稍候... +