From e1b128ff4ca322e7ee01c02c86b9d7536485c8ed Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Mon, 24 Feb 2025 10:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=80=83=E5=8B=A4=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A1=E6=89=B9=E3=80=81=E8=80=83=E5=8B=A4?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E4=BF=AE=E6=94=B9=E8=AE=B0=E5=BD=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 6 ++++++ src/views/report/attReport/check.vue | 5 +---- src/views/report/attReport/index.vue | 5 +---- src/views/report/attReport/record.vue | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main.js b/src/main.js index 44487f2..4822083 100644 --- a/src/main.js +++ b/src/main.js @@ -94,3 +94,9 @@ new Vue({ store, render: h => h(App) }) + +/** + * 文件路径 + * @type {string} + */ +Vue.prototype.$baseUrl = 'http://192.168.0.14:8001/gzatt-api/system/statics' diff --git a/src/views/report/attReport/check.vue b/src/views/report/attReport/check.vue index 3b02d21..e2c42ae 100644 --- a/src/views/report/attReport/check.vue +++ b/src/views/report/attReport/check.vue @@ -540,10 +540,7 @@ export default { var filePath = this.getFilePath(filesVoList, type); var fileName = this.getFileName(filesVoList, type); - var url_="http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken(); - - console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken()) - console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken()) + var url_=this.$baseUrl + filePath +"?token="+ getToken(); // var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); // window.open(url_) // 根据文件路径打开预览窗口 diff --git a/src/views/report/attReport/index.vue b/src/views/report/attReport/index.vue index 185a41b..bd23a33 100644 --- a/src/views/report/attReport/index.vue +++ b/src/views/report/attReport/index.vue @@ -869,10 +869,7 @@ export default { var filePath = this.getFilePath(filesVoList, type); var fileName = this.getFileName(filesVoList, type); - var url_="http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken(); - - console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken()) - console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken()) + var url_=this.$baseUrl + filePath +"?token="+ getToken(); // var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); // window.open(url_) // 根据文件路径打开预览窗口 diff --git a/src/views/report/attReport/record.vue b/src/views/report/attReport/record.vue index a93d414..e7f0050 100644 --- a/src/views/report/attReport/record.vue +++ b/src/views/report/attReport/record.vue @@ -433,7 +433,7 @@ export default { var filePath = this.getFilePath(filesVoList, type); var fileName = this.getFileName(filesVoList, type); - var url_="http://192.168.0.14:8001/gzatt-api/system/statics" + filePath +"?token="+ getToken(); + var url_=this.$baseUrl + filePath +"?token="+ getToken(); console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken()) console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken())