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

m

parent 2527110d
......@@ -28,7 +28,7 @@ class QMTJ {
int disappearTime = 0;
int appearTime = _getDateNow();
String id = _appStartUpId;
Map map = {
Map<String, dynamic> map = {
"id": id,
"type": type,
"source": source,
......@@ -49,7 +49,7 @@ class QMTJ {
int disappearTime = 0;
int appearTime = _getDateNow();
String id = _appStartUpId;
Map map = {
Map<String, dynamic> map = {
"id": id,
"type": type,
"source": source,
......@@ -66,7 +66,7 @@ class QMTJ {
int disappearTime = _getDateNow();
_db.db.update("app_tj", {"disappear_time": disappearTime},
where: "id = ? and disappear_time = 0", whereArgs: [_appStartUpId]);
Map map = {
Map<String, dynamic> map = {
"id": _appStartUpId,
"disappear_time": disappearTime,
};
......@@ -83,7 +83,7 @@ class QMTJ {
String id = _md5("${pageId}_${lastPageId}_$extrasStr");
int disappearTime = 0;
int appearTime = _getDateNow();
Map map = {
Map<String, dynamic> map = {
"id": id,
"source": source,
"page_id": pageId,
......@@ -93,7 +93,8 @@ class QMTJ {
"extras": extrasStr,
};
log("pageAppear", map);
await _db.db.insert("page_tj", map);
await _db.db.insert("page_tj",map);
}
/// PAGE 不可见
......@@ -101,15 +102,15 @@ class QMTJ {
{String pageId, String lastPageId, Map<String, dynamic> extras}) async {
String extrasStr = json.encode(extras);
String id = _md5("${pageId}_${lastPageId}_$extrasStr");
int disappearTime = _getDateNow();
int disappearTime = _getDateNow();
await _db.db.update(
"page_tj",
{
"disappear_time": disappearTime,
"disappear_time":disappearTime,
},
where: "id = ? and disappear_time = 0",
whereArgs: [id]);
Map map = {
Map<String, dynamic> map = {
"id": id,
"page_id": pageId,
"last_page_id": lastPageId,
......@@ -131,7 +132,7 @@ class QMTJ {
int clickTime = _getDateNow();
String extrasStr = json.encode(extras);
String id = _md5("${pageId}_${clickId}_${extrasStr}_${clickTime}");
Map map = {
Map<String, dynamic> map = {
"id": id,
"source": source,
"page_id": pageId,
......@@ -140,7 +141,7 @@ class QMTJ {
"extras": extrasStr,
};
log("tap", map);
await _db.db.insert("tap_tj", map);
await _db.db.insert("tap_tj",map);
}
/// 曝光
......@@ -155,7 +156,7 @@ class QMTJ {
int exposureTime = _getDateNow();
String extrasStr = json.encode(extras);
String id = _md5("${pageId}_${exposureId}_${extrasStr}_${exposureTime}");
Map map = {
Map<String, dynamic> map = {
"id": id,
"source": source,
"page_id": pageId,
......@@ -180,7 +181,7 @@ class QMTJ {
return digest.toString();
}
static void log(String type, Map map) {
static void log(String type, Map<String, dynamic> map) {
if (!isDebug) {
return;
}
......
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