Commit ad8ca48d by 前端

uuid

1 parent 981390ad
...@@ -175,15 +175,17 @@ export default { ...@@ -175,15 +175,17 @@ export default {
async saveRecord() { async saveRecord() {
const params = this.getParams(); const params = this.getParams();
const unlock = await recordManager.lock(); const unlock = await recordManager.lock();
const path = await utils.getFileSaveFolderOnClient();
const recordUrlList = this.audioInfo.audioList.map((i) => { const recordUrlList = this.audioInfo.audioList.map((i) => {
return { return {
status: UPLOAD_STATUS.fail, status: UPLOAD_STATUS.fail,
file: i, file: path + i.split("/").pop(),
}; };
}); });
console.log(this.getParams()); console.log(this.getParams());
recordManager.addRecord({ recordManager.addRecord({
...params, ...params,
id: utils.uuid(),
recordUrlList, recordUrlList,
}); });
unlock(); unlock();
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
filePath, filePath,
filePathOnClient = filePath + fileName, filePathOnClient = filePath + fileName,
} = result.detail.data[0]; } = result.detail.data[0];
console.log(result.detail.data[0], "result.detail.data[0]");
if (code == 0) { if (code == 0) {
this.uploadSuccess( this.uploadSuccess(
recordId, recordId,
...@@ -223,7 +224,9 @@ export default { ...@@ -223,7 +224,9 @@ export default {
this.polling(); this.polling();
}, 1000 * 6); }, 1000 * 6);
} else { } else {
console.log(this.snapshot, "this.snapshot");
const record = this.snapshot.dequeue(); const record = this.snapshot.dequeue();
console.log(record);
this.uploadRecord(record); this.uploadRecord(record);
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!