diff --git a/04.系统编码/Backend/src/main/resources/application.yml b/04.系统编码/Backend/src/main/resources/application.yml index ed6a5ad..73d76a2 100644 --- a/04.系统编码/Backend/src/main/resources/application.yml +++ b/04.系统编码/Backend/src/main/resources/application.yml @@ -2,7 +2,7 @@ server: port: 8002 spring: datasource: - url: jdbc:mysql://${custom.parent-url}:33306/user_information?useUnicode=true&characteEncoding=utf-8 + url: jdbc:mysql://112.124.40.88:33306/user_information?useUnicode=true&characteEncoding=utf-8 username: root password: 3cqscbr@only1 # url: jdbc:mysql://10.124.102.10:3306/user_information?useUnicode=true&characteEncoding=utf-8 diff --git a/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue b/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue index f52d8c2..b358b8d 100644 --- a/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue +++ b/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue @@ -69,7 +69,7 @@
{{isPlay ? '暂停动画' : '播放动画'}} 下载动画 - 下载隐藏层 +
@@ -203,16 +203,25 @@ import { post } from '../uilts/axios'; } const onDownloadClick = () => { - post("/image/createGif", prepareParams(), 'application/json').then((response: any) => { if (response.error != 0){ console.log(response.message); return; } - - options.downloadSrc = response.data; - console.log(response.data); - document.getElementById("weboDownload").click(); + + fetch(response.data).then(res => { + return res.blob(); + }).then(blob => { + let reader = new FileReader(); + reader.onloadend = function(){ + options.downloadSrc = reader.result; + setTimeout(() => { + document.getElementById("weboDownload").click(); + options.downloadSrc = null; + }, 500); + }; + reader.readAsDataURL(blob); + }).catch(console.error); }) }