提交 9ef5fe7c 编写于 作者: fxy060608's avatar fxy060608

Merge branch 'dev' of https://github.com/dcloudio/uni-app into alpha

import { version } from '../package.json';
const STAT_VERSION = version;
const STAT_URL = 'https://tongji.dcloud.net.cn/uni/stat';
const STAT_H5_URL = 'https://tongji.dcloud.net.cn/uni/stat.gif';
const STAT_URL = 'https://uniapp.dcloud.io/uni/stat';
const STAT_H5_URL = 'https://uniapp.dcloud.io/uni/stat.gif';
const PAGE_PVER_TIME = 1800;
const APP_PVER_TIME = 300;
const OPERATING_TIME = 10;
......@@ -647,8 +647,8 @@ class Util {
// },
data: optionsData,
success: () => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail: (e) => {
......@@ -863,10 +863,14 @@ const lifecycle = {
function main() {
const Vue = require('vue');
(Vue.default || Vue).mixin(lifecycle);
uni.report = function(type, options) {
stat.sendEvent(type, options);
};
if (process.env.NODE_ENV === 'development') {
uni.report = function(type, options) {};
}else{
(Vue.default || Vue).mixin(lifecycle);
uni.report = function(type, options) {
stat.sendEvent(type, options);
};
}
}
main();
......@@ -2,8 +2,8 @@ import {
version
} from '../package.json'
export const STAT_VERSION = version
export const STAT_URL = 'https://tongji.dcloud.net.cn/uni/stat'
export const STAT_H5_URL = 'https://tongji.dcloud.net.cn/uni/stat.gif'
export const STAT_URL = 'https://uniapp.dcloud.io/uni/stat'
export const STAT_H5_URL = 'https://uniapp.dcloud.io/uni/stat.gif'
export const STAT_KEY = 'qkTHEIegZGcL5iy3'
export const PAGE_PVER_TIME = 1800
export const APP_PVER_TIME = 300
......
......@@ -36,10 +36,14 @@ const lifecycle = {
function main() {
const Vue = require('vue');
(Vue.default || Vue).mixin(lifecycle);
uni.report = function(type, options) {
stat.sendEvent(type, options);
};
if (process.env.NODE_ENV === 'development') {
uni.report = function(type, options) {};
}else{
(Vue.default || Vue).mixin(lifecycle);
uni.report = function(type, options) {
stat.sendEvent(type, options);
};
}
}
main();
......@@ -382,8 +382,8 @@ class Util {
// },
data: optionsData,
success: () => {
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail: (e) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册