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

fix(stat): mixin

上级 82d394f2
...@@ -939,8 +939,8 @@ function main() { ...@@ -939,8 +939,8 @@ function main() {
} else { } else {
uni.onAppLaunch((options) => { uni.onAppLaunch((options) => {
stat.report(options); stat.report(options);
// 小程序平台此时也无法获取getApp,统一在options中传递一个app对象 // 小程序平台此时也无法获取getApp,统一在options中传递一个app mixin对象
options.app.$vm.$.appContext.app.mixin(lifecycle); options.app.mixin(lifecycle);
uni.report = function (type, options) { uni.report = function (type, options) {
stat.sendEvent(type, options); stat.sendEvent(type, options);
}; };
......
...@@ -937,8 +937,8 @@ function main() { ...@@ -937,8 +937,8 @@ function main() {
} else { } else {
uni.onAppLaunch((options) => { uni.onAppLaunch((options) => {
stat.report(options); stat.report(options);
// 小程序平台此时也无法获取getApp,统一在options中传递一个app对象 // 小程序平台此时也无法获取getApp,统一在options中传递一个app mixin对象
options.app.$vm.$.appContext.app.mixin(lifecycle); options.app.mixin(lifecycle);
uni.report = function (type, options) { uni.report = function (type, options) {
stat.sendEvent(type, options); stat.sendEvent(type, options);
}; };
......
...@@ -45,8 +45,8 @@ function main() { ...@@ -45,8 +45,8 @@ function main() {
} else { } else {
uni.onAppLaunch((options) => { uni.onAppLaunch((options) => {
stat.report(options) stat.report(options)
// 小程序平台此时也无法获取getApp,统一在options中传递一个app对象 // 小程序平台此时也无法获取getApp,统一在options中传递一个app mixin对象
options.app.$vm.$.appContext.app.mixin(lifecycle) options.app.mixin(lifecycle)
uni.report = function (type, options) { uni.report = function (type, options) {
stat.sendEvent(type, options) stat.sendEvent(type, options)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册