|
@@ -92,7 +92,7 @@ export default {
|
|
// console.log(fileChunks)
|
|
// console.log(fileChunks)
|
|
// return
|
|
// return
|
|
// fileChunks = [1,2,3,4,5]
|
|
// fileChunks = [1,2,3,4,5]
|
|
- this.len = fileChunks.length + 3
|
|
|
|
|
|
+ this.len = fileChunks.length + 4
|
|
|
|
|
|
getFileMD5(this.form.file, async (md5) => {
|
|
getFileMD5(this.form.file, async (md5) => {
|
|
this.record('文件MD5:' + md5)
|
|
this.record('文件MD5:' + md5)
|
|
@@ -103,8 +103,12 @@ export default {
|
|
await this.uploadChunks(fileChunks, md5, 0)
|
|
await this.uploadChunks(fileChunks, md5, 0)
|
|
this.record('等待服务器合并分片')
|
|
this.record('等待服务器合并分片')
|
|
const response = await this.$api.mergeChunks({ md5: md5, fileName: this.form.file.name })
|
|
const response = await this.$api.mergeChunks({ md5: md5, fileName: this.form.file.name })
|
|
|
|
+ if(response.code != 200){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.record('分片合并完成,等待更新专利说明书')
|
|
let params = {
|
|
let params = {
|
|
- url: response.data,
|
|
|
|
|
|
+ url: response.data[0],
|
|
type: this.form.type,
|
|
type: this.form.type,
|
|
remark: this.form.remark
|
|
remark: this.form.remark
|
|
}
|
|
}
|