提交 d9578900 编写于 作者: M mehaotian

fix(stat): 修复统计标题与页面 URL 错乱的 BUG

上级 1573f1a1
......@@ -484,13 +484,6 @@ class Util {
t: getTime(),
p: this.statData.p
};
if (getPlatformName() === 'n' && this.statData.p === 'a') {
setTimeout(() => {
this.request(options);
}, 200);
return
}
this.request(options);
}
......@@ -511,12 +504,6 @@ class Util {
t: getTime(),
p: this.statData.p
};
if (getPlatformName() === 'n' && this.statData.p === 'a') {
setTimeout(() => {
this.request(options, type);
}, 200);
return
}
this.request(options, type);
}
_sendEventRequest({
......@@ -642,31 +629,39 @@ class Util {
this.imageRequest(optionsData);
return
}
uni.request({
url: STAT_URL,
method: 'POST',
// header: {
// 'content-type': 'application/json' // 默认值
// },
data: optionsData,
success: () => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail: (e) => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if (++this._retry < 3) {
setTimeout(() => {
this.request(data);
}, 1000);
}
}
});
if (getPlatformName() === 'n' && this.statData.p === 'a') {
setTimeout(() => {
this._sendRequest(optionsData);
}, 200);
return
}
this._sendRequest(optionsData);
}
_sendRequest(optionsData){
uni.request({
url: STAT_URL,
method: 'POST',
// header: {
// 'content-type': 'application/json' // 默认值
// },
data: optionsData,
success: () => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail: (e) => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if (++this._retry < 3) {
setTimeout(() => {
this.request(data);
}, 1000);
}
}
});
}
/**
* h5 请求
......
......@@ -219,13 +219,6 @@ class Util {
t: getTime(),
p: this.statData.p
}
if (getPlatformName() === 'n' && this.statData.p === 'a') {
setTimeout(() => {
this.request(options);
}, 200)
return
}
this.request(options);
}
......@@ -246,12 +239,6 @@ class Util {
t: getTime(),
p: this.statData.p
}
if (getPlatformName() === 'n' && this.statData.p === 'a') {
setTimeout(() => {
this.request(options, type)
}, 200)
return
}
this.request(options, type)
}
_sendEventRequest({
......@@ -377,31 +364,39 @@ class Util {
this.imageRequest(optionsData)
return
}
uni.request({
url: STAT_URL,
method: 'POST',
// header: {
// 'content-type': 'application/json' // 默认值
// },
data: optionsData,
success: () => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail: (e) => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if (++this._retry < 3) {
setTimeout(() => {
this.request(data);
}, 1000);
}
}
});
if (getPlatformName() === 'n' && this.statData.p === 'a') {
setTimeout(() => {
this._sendRequest(optionsData);
}, 200)
return
}
this._sendRequest(optionsData)
}
_sendRequest(optionsData){
uni.request({
url: STAT_URL,
method: 'POST',
// header: {
// 'content-type': 'application/json' // 默认值
// },
data: optionsData,
success: () => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail: (e) => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if (++this._retry < 3) {
setTimeout(() => {
this.request(data);
}, 1000);
}
}
});
}
/**
* h5 请求
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册