Commit e542680b by 程默

add behavior

parent 4a38c85b
...@@ -147,6 +147,12 @@ export default { ...@@ -147,6 +147,12 @@ export default {
getShopInfo({ mixid }) { getShopInfo({ mixid }) {
shop.getShopInfo({ shopMixId: mixid }).then((res) => { shop.getShopInfo({ shopMixId: mixid }).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
// 收集用户数据
this.$mpBehavior.init("mayi-moblie-shop-mp", res.data.data.id, {
mode: process.env.NODE_ENV,
gid: res.data.data.groupId
})
let mpApp = getApp(); let mpApp = getApp();
// 商城基本数据 // 商城基本数据
mpApp.shopCallBack && mpApp.shopCallBack(res.data.data); mpApp.shopCallBack && mpApp.shopCallBack(res.data.data);
......
...@@ -28,6 +28,11 @@ Vue.config.productionTip = false ...@@ -28,6 +28,11 @@ Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
Vue.prototype.$store = Store Vue.prototype.$store = Store
// 用户行为收集
console.log(Store.state,'---35')
let mpBehavior = require("../static/mayi.mpBehavior")
Vue.prototype.$mpBehavior = mpBehavior;
// 异常监控(行为收集) // 异常监控(行为收集)
let mpAnalytics = require("../node_modules/mayi-analytics/dist/mayi.mpAnalytics.js") let mpAnalytics = require("../node_modules/mayi-analytics/dist/mayi.mpAnalytics.js")
.default; .default;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment