diff --git a/hangtag-module-infra/hangtag-module-infra-biz/src/main/java/cn/hangtag/module/infra/framework/file/core/utils/FileTypeUtils.java b/hangtag-module-infra/hangtag-module-infra-biz/src/main/java/cn/hangtag/module/infra/framework/file/core/utils/FileTypeUtils.java index 71fdc7d..1a9cef2 100644 --- a/hangtag-module-infra/hangtag-module-infra-biz/src/main/java/cn/hangtag/module/infra/framework/file/core/utils/FileTypeUtils.java +++ b/hangtag-module-infra/hangtag-module-infra-biz/src/main/java/cn/hangtag/module/infra/framework/file/core/utils/FileTypeUtils.java @@ -69,6 +69,11 @@ public class FileTypeUtils { response.setHeader("Content-Range", String.valueOf(content.length - 1)); response.setHeader("Accept-Ranges", "bytes"); } + if (contentType.startsWith("image/")) { + // 设置缓存 + response.setHeader("Cache-Control", "max-age=604800"); + response.setHeader("Pragma", "public"); + } // 输出附件 IoUtil.write(response.getOutputStream(), false, content); } diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue index c2458f1..56f8a44 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue @@ -198,7 +198,7 @@
+ :class="{ 'hidden-div': true }">
@@ -437,7 +437,7 @@ const loadConfig = (config: object, propData = {}) => { setTimeout(()=>{ showPng(); - },200) + },100) } const queryUseLabel = (label) => { @@ -498,17 +498,15 @@ const showPng = () => { loading.value = true setTimeout(() => { draftDesignEditRef.value.toPngUrl((url) => { + console.log("url",url) that.previewUrl = url const info = draftDesignEditRef.value.getPropInfo(); - that.propInfo = { ...info.propDefault, ...that.propInfo || {} }; that.propOrderByList = info.propOrderByList; - setTimeout(() => { - submit(); - }, 100) + submit(); loading.value = false; }, { widthScale: that.currentZoom, diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/node/ShapeImageNode.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/node/ShapeImageNode.vue index e17e939..2463fbc 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/node/ShapeImageNode.vue +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/node/ShapeImageNode.vue @@ -14,7 +14,7 @@ :style="svgStyle" > { + console.log("convertImageToBase64",this.cellInfo.style.shape.href,res) // @ts-ignore - // this.hrefBase64 = res - this.cellInfo.style.shape.href = res + this.hrefBase64 = res + // this.cellInfo.style.shape.hrefBase64 = res }) } setTimeout(() => {