Commit b3809c29 by yixinjj

调整日志输出

1 parent a0557323
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
async uploadSuccess(recordId, filePathOnServer, filePathOnClient, fileName) { async uploadSuccess(recordId, filePathOnServer, filePathOnClient, fileName) {
const unlock = await uni.$recordManager.lock() const unlock = await uni.$recordManager.lock()
try { try {
uni.$logger.local.info(`文件上传成功!!', filePathOnServer-> ${filePathOnServer}, filePathOnClient-> ${filePathOnClient} , fileName-> ${fileName}`) uni.$logger.local.info(`文件上传完成回调(uploadSuccess)!!', filePathOnServer-> ${filePathOnServer}, filePathOnClient-> ${filePathOnClient} , fileName-> ${fileName}`)
const record = uni.$recordManager.getRecordById(recordId) const record = uni.$recordManager.getRecordById(recordId)
if (!record) return uni.$logger.local.info(`未找到接待记录!!`) if (!record) return uni.$logger.local.info(`未找到接待记录!!`)
this._changeFilePathToServer(record, filePathOnClient, filePathOnServer, fileName) this._changeFilePathToServer(record, filePathOnClient, filePathOnServer, fileName)
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,7 @@ export default {
filePath: filePathOnClient, filePath: filePathOnClient,
complete: function (res) { complete: function (res) {
// console.log(res) // console.log(res)
uni.$logger.local.info(`删除成功!!`) uni.$logger.local.info(`${filePathOnClient}->删除成功!!`)
} }
}) })
}, },
......
...@@ -27,7 +27,7 @@ export default class LogsWorker { ...@@ -27,7 +27,7 @@ export default class LogsWorker {
if (files.length > 0) { if (files.length > 0) {
const file = files.shift() const file = files.shift()
await this.post(file, deviceId) await this.post(file, deviceId)
this.process(files, deviceId) setTimeout(() => this.process(files, deviceId), 500)
} else { } else {
this.isUploading = false this.isUploading = false
} }
...@@ -50,7 +50,7 @@ export default class LogsWorker { ...@@ -50,7 +50,7 @@ export default class LogsWorker {
resolve() resolve()
}, },
fail: res => { fail: res => {
uni.$logger.local.error(`文件上传失败! res->${serializeIfObject(res)} filePath->${path} .请检查服务端是否有文件被打开`) uni.$logger.local.error(`文件上传失败! res->${serializeIfObject(res)} filePath->${path} .`)
resolve() resolve()
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!