Commit ce95a4ef authored by 李增强's avatar 李增强

m

parent 95016b34
...@@ -188,7 +188,7 @@ class QMTJ { ...@@ -188,7 +188,7 @@ class QMTJ {
if (list.length == 0) { if (list.length == 0) {
return; return;
} }
List<String> ids = [];
list = list.map((e) { list = list.map((e) {
var item = { var item = {
"app_version": '0.0.1', "app_version": '0.0.1',
...@@ -202,7 +202,7 @@ class QMTJ { ...@@ -202,7 +202,7 @@ class QMTJ {
"out_time": e['disappear_time'], "out_time": e['disappear_time'],
"extras": json.decode(e['extras']) "extras": json.decode(e['extras'])
}; };
ids.add(e['id']);
Map project = { Map project = {
"event_name": "page_scan", "event_name": "page_scan",
"app": "xx", "app": "xx",
...@@ -211,10 +211,16 @@ class QMTJ { ...@@ -211,10 +211,16 @@ class QMTJ {
return project; return project;
}).toList(); }).toList();
_http.post("/collection", {"project": json.encode(list)}).then((value) { _http.post("/collection", {"project": json.encode(list)}).then(
(value) async {
if (isDebug) { if (isDebug) {
log("upload_page_tj", value); log("upload_page_tj", value);
} }
if (value != null && value['code'] == 200) {
int result = await _db.db
.delete("table", where: "id in('?')", whereArgs: [ids.join("','")]);
log("clear_page_tj", {"olength": list.length, "length": result});
}
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment