Skip to content

Commit

Permalink
修改预览截图
Browse files Browse the repository at this point in the history
  • Loading branch information
jy03078959 committed Dec 5, 2019
1 parent 259d785 commit f8901ed
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -366,23 +366,23 @@
this.ema.fire('pageInfo.save')
},
savePage () {
// if (this.demoMode) return this.$alert('您处在demo模式下,不能保存数据哦')
// var info = Object.assign({}, this.pageInfo)
// info.content = window.localStorage.getItem(this.STORAGE_KEY)
// console.log(info)
// Server({
// url: 'editor/pages/save',
// method: 'post', // default
// needLoading: true,
// data: info
// }).then(({data}) => {
// let code = data.code
// let msg = data.msg
// if (code == 500) return this.$alert(msg)
// this.$message({type: 'success', message: '保存成功'})
// }).catch((respond) => {
// this.$message({type: 'success', message: '保存失败'})
// })
if (this.demoMode) return this.$alert('您处在demo模式下,不能保存数据哦')
var info = Object.assign({}, this.pageInfo)
info.content = window.localStorage.getItem(this.STORAGE_KEY)
console.log(info)
Server({
url: 'editor/pages/save',
method: 'post', // default
needLoading: true,
data: info
}).then(({data}) => {
let code = data.code
let msg = data.msg
if (code == 500) return this.$alert(msg)
this.$message({type: 'success', message: '保存成功'})
}).catch((respond) => {
this.$message({type: 'success', message: '保存失败'})
})
this.savePagePreviewImage()
},
savePagePreviewImage () {
Expand Down

0 comments on commit f8901ed

Please sign in to comment.