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

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

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