|
@@ -20,7 +20,8 @@ class EasyUse {
|
|
|
|
|
|
this.config = Object.assign({
|
|
|
dataSource,
|
|
|
- version
|
|
|
+ version,
|
|
|
+ upWaitStep: 200
|
|
|
}, options)
|
|
|
this.json = []
|
|
|
this.params = {}
|
|
@@ -102,7 +103,9 @@ class EasyUse {
|
|
|
*/
|
|
|
addPageChangeListener() {
|
|
|
window.addEventListener("popstate", (e) => {
|
|
|
- this.upPageInfo()
|
|
|
+ setTimeout(() => {
|
|
|
+ this.upPageInfo()
|
|
|
+ }, this.config.upWaitStep)
|
|
|
}, false)
|
|
|
}
|
|
|
|
|
@@ -123,6 +126,7 @@ class EasyUse {
|
|
|
try {
|
|
|
clab_tracker.ready(function () {
|
|
|
this.push({"pageType":"web"});
|
|
|
+ params.url = params.c_url
|
|
|
this.track("open_page", params);
|
|
|
clab_tracker.setEnableAutoTrackExitPage(false)
|
|
|
})
|
|
@@ -201,7 +205,9 @@ class EasyUse {
|
|
|
this.getJSON(`${this.config.dataSource}${this.config.version ? ('?v=' + this.config.version) : ''}`, (data) => {
|
|
|
if (Array.isArray(data)) {
|
|
|
this.json = [].concat(data)
|
|
|
- this.upPageInfo()
|
|
|
+ setTimeout(() => {
|
|
|
+ this.upPageInfo()
|
|
|
+ }, this.config.upWaitStep)
|
|
|
}
|
|
|
})
|
|
|
}
|