Commit d6edcbbe by 前端

参数

1 parent 9e4805ee
...@@ -161,8 +161,12 @@ export default { ...@@ -161,8 +161,12 @@ export default {
console.log(recordFileList, "recordFileList"); console.log(recordFileList, "recordFileList");
if (recordFileList.every((i) => i.status == undefined)) { if (recordFileList.every((i) => i.status == undefined)) {
const res = await uni.$api.commonApi.saveRecCustomer(record); const pathArr = recordFileList.map((i) => i.file);
console.log(res); const res = await uni.$api.commonApi.saveRecCustomer({
...record,
recordFileList: pathArr,
});
console.log(record, res, "record");
if (res) { if (res) {
uni.$recordManager.removeRecord(recordId); uni.$recordManager.removeRecord(recordId);
} }
...@@ -215,6 +219,7 @@ export default { ...@@ -215,6 +219,7 @@ export default {
* 这个函数的目的是在一定条件下,通过持续轮询来执行上传记录的操作。它检查一个队列(snapshot)的大小。如果队列为空,它会等待十分钟(1000 毫秒 * 60 秒 * 10 分钟)后再次检查。如果队列中有记录,它会取出一条记录并上传它。 * 这个函数的目的是在一定条件下,通过持续轮询来执行上传记录的操作。它检查一个队列(snapshot)的大小。如果队列为空,它会等待十分钟(1000 毫秒 * 60 秒 * 10 分钟)后再次检查。如果队列中有记录,它会取出一条记录并上传它。
*/ */
polling() { polling() {
console.log(this.snapshot.size, "this.snapshot.size");
if (this.snapshot === null) return; if (this.snapshot === null) return;
if (this.snapshot.size == 0) { if (this.snapshot.size == 0) {
this.enQueue(); this.enQueue();
...@@ -230,10 +235,11 @@ export default { ...@@ -230,10 +235,11 @@ export default {
}, },
stopPolling() { stopPolling() {
this.snapshot.clear(); this.snapshot.clear();
this.snapshot = null this.snapshot = null;
}, },
onUnload() { },
this.stopPolling(); beforeDestroy() {
} console.log("stopPolling");
this.stopPolling();
}, },
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!