|
|
|
@ -2,6 +2,7 @@ import Axios from 'axios' |
|
|
|
|
import Api from '@/utils/api' |
|
|
|
|
import Setting from '@/setting' |
|
|
|
|
import Util from '@/libs/util' |
|
|
|
|
import { Loading } from 'element-ui' |
|
|
|
|
export default { |
|
|
|
|
//skin:'oxide-dark',
|
|
|
|
|
language:'zh_CN', |
|
|
|
@ -347,6 +348,7 @@ export default { |
|
|
|
|
let file = this.files[0]; |
|
|
|
|
let fd = new FormData(); |
|
|
|
|
fd.append("file", file); |
|
|
|
|
const load = Loading.service() |
|
|
|
|
Axios({ |
|
|
|
|
method: 'post', |
|
|
|
|
url: Api.fileUploadNakadai, |
|
|
|
@ -356,8 +358,11 @@ export default { |
|
|
|
|
token: Util.local.get(Setting.tokenKey) |
|
|
|
|
}, |
|
|
|
|
}).then(({ data }) => { |
|
|
|
|
load.close() |
|
|
|
|
callback(data.filesResult.fileUrl) |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(res => { |
|
|
|
|
load.close() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
//触发点击
|
|
|
|
|
input.click(); |
|
|
|
|