main
杜函宇 1 year ago
parent 5eae554ee2
commit 355e8f36a2

@ -6,4 +6,6 @@ VUE_APP_BASE_API = '/dashboard'
BASE_API = 'http://47.116.52.164:10002' 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: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'

@ -305,10 +305,8 @@ export default {
let str = row.fileUrl.split(","); let str = row.fileUrl.split(",");
let str1 = str[0].split("."); let str1 = str[0].split(".");
this.fileExtension = str1[str1.length - 1]; 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") { 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.pdfUrl = "https://api.idocv.com/view/url?url=" + str[0];
this.dialogStatus2 = true; this.dialogStatus2 = true;
} else if ( } else if (
@ -320,7 +318,7 @@ export default {
axios({ axios({
method: "get", method: "get",
responseType: "blob", // responseType: "blob", //
url: "/demo" + "/" + lastArr.join("/"), url: row.fileUrl,
}).then(({ data }) => { }).then(({ data }) => {
if (data) { if (data) {
this.dialogStatus2 = true; this.dialogStatus2 = true;

@ -569,12 +569,11 @@ export default {
let str = e.target.dataset.url.split(","); let str = e.target.dataset.url.split(",");
let str1 = str[0].split("."); let str1 = str[0].split(".");
this.fileExtension = str1[str1.length - 1]; this.fileExtension = str1[str1.length - 1];
console.log(this.fileExtension); // let newarr = str[0].split("/");
let newarr = str[0].split("/"); // let lastArr = newarr.slice(3, newarr.length);
let lastArr = newarr.slice(newarr.indexOf("demo") + 1, newarr.length);
if (this.fileExtension == "pdf") { if (this.fileExtension == "pdf") {
// this.pdfUrl = process.env.VUE_APP_BASE_API2 + e.target.dataset.url; // 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.pdfUrl = "https://api.idocv.com/view/url?url=" + str[0];
this.dialogDetails = true; this.dialogDetails = true;
} else if ( } else if (
@ -586,7 +585,7 @@ export default {
axios({ axios({
method: "get", method: "get",
responseType: "blob", // responseType: "blob", //
url: "/demo" + "/" + lastArr.join("/"), url: e.target.dataset.url,
}) })
.then(({ data }) => { .then(({ data }) => {
if (data) { if (data) {

@ -541,10 +541,8 @@ export default {
let str = row.fileUrl.split(","); let str = row.fileUrl.split(",");
let str1 = str[0].split("."); let str1 = str[0].split(".");
this.fileExtension = str1[str1.length - 1]; 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") { 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.pdfUrl = "https://api.idocv.com/view/url?url=" + str[0];
this.dialogDetails = true; this.dialogDetails = true;
} else if ( } else if (
@ -556,7 +554,7 @@ export default {
axios({ axios({
method: "get", method: "get",
responseType: "blob", // responseType: "blob", //
url: "/demo" + "/" + lastArr.join("/"), url: row.fileUrl,
}).then(({ data }) => { }).then(({ data }) => {
if (data) { if (data) {
this.dialogDetails = true; this.dialogDetails = true;

@ -26,7 +26,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
// publicPath: './', // publicPath: './',
publicPath: "/demo/tczzbig", publicPath: "/tczzbig/",
outputDir: "dist", outputDir: "dist",
assetsDir: "static", assetsDir: "static",
lintOnSave: process.env.NODE_ENV === "development", lintOnSave: process.env.NODE_ENV === "development",
@ -60,13 +60,13 @@ module.exports = {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",
}, },
}, },
"/demo": { // "/demo": {
target: "http://39.101.188.84:9999/demo", // 这是本地地址 http://47.116.52.164:10002/sitefiles/wxb/ // target: "http://39.101.188.84:9999/demo", // 这是本地地址 http://47.116.52.164:10002/sitefiles/wxb/
changeOrigin: true, // changeOrigin: true,
pathRewrite: { // pathRewrite: {
"/demo": "", // "/demo": "",
}, // },
}, // },
}, },
}, },
configureWebpack: { configureWebpack: {

Loading…
Cancel
Save