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())