- 小商店组件怎样初始化接入?
目前的文档要求在onLaunch中调用miniShopPlugin.initApp(this, wx)来引入交易组件,但是目前碰到有两个疑问 不调用miniShopPlugin.initApp好像也可以正常加载组件并使用,但是这样会有其他什么问题吗?如果执行miniShopPlugin.initApp来初始化,会造成阿拉丁sdk报错,即使改用插件接入的方式也是一样。Cannot read property 'scene' of undefined TypeError: Cannot read property 'scene' of undefined at ve.i (http://127.0.0.1:28672/appservice/lib/ald-stat.js:78:15) at ve.A.e.onShow (http://127.0.0.1:28672/appservice/lib/ald-stat.js:340:9) at ve.<anonymous> (http://127.0.0.1:28672/appservice/__dev__/WAService.js:2:2071321) at ve.onShow (http://127.0.0.1:28672/appservice/__onlineplugin__/wx34345ae5855f892d/1.1.25/appservice.js:6084:1388) at new ve (http://127.0.0.1:28672/appservice/__dev__/WAService.js:2:2072100) at Function.<anonymous> (http://127.0.0.1:28672/appservice/__dev__/WAService.js:2:2072389) at http://127.0.0.1:28672/appservice/__dev__/WAService.js:2:2058868 at App (http://127.0.0.1:28672/appservice/lib/sensorsdata.min.js:1178:32) at P (http://127.0.0.1:28672/appservice/lib/ald-stat.js:374:12) at http://127.0.0.1:28672/appservice/app.js:89:1 对这个问题进行debug之后发现,调用miniShopPlugin.initApp(this, wx)初始化之后,app的onShow函数的调用参数总是为空,间接导致了 ald内部方法执行失败
2020-12-21 - api事件上报统计不准
业务上需要统计launch数,并上报一些launch参数,于是采用api上报事件,但是在后台看到myLaunchEvent事件数明显偏少,代码示例如下: [代码]App({[代码][代码] [代码][代码]onLaunch: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]wx.reportAnalytics([代码][代码]"myLaunchEvent"[代码][代码], {[代码][代码] [代码][代码]// 事件field[代码][代码] [代码][代码]...[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码]}[代码] 为了验证问题,我又在微信后台配置了launch事件上报,配置参数如下: 自定义分析lanucn事件 trigger: launch action: start_and_report 对比发现,api上报事件数远远少于非api上报数,请问这是什么原因??
2018-12-13