Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
QM_TJ
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
QM_TJ
Commits
cfba5bad
Commit
cfba5bad
authored
Apr 01, 2021
by
李增强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加初始化完成等待
parent
44ad10bd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
lib/qm_tj.dart
lib/qm_tj.dart
+8
-0
No files found.
lib/qm_tj.dart
View file @
cfba5bad
...
...
@@ -17,6 +17,7 @@ class QMTJ {
static
Page
_page
;
static
Tap
_tap
;
static
Exposure
_exposure
;
static
Future
<
bool
>
_ready
;
static
void
debug
()
{
Utils
.
debug
();
...
...
@@ -39,6 +40,7 @@ class QMTJ {
_tap
=
Tap
(
_db
);
_exposure
=
Exposure
(
_db
);
_db
.
init
();
_ready
=
new
Future
.
value
(
true
);
Future
.
delayed
(
Duration
(
seconds:
5
)).
then
((
value
)
async
{
await
_app
.
upload
();
await
_page
.
upload
();
...
...
@@ -49,23 +51,27 @@ class QMTJ {
/// APP 可见
static
void
onAppResume
({
Map
<
String
,
dynamic
>
extras
})
async
{
await
_ready
;
_app
.
onResume
(
extras:
extras
);
}
/// APP 不可见
static
void
onAppPause
()
async
{
await
_ready
;
_app
.
onPause
();
}
/// PAGE 可见
static
void
onPageResume
(
{
String
pageId
,
String
lastPageId
,
Map
<
String
,
dynamic
>
extras
})
async
{
await
_ready
;
_page
.
onResume
(
pageId:
pageId
,
lastPageId:
lastPageId
,
extras:
extras
);
}
/// PAGE 不可见
static
void
onPagePause
(
{
String
pageId
,
String
lastPageId
,
Map
<
String
,
dynamic
>
extras
})
async
{
await
_ready
;
_page
.
onPause
(
pageId:
pageId
,
lastPageId:
lastPageId
,
extras:
extras
);
}
...
...
@@ -75,6 +81,7 @@ class QMTJ {
/// [extras] 点击参数
static
void
tap
(
{
String
pageId
,
String
clickId
,
Map
<
String
,
dynamic
>
extras
})
async
{
await
_ready
;
_tap
.
onTap
(
pageId:
pageId
,
clickId:
clickId
,
extras:
extras
);
}
...
...
@@ -84,6 +91,7 @@ class QMTJ {
/// [extras] 曝光参数
static
void
exposure
(
{
String
pageId
,
String
exposureId
,
Map
<
String
,
dynamic
>
extras
})
async
{
await
_ready
;
_exposure
.
onExposure
(
pageId:
pageId
,
exposureId:
exposureId
,
extras:
extras
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment