Skip to content

Commit

Permalink
fix: image key
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulter committed Apr 26, 2024
1 parent 0553675 commit 48f84f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/world.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 48f84f3

Please sign in to comment.