|
@@ -642,47 +642,9 @@ export default {
|
|
|
console.log(file)
|
|
|
var bmf = new BMF()
|
|
|
var that = this
|
|
|
- return new Promise(function(resolve, reject) {
|
|
|
- bmf.md5(file[0], (err, md5) => {
|
|
|
- console.log(md5, 123123123)
|
|
|
- that.md5 = md5
|
|
|
- fileCheck({ code: md5 }).then(res => {
|
|
|
- console.log(res)
|
|
|
- if (res.code == 0) {
|
|
|
- if (file[0].type == 'image/jpeg' || file[0].type == 'jpg' || file[0].type == 'image/png') {
|
|
|
- if (that.tiepianImageLocalUpload) {
|
|
|
- that.tiepianImageLocalUploadList.push(res.url)
|
|
|
- } else if (that.showImageUpload) {
|
|
|
- that.localImageUrl.push(res.url)
|
|
|
- } else if (that.showLocalImageUpload) {
|
|
|
- that.imageUrl.push(res.url)
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (that.localUpload) {
|
|
|
- that.localUrl = res.url
|
|
|
- } else if (that.tiepianVideoLocalUpload) {
|
|
|
- that.tiepianVideoLocalUploadList.push(res.url)
|
|
|
- }
|
|
|
- }
|
|
|
- reject()
|
|
|
- } else {
|
|
|
- resolve()
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
},
|
|
|
overUpload(url) {
|
|
|
console.log(url, this.md5)
|
|
|
- if (url == Array) {
|
|
|
- fileInsert({ code: this.md5, url: url[0] }).then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
- } else {
|
|
|
- fileInsert({ code: this.md5, url: url }).then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
- }
|
|
|
},
|
|
|
handleOk(e) {
|
|
|
console.log(e)
|