From 355e8f36a2a1e5fa68eadd7aecaf5ebeedbe0665 Mon Sep 17 00:00:00 2001 From: dhy1725534722 <1725534722@qq.com> Date: Tue, 21 Nov 2023 10:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 +++- .../security/components/ReportingStatistics.vue | 6 ++---- .../security/components/componentRight.vue | 9 ++++----- .../sentiment/components/componentRight.vue | 6 ++---- vue.config.js | 16 ++++++++-------- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.env.production b/.env.production index 0e73fed..8b80d54 100644 --- a/.env.production +++ b/.env.production @@ -6,4 +6,6 @@ VUE_APP_BASE_API = '/dashboard' BASE_API = 'http://47.116.52.164:10002' # VUE_APP_BASE_API2 = 'http://39.101.188.84:9027' -VUE_APP_BASE_API2 = 'http://39.101.188.84:9035' +# VUE_APP_BASE_API2 = 'http://39.101.188.84:9035' +VUE_APP_BASE_API2 = 'http://20.1.0.157:9035' + diff --git a/src/views/privateOrder/security/components/ReportingStatistics.vue b/src/views/privateOrder/security/components/ReportingStatistics.vue index 6f5a588..325bc4b 100644 --- a/src/views/privateOrder/security/components/ReportingStatistics.vue +++ b/src/views/privateOrder/security/components/ReportingStatistics.vue @@ -305,10 +305,8 @@ export default { let str = row.fileUrl.split(","); let str1 = str[0].split("."); this.fileExtension = str1[str1.length - 1]; - let newarr = str[0].split("/"); - let lastArr = newarr.slice(newarr.indexOf("demo") + 1, newarr.length); if (this.fileExtension == "pdf") { - this.getNumPages("/demo" + "/" + lastArr.join("/")); + this.getNumPages(row.fileUrl); // this.pdfUrl = "https://api.idocv.com/view/url?url=" + str[0]; this.dialogStatus2 = true; } else if ( @@ -320,7 +318,7 @@ export default { axios({ method: "get", responseType: "blob", // 设置响应文件格式 - url: "/demo" + "/" + lastArr.join("/"), + url: row.fileUrl, }).then(({ data }) => { if (data) { this.dialogStatus2 = true; diff --git a/src/views/privateOrder/security/components/componentRight.vue b/src/views/privateOrder/security/components/componentRight.vue index 0e5887c..ec1ad9a 100644 --- a/src/views/privateOrder/security/components/componentRight.vue +++ b/src/views/privateOrder/security/components/componentRight.vue @@ -569,12 +569,11 @@ export default { let str = e.target.dataset.url.split(","); let str1 = str[0].split("."); this.fileExtension = str1[str1.length - 1]; - console.log(this.fileExtension); - let newarr = str[0].split("/"); - let lastArr = newarr.slice(newarr.indexOf("demo") + 1, newarr.length); + // let newarr = str[0].split("/"); + // let lastArr = newarr.slice(3, newarr.length); if (this.fileExtension == "pdf") { // this.pdfUrl = process.env.VUE_APP_BASE_API2 + e.target.dataset.url; - this.getNumPages("/demo" + "/" + lastArr.join("/")); + this.getNumPages(e.target.dataset.url); // this.pdfUrl = "https://api.idocv.com/view/url?url=" + str[0]; this.dialogDetails = true; } else if ( @@ -586,7 +585,7 @@ export default { axios({ method: "get", responseType: "blob", // 设置响应文件格式 - url: "/demo" + "/" + lastArr.join("/"), + url: e.target.dataset.url, }) .then(({ data }) => { if (data) { diff --git a/src/views/privateOrder/sentiment/components/componentRight.vue b/src/views/privateOrder/sentiment/components/componentRight.vue index 7dbfa0a..919ff43 100644 --- a/src/views/privateOrder/sentiment/components/componentRight.vue +++ b/src/views/privateOrder/sentiment/components/componentRight.vue @@ -541,10 +541,8 @@ export default { let str = row.fileUrl.split(","); let str1 = str[0].split("."); this.fileExtension = str1[str1.length - 1]; - let newarr = str[0].split("/"); - let lastArr = newarr.slice(newarr.indexOf("demo") + 1, newarr.length); if (this.fileExtension == "pdf") { - this.getNumPages("/demo" + "/" + lastArr.join("/")); + this.getNumPages( row.fileUrl); // this.pdfUrl = "https://api.idocv.com/view/url?url=" + str[0]; this.dialogDetails = true; } else if ( @@ -556,7 +554,7 @@ export default { axios({ method: "get", responseType: "blob", // 设置响应文件格式 - url: "/demo" + "/" + lastArr.join("/"), + url: row.fileUrl, }).then(({ data }) => { if (data) { this.dialogDetails = true; diff --git a/vue.config.js b/vue.config.js index b7842d4..e4ce4e5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -26,7 +26,7 @@ module.exports = { * Detail: https://cli.vuejs.org/config/#publicpath */ // publicPath: './', - publicPath: "/demo/tczzbig", + publicPath: "/tczzbig/", outputDir: "dist", assetsDir: "static", lintOnSave: process.env.NODE_ENV === "development", @@ -60,13 +60,13 @@ module.exports = { ["^" + process.env.VUE_APP_BASE_API]: "", }, }, - "/demo": { - target: "http://39.101.188.84:9999/demo", // 这是本地地址 http://47.116.52.164:10002/sitefiles/wxb/ - changeOrigin: true, - pathRewrite: { - "/demo": "", - }, - }, + // "/demo": { + // target: "http://39.101.188.84:9999/demo", // 这是本地地址 http://47.116.52.164:10002/sitefiles/wxb/ + // changeOrigin: true, + // pathRewrite: { + // "/demo": "", + // }, + // }, }, }, configureWebpack: {