提交 6a708192 编写于 作者: M mehaotian

fix(stat): 修复统计在上报失败后,请求报错的 Bug

上级 ef75c1ec
......@@ -652,12 +652,9 @@ class Util {
// }
},
fail: (e) => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if (++this._retry < 3) {
setTimeout(() => {
this.request(data);
this._sendRequest(optionsData);
}, 1000);
}
}
......@@ -867,10 +864,10 @@ const lifecycle = {
};
function main() {
const Vue = require('vue');
if (process.env.NODE_ENV === 'development') {
uni.report = function(type, options) {};
}else{
const Vue = require('vue');
(Vue.default || Vue).mixin(lifecycle);
uni.report = function(type, options) {
stat.sendEvent(type, options);
......
......@@ -40,10 +40,10 @@ const lifecycle = {
}
function main() {
const Vue = require('vue');
if (process.env.NODE_ENV === 'development') {
uni.report = function(type, options) {};
}else{
const Vue = require('vue');
(Vue.default || Vue).mixin(lifecycle);
uni.report = function(type, options) {
stat.sendEvent(type, options);
......
......@@ -387,12 +387,9 @@ class Util {
// }
},
fail: (e) => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if (++this._retry < 3) {
setTimeout(() => {
this.request(data);
this._sendRequest(optionsData);
}, 1000);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册