diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index 99adad7a..74a02934 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -341,7 +341,7 @@ export default { }) }, handleSelectPostThumb(data) { - this.postToStage.thumbnail = data.path + this.postToStage.thumbnail = encodeURI(data.path) this.thumDrawerVisible = false }, autoSaveTimer() { @@ -359,7 +359,7 @@ export default { if (responseObject.status === 200) { var MavonEditor = this.$refs.md - MavonEditor.$img2Url(pos, responseObject.data.path) + MavonEditor.$img2Url(pos, encodeURI(responseObject.data.path)) this.$message.success('图片上传成功') } else { this.$message.error('图片上传失败:' + responseObject.message) diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index 5f9f5eec..326b631e 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -620,7 +620,7 @@ export default { }) }, handleSelectPostThumb(data) { - this.selectedPost.thumbnail = data.path + this.selectedPost.thumbnail = encodeURI(data.path) this.thumDrawerVisible = false }, handlerRemoveThumb() { diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index c3b15246..399dcedd 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -250,7 +250,7 @@ export default { } }, handleSelectSheetThumb(data) { - this.sheetToStage.thumbnail = data.path + this.sheetToStage.thumbnail = encodeURI(data.path) this.thumDrawerVisible = false }, autoSaveTimer() { @@ -268,7 +268,7 @@ export default { if (responseObject.status === 200) { var MavonEditor = this.$refs.md - MavonEditor.$img2Url(pos, responseObject.data.path) + MavonEditor.$img2Url(pos, encodeURI(responseObject.data.path)) this.$message.success('图片上传成功') } else { this.$message.error('图片上传失败:' + responseObject.message) diff --git a/src/views/sheet/internal/PhotoList.vue b/src/views/sheet/internal/PhotoList.vue index 727d0676..e747f049 100644 --- a/src/views/sheet/internal/PhotoList.vue +++ b/src/views/sheet/internal/PhotoList.vue @@ -364,7 +364,7 @@ export default { this.thumDrawerVisible = true }, selectPhotoThumb(data) { - this.photo.url = data.path + this.photo.url = encodeURI(data.path) this.thumDrawerVisible = false }, resetParam() { diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 1cd9e6f1..540499d8 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -649,7 +649,7 @@ export default { } }, handleSelectLogo(data) { - this.options.blog_logo = data.path + this.options.blog_logo = encodeURI(data.path) this.logoDrawerVisible = false }, handleTestMailClick() { @@ -658,7 +658,7 @@ export default { }) }, handleSelectFavicon(data) { - this.options.blog_favicon = data.path + this.options.blog_favicon = encodeURI(data.path) this.faviconDrawerVisible = false } } diff --git a/src/views/user/Profile.vue b/src/views/user/Profile.vue index 7a302378..67f9a676 100644 --- a/src/views/user/Profile.vue +++ b/src/views/user/Profile.vue @@ -218,7 +218,7 @@ export default { }) }, handleSelectAvatar(data) { - this.user.avatar = data.path + this.user.avatar = encodeURI(data.path) this.attachmentDrawerVisible = false }, handleSelectGravatar() {