Skip to content

Commit

Permalink
fix: 不上传psd源文件
Browse files Browse the repository at this point in the history
  • Loading branch information
彭辉 committed Dec 31, 2019
1 parent a0e05ea commit 25e78b8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/dialog/d-psd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@
nodeJson.push(config)
}
this.content = nodeJson
let data = await this.uploadOss(this.psdFile, true)
let resu = data.data
if (resu.code == 1 && (resu.data instanceof Array)) {
this.psdUrl = resu.data[0].path
}
// let data = await this.uploadOss(this.psdFile, true)
// let resu = data.data
// if (resu.code == 1 && (resu.data instanceof Array)) {
// this.psdUrl = resu.data[0].path
// }
this.loading = false
this.open()
},
Expand All @@ -165,7 +165,7 @@
if (!isFile) {
file = this.dataURLtoFile(file)
}
const url = this.env == 'production' ? 'https://boss.ymmoa.com/truck-editor-server/ossupload/uploadFile' : 'https://dev-boss.ymmoa.com/truck-editor-server/ossupload/uploadFile'
const url = this.env == 'production' ? 'https://godspen.ymm56.com/api/editor/pages/psd-to-page/ossupload/uploadFile' : 'https://dev-boss.ymmoa.com/truck-editor-server/ossupload/uploadFile'
var form = new window.FormData()
form.append('files', file)
console.log('form', form)
Expand All @@ -189,7 +189,7 @@
const psdJson = {
size: this.psdSize,
name: this.psdName,
url: this.psdUrl
// url: this.psdUrl
}
console.log('this.content', this.content)
this.changeNode(JSON.stringify(this.content), JSON.stringify(psdJson))
Expand Down

0 comments on commit 25e78b8

Please sign in to comment.