Commit 8d1127b4 by 李伟康

提交代码

1 parent aef4df84
...@@ -1415,12 +1415,11 @@ export default { ...@@ -1415,12 +1415,11 @@ export default {
prefixSlot: 'defaultImg', prefixSlot: 'defaultImg',
suffixSlot: 'floatingMaskDiagram', suffixSlot: 'floatingMaskDiagram',
handleUpload: (e, file, targetItem) => { handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result const imgFile = e.target.result,
target = file.type == 'image/png' ? 'uploadImgApi' : 'uploadVideoApi'
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1] const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.loading = true this.loading = true
this.$apis.common this.$apis.common[target]({ file: base64 })
// .uploadFundingVideoApi({ file: base64 })
.uploadVideoApi({ file: base64 })
.then(res => { .then(res => {
this.editForm[targetItem.name] = res this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name) this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!