Commit a35bcbf9 authored by miaojiale's avatar miaojiale

修改文件地址配置

parent 4dfbfbc9
NODE_ENV = 'development' NODE_ENV = 'development'
VUE_APP_BASE_API = 'mockServer' VUE_APP_BASE_API = 'mockServer'
VUE_APP_BASE_API = 'http://192.168.31.140:11999/' VUE_APP_BASE_API = 'http://192.168.31.140:11999/'
VUE_APP_UPLOAD_API = 'https://ds.cixincloud.com/geca-api/disease-data/file/info/'
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
NODE_ENV = 'production' NODE_ENV = 'production'
VUE_APP_BASE_API = '/geca-api/' VUE_APP_BASE_API = '/geca-api/'
VUE_APP_UPLOAD_API = '/geca-api/disease-data/file/info/'
...@@ -99,6 +99,7 @@ export default { ...@@ -99,6 +99,7 @@ export default {
? "/api" ? "/api"
: process.env.VUE_APP_BASE_API, : process.env.VUE_APP_BASE_API,
fileList: [], fileList: [],
uploadPrefix: process.env.VUE_APP_UPLOAD_API,
} }
}, },
computed: { computed: {
...@@ -119,7 +120,7 @@ export default { ...@@ -119,7 +120,7 @@ export default {
return this.value.map((_) => { return this.value.map((_) => {
return ( return (
_.url || _.url ||
`/geca-api/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}` this.uploadPrefix + `${_.bucket_name}/${_.prefix}-${_.uuid_name}`
) )
}) })
}, },
...@@ -132,7 +133,8 @@ export default { ...@@ -132,7 +133,8 @@ export default {
this.fileList = newValue.map((_) => { this.fileList = newValue.map((_) => {
return { return {
name: _.file_name, name: _.file_name,
url: `/geca-api/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`, url:
this.uploadPrefix + `${_.bucket_name}/${_.prefix}-${_.uuid_name}`,
} }
}) })
}, },
...@@ -204,7 +206,8 @@ export default { ...@@ -204,7 +206,8 @@ export default {
let responseUrl let responseUrl
if (file.response) { if (file.response) {
const _ = file.response.data const _ = file.response.data
responseUrl = `/geca-api/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}` responseUrl =
this.uploadPrefix + `${_.bucket_name}/${_.prefix}-${_.uuid_name}`
} }
try { try {
if (name.match(/\.(png|jpg|jpeg)/)) { if (name.match(/\.(png|jpg|jpeg)/)) {
......
...@@ -124,6 +124,7 @@ export default { ...@@ -124,6 +124,7 @@ export default {
type: String, type: String,
default: "primary", default: "primary",
}, },
value: { value: {
type: Array, type: Array,
default: () => [], default: () => [],
...@@ -133,6 +134,7 @@ export default { ...@@ -133,6 +134,7 @@ export default {
return { return {
imgUrl: "", imgUrl: "",
title: "", title: "",
uploadPrefix: process.env.VUE_APP_UPLOAD_API,
httpPrefix: httpPrefix:
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? "/api" ? "/api"
...@@ -154,10 +156,7 @@ export default { ...@@ -154,10 +156,7 @@ export default {
console.log(this.value) console.log(this.value)
if (!this.value.length || this.accept != "image/*") return [] if (!this.value.length || this.accept != "image/*") return []
return this.value.map((_) => { return this.value.map((_) => {
return ( return _.url || this.uploadPrefix + `${_.bucketName}/${_.uuidName}`
_.url ||
`https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}`
)
}) })
}, },
}, },
...@@ -168,7 +167,7 @@ export default { ...@@ -168,7 +167,7 @@ export default {
this.fileList = newValue.map((_) => { this.fileList = newValue.map((_) => {
return { return {
name: _.fileName, name: _.fileName,
url: `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}`, url: this.uploadPrefix + `${_.bucketName}/${_.uuidName}`,
} }
}) })
}, },
...@@ -235,7 +234,7 @@ export default { ...@@ -235,7 +234,7 @@ export default {
let responseUrl let responseUrl
if (file.response) { if (file.response) {
const _ = file.response.data const _ = file.response.data
responseUrl = `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}` responseUrl = this.uploadPrefix + `${_.bucketName}/${_.uuidName}`
} }
try { try {
if (name.match(/\.(png|jpg|jpeg)/)) { if (name.match(/\.(png|jpg|jpeg)/)) {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="leftImg"> <div class="leftImg">
<img <img
:src=" :src="
'https://ds.cixincloud.com/geca-api/disease-data/file/info/' + uploadPrefix +
item.imgPath[0].bucketName + item.imgPath[0].bucketName +
'/' + '/' +
item.imgPath[0].uuidName item.imgPath[0].uuidName
...@@ -99,6 +99,7 @@ export default { ...@@ -99,6 +99,7 @@ export default {
showDetail: false, showDetail: false,
// 分页数据 // 分页数据
total: 0, total: 0,
uploadPrefix: process.env.VUE_APP_UPLOAD_API,
tableData: [], tableData: [],
} }
}, },
...@@ -150,7 +151,7 @@ export default { ...@@ -150,7 +151,7 @@ export default {
viewDetail(i) { viewDetail(i) {
this.showDetail = true this.showDetail = true
this.pdfSrc = this.pdfSrc =
"https://ds.cixincloud.com/geca-api/disease-data/file/info/" + this.uploadPrefix +
this.tableData[i].filePath[0].bucketName + this.tableData[i].filePath[0].bucketName +
"/" + "/" +
this.tableData[i].filePath[0].uuidName this.tableData[i].filePath[0].uuidName
......
...@@ -82,6 +82,7 @@ export default { ...@@ -82,6 +82,7 @@ export default {
tableData: [], tableData: [],
curPdf: { articleTitle: "测试pdf" }, curPdf: { articleTitle: "测试pdf" },
pdfSrc: "", pdfSrc: "",
uploadPrefix: process.env.VUE_APP_UPLOAD_API,
} }
}, },
mounted() { mounted() {
...@@ -122,7 +123,7 @@ export default { ...@@ -122,7 +123,7 @@ export default {
this.$refs.pdfDialog.showPdf = true this.$refs.pdfDialog.showPdf = true
this.curPdf = item this.curPdf = item
this.pdfSrc = this.pdfSrc =
"https://ds.cixincloud.com/geca-api/disease-data/file/info/" + this.uploadPrefix +
item.filePath[0].bucketName + item.filePath[0].bucketName +
"/" + "/" +
item.filePath[0].uuidName item.filePath[0].uuidName
......
...@@ -322,11 +322,13 @@ export default { ...@@ -322,11 +322,13 @@ export default {
], ],
researchList: ["筛查技术方案", "筛查指南", "学术成果", "项目进展与成果"], researchList: ["筛查技术方案", "筛查指南", "学术成果", "项目进展与成果"],
showFixed: false, showFixed: false,
uploadPrefix: process.env.VUE_APP_UPLOAD_API,
} }
}, },
created() { created() {
this.getArticleList("1") this.getArticleList("1")
this.getArticleList("6") this.getArticleList("6")
console.log(this.uploadPrefix)
}, },
mounted() { mounted() {
this.getRankTotal() this.getRankTotal()
...@@ -373,7 +375,7 @@ export default { ...@@ -373,7 +375,7 @@ export default {
this.$refs.pdfDialog.showPdf = true this.$refs.pdfDialog.showPdf = true
this.curPdf = item this.curPdf = item
this.pdfSrc = this.pdfSrc =
"https://ds.cixincloud.com/geca-api/disease-data/file/info/" + this.uploadPrefix +
item.filePath[0].bucketName + item.filePath[0].bucketName +
"/" + "/" +
item.filePath[0].uuidName item.filePath[0].uuidName
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment