diff --git a/frontend/src/pages/index.vue b/frontend/src/pages/index.vue index d3bbcf7..8ae045b 100644 --- a/frontend/src/pages/index.vue +++ b/frontend/src/pages/index.vue @@ -286,7 +286,7 @@ export default { // 将images中的baseurl去掉 this.post.images = this.post.images.map(image => { - return image.replace(this.$baseurl.value, '') + return image.replace(this.$baseurl.value + "/v1/post/download-image/", '') }) this.$axios.post('/v1/post/post-new', this.post) diff --git a/frontend/src/pages/world.vue b/frontend/src/pages/world.vue index 7c1cd78..bc13c34 100644 --- a/frontend/src/pages/world.vue +++ b/frontend/src/pages/world.vue @@ -181,7 +181,7 @@ export default { p[i].created_at = date.getUTCFullYear() + "-" + (date.getUTCMonth() + 1) + "-" + date.getUTCDate() + " " + date.getUTCHours() + ":" + date.getUTCMinutes() + ":" + date.getUTCSeconds() p[i].status = this.statusMap[p[i].status] for (let j = 0; j < p[i].images.length; j++) { - p[i].images[j] = this.$baseurl.value + p[i].images[j] + p[i].images[j] = this.$baseurl.value + "/v1/post/download-image/" + p[i].images[j] } } console.log(p) @@ -251,7 +251,7 @@ export default { p[i].created_at = date.getUTCFullYear() + "-" + (date.getUTCMonth() + 1) + "-" + date.getUTCDate() + " " + date.getUTCHours() + ":" + date.getUTCMinutes() + ":" + date.getUTCSeconds() p[i].status = this.statusMap[p[i].status] for (let j = 0; j < p[i].images.length; j++) { - p[i].images[j] = this.$baseurl.value + p[i].images[j] + p[i].images[j] = this.$baseurl.value + "/v1/post/download-image/" + p[i].images[j] } } console.log(p)