Encode attachment url.

pull/35/head
ruibaby 2019-07-16 21:43:20 +08:00
parent 99973c0ef2
commit a8434eb04b
6 changed files with 9 additions and 9 deletions

View File

@ -341,7 +341,7 @@ export default {
}) })
}, },
handleSelectPostThumb(data) { handleSelectPostThumb(data) {
this.postToStage.thumbnail = data.path this.postToStage.thumbnail = encodeURI(data.path)
this.thumDrawerVisible = false this.thumDrawerVisible = false
}, },
autoSaveTimer() { autoSaveTimer() {
@ -359,7 +359,7 @@ export default {
if (responseObject.status === 200) { if (responseObject.status === 200) {
var MavonEditor = this.$refs.md var MavonEditor = this.$refs.md
MavonEditor.$img2Url(pos, responseObject.data.path) MavonEditor.$img2Url(pos, encodeURI(responseObject.data.path))
this.$message.success('图片上传成功') this.$message.success('图片上传成功')
} else { } else {
this.$message.error('图片上传失败:' + responseObject.message) this.$message.error('图片上传失败:' + responseObject.message)

View File

@ -620,7 +620,7 @@ export default {
}) })
}, },
handleSelectPostThumb(data) { handleSelectPostThumb(data) {
this.selectedPost.thumbnail = data.path this.selectedPost.thumbnail = encodeURI(data.path)
this.thumDrawerVisible = false this.thumDrawerVisible = false
}, },
handlerRemoveThumb() { handlerRemoveThumb() {

View File

@ -250,7 +250,7 @@ export default {
} }
}, },
handleSelectSheetThumb(data) { handleSelectSheetThumb(data) {
this.sheetToStage.thumbnail = data.path this.sheetToStage.thumbnail = encodeURI(data.path)
this.thumDrawerVisible = false this.thumDrawerVisible = false
}, },
autoSaveTimer() { autoSaveTimer() {
@ -268,7 +268,7 @@ export default {
if (responseObject.status === 200) { if (responseObject.status === 200) {
var MavonEditor = this.$refs.md var MavonEditor = this.$refs.md
MavonEditor.$img2Url(pos, responseObject.data.path) MavonEditor.$img2Url(pos, encodeURI(responseObject.data.path))
this.$message.success('图片上传成功') this.$message.success('图片上传成功')
} else { } else {
this.$message.error('图片上传失败:' + responseObject.message) this.$message.error('图片上传失败:' + responseObject.message)

View File

@ -364,7 +364,7 @@ export default {
this.thumDrawerVisible = true this.thumDrawerVisible = true
}, },
selectPhotoThumb(data) { selectPhotoThumb(data) {
this.photo.url = data.path this.photo.url = encodeURI(data.path)
this.thumDrawerVisible = false this.thumDrawerVisible = false
}, },
resetParam() { resetParam() {

View File

@ -649,7 +649,7 @@ export default {
} }
}, },
handleSelectLogo(data) { handleSelectLogo(data) {
this.options.blog_logo = data.path this.options.blog_logo = encodeURI(data.path)
this.logoDrawerVisible = false this.logoDrawerVisible = false
}, },
handleTestMailClick() { handleTestMailClick() {
@ -658,7 +658,7 @@ export default {
}) })
}, },
handleSelectFavicon(data) { handleSelectFavicon(data) {
this.options.blog_favicon = data.path this.options.blog_favicon = encodeURI(data.path)
this.faviconDrawerVisible = false this.faviconDrawerVisible = false
} }
} }

View File

@ -218,7 +218,7 @@ export default {
}) })
}, },
handleSelectAvatar(data) { handleSelectAvatar(data) {
this.user.avatar = data.path this.user.avatar = encodeURI(data.path)
this.attachmentDrawerVisible = false this.attachmentDrawerVisible = false
}, },
handleSelectGravatar() { handleSelectGravatar() {