From 46d0be77507a83320d53aaa771a9ff9a052403e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=87=E5=B3=B0?= Date: Wed, 21 Jan 2026 20:54:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=81=AF=E7=AE=B1=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/routers/api_Files.go | 13 +- frontent/ops_vue_js/package-lock.json | 17 + frontent/ops_vue_js/package.json | 2 + .../ops_vue_js/src/components/croppertest.vue | 219 ------------- .../src/components/imageCropperComponent.vue | 297 ------------------ .../ops_vue_js/src/components/useDropzone.vue | 101 +++++- 6 files changed, 123 insertions(+), 526 deletions(-) delete mode 100644 frontent/ops_vue_js/src/components/croppertest.vue delete mode 100644 frontent/ops_vue_js/src/components/imageCropperComponent.vue diff --git a/backend/routers/api_Files.go b/backend/routers/api_Files.go index bc51cf0..e0d9a6f 100644 --- a/backend/routers/api_Files.go +++ b/backend/routers/api_Files.go @@ -126,7 +126,16 @@ func ApiFiles(r *gin.RouterGroup) { models.DB.Create(&fund_file_info) // 传入指针 } - ReturnJson(ctx, "apiOK", nil) + //返回后台存储的URL + download_URL := path.Join("/api/files/download/", hash_str) + get_URL := path.Join("/api/files/get/", hash_str) + re := map[string]interface{}{ + "download": download_URL, + "get": get_URL, + "hash": hash_str, + } + + ReturnJson(ctx, "apiOK", re) } else { ReturnJson(ctx, "file_hash_err", nil) @@ -155,7 +164,7 @@ func ApiFiles(r *gin.RouterGroup) { ReturnJson(ctx, "userCookieError", nil) } - ReturnJson(ctx, "apiErr", nil) + //ReturnJson(ctx, "apiErr", nil) }) // r.GET("/upload", func(ctx *gin.Context) { diff --git a/frontent/ops_vue_js/package-lock.json b/frontent/ops_vue_js/package-lock.json index 23db58a..96dbc25 100644 --- a/frontent/ops_vue_js/package-lock.json +++ b/frontent/ops_vue_js/package-lock.json @@ -38,6 +38,8 @@ "filepond-plugin-image-preview": "^4.6.12", "filepond-plugin-image-resize": "^2.0.10", "flatpickr": "^4.6.13", + "fslightbox": "^3.7.4", + "fslightbox-vue": "^3.0.3", "litepicker": "^2.0.12", "pinia": "^3.0.4", "tom-select": "^2.4.3", @@ -2833,6 +2835,21 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/fslightbox": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/fslightbox/-/fslightbox-3.7.4.tgz", + "integrity": "sha512-zQqMHxiYkR0W/xrWQlchoO626C5KCM6rabpMWiJsy+MZCMHo7zlywsGAOGeOahRUqBZzXT9OeMddiVSfW77gaA==", + "license": "MIT" + }, + "node_modules/fslightbox-vue": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fslightbox-vue/-/fslightbox-vue-3.0.3.tgz", + "integrity": "sha512-+INqEhEqQ6U2380GrMHcO5KVRNjeYLWGd0l+EOIgXklY8V94gwgF9lXLMtgp0sHxMl6LSfm56IV/LcKbldPf9A==", + "license": "MIT", + "peerDependencies": { + "vue": ">=2.5.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", diff --git a/frontent/ops_vue_js/package.json b/frontent/ops_vue_js/package.json index 177b451..299886c 100644 --- a/frontent/ops_vue_js/package.json +++ b/frontent/ops_vue_js/package.json @@ -42,6 +42,8 @@ "filepond-plugin-image-preview": "^4.6.12", "filepond-plugin-image-resize": "^2.0.10", "flatpickr": "^4.6.13", + "fslightbox": "^3.7.4", + "fslightbox-vue": "^3.0.3", "litepicker": "^2.0.12", "pinia": "^3.0.4", "tom-select": "^2.4.3", diff --git a/frontent/ops_vue_js/src/components/croppertest.vue b/frontent/ops_vue_js/src/components/croppertest.vue deleted file mode 100644 index 027b312..0000000 --- a/frontent/ops_vue_js/src/components/croppertest.vue +++ /dev/null @@ -1,219 +0,0 @@ - - - - - diff --git a/frontent/ops_vue_js/src/components/imageCropperComponent.vue b/frontent/ops_vue_js/src/components/imageCropperComponent.vue deleted file mode 100644 index 250d6a6..0000000 --- a/frontent/ops_vue_js/src/components/imageCropperComponent.vue +++ /dev/null @@ -1,297 +0,0 @@ - - - - - \ No newline at end of file diff --git a/frontent/ops_vue_js/src/components/useDropzone.vue b/frontent/ops_vue_js/src/components/useDropzone.vue index ca40e5f..62570e8 100644 --- a/frontent/ops_vue_js/src/components/useDropzone.vue +++ b/frontent/ops_vue_js/src/components/useDropzone.vue @@ -1,31 +1,56 @@