Commit ac346b4f by 前端

上报日志

1 parent a3f0b4cd
......@@ -41,10 +41,22 @@ export default {
const filePathOnServer = data.oss.res.requestUrls[0].split('?')[0]
this.uploadSuccess(recordId, filePathOnServer, filePathOnClient, fileName)
} else {
this.reportError(recordId,filePathOnClient)
this.polling()
}
},
/**
* 上报文件上传失败日志
*/
reportError(recordId, filePath) {
const { customerName, phoneNumber, carModel, staffName } =
uni.$recordManager.getRecordById(recordId) || {};
const { name } = uni.$storage.get("userInfo");
this.$sendSentry(
`上传失败:文件-${filePath} 手机号-${phoneNumber} 姓名-${customerName} 销售-${staffName} 车型-${carModel} 员工-${name}`
);
},
/**
* 初始化 WebView 的异步函数
* 这个函数返回一个 Promise,当初始化 WebView 完成时,它将解析为 WebView 对象。
* 在页面初始化调用时,这个函数会延迟 1 秒,以确保 WebView 对象已经创建。
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!