Commit 0824cd13 by 侯体倬

原生小程序埋点

parent a674a603
...@@ -5586,9 +5586,9 @@ ...@@ -5586,9 +5586,9 @@
"dev": true "dev": true
}, },
"mayi-analytics": { "mayi-analytics": {
"version": "1.1.24", "version": "1.1.37",
"resolved": "https://registry.npmjs.org/mayi-analytics/-/mayi-analytics-1.1.24.tgz", "resolved": "https://registry.npmjs.org/mayi-analytics/-/mayi-analytics-1.1.37.tgz",
"integrity": "sha512-pbJspryp05UuiodXfCFbeZkyM1BdPGC83XRJDo+LJhvfdyaiTXLykCfORRCDgTR0hIuINb8UjOc8/B6bkjWp8g==", "integrity": "sha512-x0/dSzxc+hYRYw5ihpyje77Sg/H3SjecwXdaUACvbGHv0/uzLzY3GWIA23WTASZdKGR2OtJxXOM0Nqvpq8M9CA==",
"requires": { "requires": {
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"qs": "^6.7.0", "qs": "^6.7.0",
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"build:my": "node build/build.js my" "build:my": "node build/build.js my"
}, },
"dependencies": { "dependencies": {
"mayi-analytics": "^1.1.24", "mayi-analytics": "^1.1.37",
"mayi-front-tools": "^1.0.0", "mayi-front-tools": "^1.0.0",
"mpvue": "^2.0.0", "mpvue": "^2.0.0",
"mpvue-wxparse": "^0.6.5", "mpvue-wxparse": "^0.6.5",
......
...@@ -45,7 +45,6 @@ export default { ...@@ -45,7 +45,6 @@ export default {
// 页面配置信息 // 页面配置信息
this.getThemePage(extConfig); this.getThemePage(extConfig);
...@@ -55,14 +54,10 @@ export default { ...@@ -55,14 +54,10 @@ export default {
console.log(mpApp, "this.mpApp"); console.log(mpApp, "this.mpApp");
mpApp.getShopInfo = this.getShopInfo mpApp.getShopInfo = this.getShopInfo
mpApp.getThemePage = this.getThemePage mpApp.getThemePage = this.getThemePage
},300) },300)
}, },
methods: { methods: {
async setVisible(pageList, cb) { async setVisible(pageList, cb) {
...@@ -150,7 +145,8 @@ export default { ...@@ -150,7 +145,8 @@ export default {
// 收集用户数据 // 收集用户数据
this.$mpBehavior.init("mayi-moblie-shop-mp", res.data.data.id, { this.$mpBehavior.init("mayi-moblie-shop-mp", res.data.data.id, {
mode: process.env.NODE_ENV, mode: process.env.NODE_ENV,
gid: res.data.data.groupId gid: res.data.data.groupId,
mixid: mixid
}) })
let mpApp = getApp(); let mpApp = getApp();
......
...@@ -77,9 +77,10 @@ export default { ...@@ -77,9 +77,10 @@ export default {
// }) // })
// }, // },
// 跳转到大转盘页 // 跳转到大转盘页
toPrizePage() { toPrizePage(e) {
let link = `/turntable?turntableCode=${this.datas.componentData.turntableCode}` let link = `/turntable?turntableCode=${this.datas.componentData.turntableCode}`
console.log('tz', app);
app.trackCpn(e, this.datas.componentName)
app.$themeToLink({ app.$themeToLink({
type :1, type :1,
link : link link : link
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
class="goods-item" class="goods-item"
:class="datas.componentData.columnNum == 2 ? 'style2' : 'style3'" :class="datas.componentData.columnNum == 2 ? 'style2' : 'style3'"
:style="{'padding-left': datas.componentData.proGap + 'px','width': getColumnWidth,}" :style="{'padding-left': datas.componentData.proGap + 'px','width': getColumnWidth,}"
@click="onclickProduct(goodsList[index])" @click="onclickProduct(goodsList[index], $event)"
> >
<goodsItem :datas="datas" :items="item"></goodsItem> <goodsItem :datas="datas" :items="item"></goodsItem>
</li> </li>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
:style="{ width: getColumnWidth,'margin-right': datas.componentData.proGap + 'px' }" :style="{ width: getColumnWidth,'margin-right': datas.componentData.proGap + 'px' }"
class="goods-item" class="goods-item"
:class="{ lastchild: swiperNum == index + 1 }" :class="{ lastchild: swiperNum == index + 1 }"
@click="onclickProduct(goodsList[index])" @click="onclickProduct(goodsList[index], $event)"
> >
<div :style="{'margin-left':datas.componentData.proGap*2+'px'}"> <div :style="{'margin-left':datas.componentData.proGap*2+'px'}">
<goodsItem :datas="datas" :items="item"></goodsItem> <goodsItem :datas="datas" :items="item"></goodsItem>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<!-- 瀑布流 --> <!-- 瀑布流 -->
<div class="waterfallFlow" v-if="datas.componentData.style === 'waterfall'"> <div class="waterfallFlow" v-if="datas.componentData.style === 'waterfall'">
<div class="left"> <div class="left">
<div v-for="(item,index) in goodsList" :key="index" @click="onclickProduct(goodsList[index])" :style="{'margin-bottom':datas.componentData.proGap + 'px','margin-right':datas.componentData.proGap/2 + 'px'}"> <div v-for="(item,index) in goodsList" :key="index" @click="onclickProduct(goodsList[index], $event)" :style="{'margin-bottom':datas.componentData.proGap + 'px','margin-right':datas.componentData.proGap/2 + 'px'}">
<goodsItem <goodsItem
v-if="index%2==0" v-if="index%2==0"
:datas="datas" :datas="datas"
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div v-for="(item,index) in goodsList" :key="index" @click="onclickProduct(goodsList[index])" :style="{'margin-bottom':datas.componentData.proGap + 'px','margin-left':datas.componentData.proGap/2 + 'px'}"> <div v-for="(item,index) in goodsList" :key="index" @click="onclickProduct(goodsList[index], $event)" :style="{'margin-bottom':datas.componentData.proGap + 'px','margin-left':datas.componentData.proGap/2 + 'px'}">
<goodsItem <goodsItem
v-if="index%2==1" v-if="index%2==1"
:datas="datas" :datas="datas"
...@@ -305,10 +305,11 @@ export default { ...@@ -305,10 +305,11 @@ export default {
} }
}, },
//点击商城跳转---基于微商城 //点击商城跳转---基于微商城
onclickProduct(item) { onclickProduct(item, e) {
let productId = item.productId; let productId = item.productId;
let terminalProductId = item.terminalProductId; let terminalProductId = item.terminalProductId;
let linkVal = `/goods/${productId}?terminalProductId=${terminalProductId}`; let linkVal = `/goods/${productId}?terminalProductId=${terminalProductId}`;
app.trackCpn(e, this.datas.componentName, item)
app.$themeToLink({ app.$themeToLink({
type: 1, type: 1,
link: linkVal link: linkVal
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
class="links" class="links"
:style="{'background-color':datas.componentData['backgroundColor'],'color':datas.componentData['fontColor'], :style="{'background-color':datas.componentData['backgroundColor'],'color':datas.componentData['fontColor'],
'text-align':datas.componentData['arrowsSite'],'line-height':datas.componentData['initcharSize']+'em'}" 'text-align':datas.componentData['arrowsSite'],'line-height':datas.componentData['initcharSize']+'em'}"
@click="onclickHandle()" @click="onclickHandle"
> >
<span <span
:style="{'font-size':datas.componentData['initcharSize']+'em'}" :style="{'font-size':datas.componentData['initcharSize']+'em'}"
...@@ -30,7 +30,8 @@ export default { ...@@ -30,7 +30,8 @@ export default {
return {}; return {};
}, },
methods: { methods: {
onclickHandle() { onclickHandle(e) {
app.trackCpn(e, this.datas.componentName, this.datas.componentData.link)
app.$themeToLink(this.datas.componentData.link); app.$themeToLink(this.datas.componentData.link);
} }
}, },
...@@ -56,4 +57,4 @@ export default { ...@@ -56,4 +57,4 @@ export default {
// vertical-align: middle; // vertical-align: middle;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
stickyTop ? 'stickyTop' : '', stickyTop ? 'stickyTop' : '',
'tabLayout' + tabLayout, 'tabLayout' + tabLayout,
]" ]"
> >
<van-tab <van-tab
ref="vanTab" ref="vanTab"
...@@ -381,6 +381,8 @@ export default { ...@@ -381,6 +381,8 @@ export default {
} }
}, },
changeTab(res) { changeTab(res) {
let app = getApp()
app.trackCpn(null, this.datas.componentName, res.target)
console.log(this.$parent.$mp.page.selectAllComponents('.time-limited-discount'),'====111111222') console.log(this.$parent.$mp.page.selectAllComponents('.time-limited-discount'),'====111111222')
if(this.$parent.$mp.page.selectAllComponents('.time-limited-discount')){ if(this.$parent.$mp.page.selectAllComponents('.time-limited-discount')){
this.$parent.$mp.page.selectAllComponents('.time-limited-discount').forEach(item => { this.$parent.$mp.page.selectAllComponents('.time-limited-discount').forEach(item => {
...@@ -577,7 +579,7 @@ export default { ...@@ -577,7 +579,7 @@ export default {
.defTabAfter{ .defTabAfter{
position: relative; position: relative;
&::after{ &::after{
content: ""; content: "";
position:absolute; position:absolute;
bottom: 4px; bottom: 4px;
left: 0; left: 0;
...@@ -598,7 +600,7 @@ export default { ...@@ -598,7 +600,7 @@ export default {
.defaultTabUnderlineAfter{ .defaultTabUnderlineAfter{
position: relative; position: relative;
&::after{ &::after{
content: ""; content: "";
position:absolute; position:absolute;
bottom: 4px; bottom: 4px;
left: 0; left: 0;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
>{{datas.componentData.abstract}}</div> >{{datas.componentData.abstract}}</div>
</div> </div>
<!-- 图片区域 --> <!-- 图片区域 -->
<div class="imgcontent" @click="itemClick()"> <div class="imgcontent" @click="itemClick">
<image :src="datas.componentData.imageUrl" alt lazy-load="true" mode="widthFix" :style="{'width':'100%','display':'block'}" ></image> <image :src="datas.componentData.imageUrl" alt lazy-load="true" mode="widthFix" :style="{'width':'100%','display':'block'}" ></image>
<!-- 内部文字 --> <!-- 内部文字 -->
<div <div
...@@ -83,7 +83,8 @@ export default { ...@@ -83,7 +83,8 @@ export default {
}, },
computed: {}, computed: {},
methods: { methods: {
itemClick() { itemClick(e) {
app.trackCpn(e, this.datas.componentName, this.datas.componentData)
app.$themeToLink(this.datas.componentData.link); app.$themeToLink(this.datas.componentData.link);
} }
}, },
......
...@@ -453,13 +453,14 @@ export default { ...@@ -453,13 +453,14 @@ export default {
}); });
}, },
// 查看更多 // 查看更多
viewMore() { viewMore(e) {
let link =""; let link ="";
if(this.articleStatus==1){ if(this.articleStatus==1){
link= `/article/articleList?classifyId=${this.classifId}&categoryName=${this.classifName}`; link= `/article/articleList?classifyId=${this.classifId}&categoryName=${this.classifName}`;
} else if(this.articleStatus==4){ } else if(this.articleStatus==4){
link= `/article/articleList?tagIds=${this.tagIds.join(",")}`; link= `/article/articleList?tagIds=${this.tagIds.join(",")}`;
} }
app.trackCpn(e, this.datas.componentName, 'ViewMore')
app.$themeToLink({ app.$themeToLink({
type :1, type :1,
link : link link : link
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
'padding-right':getPaddingList[3]['value']+'px', 'padding-right':getPaddingList[3]['value']+'px',
'textAlign':getAlign, 'textAlign':getAlign,
'fontSize':getFontSize}" 'fontSize':getFontSize}"
@click="itemClick()" @click="itemClick"
>{{getContent}}</p> >{{getContent}}</p>
</div> </div>
</template> </template>
...@@ -108,7 +108,8 @@ export default { ...@@ -108,7 +108,8 @@ export default {
} }
}, },
methods: { methods: {
itemClick() { itemClick(e) {
app.trackCpn(e, this.datas.componentName, this.datas.componentData)
app.$themeToLink(this.datas.componentData.link); app.$themeToLink(this.datas.componentData.link);
} }
}, },
......
...@@ -23,6 +23,7 @@ import "@/utils/themeModule"; ...@@ -23,6 +23,7 @@ import "@/utils/themeModule";
// import { themeToLinkInit } from "@/utils/themeModule"; // import { themeToLinkInit } from "@/utils/themeModule";
import shop from "./api/shop"; import shop from "./api/shop";
import spokesman from "@/api/spokesman"; import spokesman from "@/api/spokesman";
import live from "@/api/live"
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
...@@ -86,9 +87,29 @@ mpApp.webviewCallBack = function () { } ...@@ -86,9 +87,29 @@ mpApp.webviewCallBack = function () { }
mpApp.shareInit = function () {}; mpApp.shareInit = function () {};
mpApp.themeColorCallBack = function () {}; mpApp.themeColorCallBack = function () {};
mpApp.indexBgCallBack = function(){ } mpApp.indexBgCallBack = function(){ }
/**
* 组件点击行为收集
* @param {event} event 原生事件
* @param {*} componentInfo 完整信息
* @param {*} itemInfo 具体信息
*/
mpApp.trackCpn = (event, componentInfo, itemInfo) => {
console.log('tzBehavior测试-----', event);
let x = 0, y = 0;
if (event) {
if (event.x || event.detail.x) { x = event.x || event.detail.x }
if (event.y || event.detail.y) { y = event.y || event.detail.y }
}
mpBehavior.trackEvent('cpn_click', {
xAxis: x.toFixed(2) || 0, // x轴
yAxis: y.toFixed(2) || 0, // y轴
cpnInfo: JSON.stringify(componentInfo), // 完整信息
itemInfo: JSON.stringify(itemInfo) || '' // 具体信息
})
}
// 全局数据 // 全局数据
mpApp.processEnv = process.env; mpApp.processEnv = process.env;
// 全局跳转 data为link对象 // 全局跳转 data为link对象
...@@ -138,6 +159,40 @@ function getThemePage({mixid,shopid}) { ...@@ -138,6 +159,40 @@ function getThemePage({mixid,shopid}) {
} }
// 当前用户 id
let userId
// 分销员 id
let spokesmanId
/**
* 全局页面切换监听
*/
wx.onAppRoute(res => {
// 获取当前页面信息
let currentPage = getCurrentPages()
// let fromPath = currentPage[currentPage.length - 1].__displayReporter.showReferpagepath
new Promise((resolve) => {
if (!spokesmanId) {
// 获取当前分销员 id
spokesman.getSpokesmanidByShare().then(res => {
if (res.data.data.spokesmanId) { spokesmanId = res.data.data.spokesmanId }
})
}
if (!userId) { // 防止多次调用
// 获取当前用户 id
live.getUserInfo().then(res => { userId = res.data.data.userId })
}
userId && resolve()
}).then(() => {
mpBehavior.trackPageView({
title: '',
location: res.path,
// path: fromPath.substring(0, fromPath.length - 5),
path: res.path,
sales: spokesmanId,
userId: userId
});
})
})
// if (!mpApp.globalData.setPopupStorage){ // if (!mpApp.globalData.setPopupStorage){
...@@ -154,4 +209,4 @@ function getThemePage({mixid,shopid}) { ...@@ -154,4 +209,4 @@ function getThemePage({mixid,shopid}) {
// wx.setStorageSync('popUpList', popUpList) // wx.setStorageSync('popUpList', popUpList)
// } // }
\ No newline at end of file
...@@ -236,8 +236,9 @@ export default { ...@@ -236,8 +236,9 @@ export default {
const observer = performance.createObserver((entryList) => { const observer = performance.createObserver((entryList) => {
let getEntries=entryList.getEntries() let getEntries=entryList.getEntries()
wx.reportPerformance(2001, getEntries[0]['duration']) wx.reportPerformance(2001, getEntries[0]['duration'])
this.$mpBehavior.monitorPerformance(getEntries[0])
}) })
observer.observe({ entryTypes: ['render', 'script'] }) observer.observe({ entryTypes: ['render'] })
} }
// 查询是否展示生日礼品 // 查询是否展示生日礼品
......
...@@ -32,15 +32,13 @@ Component({ ...@@ -32,15 +32,13 @@ Component({
console.log(getCurrentPages()) console.log(getCurrentPages())
this.setData({ this.setData({
designateAreaObj: this.data.datas.componentData.designateAreaObj designateAreaObj: this.data.datas.componentData.designateAreaObj
}) })
//分销商货架存在 //分销商货架存在
if( if(
app.fenxiaoModel.spokesmanInfo&& app.fenxiaoModel.spokesmanInfo&&
app.fenxiaoModel.spokesmanInfo.parentSpokesmanDistributionModel == '1'&& app.fenxiaoModel.spokesmanInfo.parentSpokesmanDistributionModel == '1'&&
app.fenxiaoModel.spokesmanInfo.distributorHomepage.id app.fenxiaoModel.spokesmanInfo.distributorHomepage.id
) { ) {
this.setData({ this.setData({
...@@ -59,7 +57,6 @@ Component({ ...@@ -59,7 +57,6 @@ Component({
}) })
return return
} }
if (this.data.datas.componentInfo.visible == 1) { if (this.data.datas.componentInfo.visible == 1) {
let _this = this; let _this = this;
...@@ -84,7 +81,6 @@ Component({ ...@@ -84,7 +81,6 @@ Component({
if(this.data.changeLocation == 1){ if(this.data.changeLocation == 1){
return return
} }
wx.getLocation({ wx.getLocation({
type: 'wgs84', type: 'wgs84',
success(res) { success(res) {
...@@ -143,7 +139,7 @@ Component({ ...@@ -143,7 +139,7 @@ Component({
} else { } else {
_this.setData({ _this.setData({
changeShow: true changeShow: true
}) })
} }
...@@ -192,7 +188,6 @@ Component({ ...@@ -192,7 +188,6 @@ Component({
console.log('定位失败') console.log('定位失败')
if(!wx.getStorageSync('location')){ if(!wx.getStorageSync('location')){
if(_this.data.designateAreaObj.id){ if(_this.data.designateAreaObj.id){
wx.setStorageSync('location', JSON.stringify({ wx.setStorageSync('location', JSON.stringify({
id : _this.data.designateAreaObj.id, id : _this.data.designateAreaObj.id,
regionName: _this.data.designateAreaObj.regionName, regionName: _this.data.designateAreaObj.regionName,
...@@ -215,7 +210,6 @@ Component({ ...@@ -215,7 +210,6 @@ Component({
console.log('111111++++++++++++++++++++定位组件加载好了++++++++++++++++++++111') console.log('111111++++++++++++++++++++定位组件加载好了++++++++++++++++++++111')
}, },
pageLifetimes : { pageLifetimes : {
show(){ show(){
console.log('组件页面出来show', this.data.designateAreaObj) console.log('组件页面出来show', this.data.designateAreaObj)
...@@ -283,9 +277,9 @@ Component({ ...@@ -283,9 +277,9 @@ Component({
return return
} }
} }
} }
}, },
...@@ -295,9 +289,9 @@ Component({ ...@@ -295,9 +289,9 @@ Component({
*/ */
methods: { methods: {
//切换城市 //切换城市
changeTo(){ changeTo(e){
console.log(this.data.designateAreaObj) console.log(this.data.designateAreaObj)
this.setData({ this.setData({
'designateAreaObj.id': this.data.positionCity.operatingAreaAreaId, 'designateAreaObj.id': this.data.positionCity.operatingAreaAreaId,
'designateAreaObj.regionName': this.data.positionCity.regionName, 'designateAreaObj.regionName': this.data.positionCity.regionName,
...@@ -315,13 +309,13 @@ Component({ ...@@ -315,13 +309,13 @@ Component({
changeShow : false changeShow : false
}) })
wx.setStorageSync('location', change ) wx.setStorageSync('location', change )
app.trackCpn(e, this.data.datas.componentName, 'tzChangeTo')
wx.reLaunch({ wx.reLaunch({
url: '/pages/home/main?changeLocation=1' url: '/pages/home/main?changeLocation=1'
}) })
}, },
continueBrowser(){ continueBrowser(e){
console.log(this.data.designateAreaObj,'this.data.designateAreaObj') console.log(this.data.designateAreaObj,'this.data.designateAreaObj')
wx.setStorageSync('location', JSON.stringify(this.data.designateAreaObj)) wx.setStorageSync('location', JSON.stringify(this.data.designateAreaObj))
this.setData({ this.setData({
...@@ -329,23 +323,25 @@ Component({ ...@@ -329,23 +323,25 @@ Component({
changeShow: false changeShow: false
}) })
// wx.startPullDownRefresh() // wx.startPullDownRefresh()
app.trackCpn(e, this.data.datas.componentName, 'continueBrowser')
wx.reLaunch({ wx.reLaunch({
url: '/pages/home/main?changeLocation=1' url: '/pages/home/main?changeLocation=1'
}) })
}, },
changeOtherCity(){ changeOtherCity(e){
console.log(getCurrentPages()) console.log(getCurrentPages())
app.trackCpn(e, this.data.datas.componentName, 'changeOtherCity')
wx.navigateTo({ wx.navigateTo({
url: '/pages/changeAdr/main?areaGroupId=' + this.data.designateAreaObj.areaGroupId, url: '/pages/changeAdr/main?areaGroupId=' + this.data.designateAreaObj.areaGroupId,
}) })
}, },
toSearchPage(){ toSearchPage(e){
app.trackCpn(e, this.data.datas.componentName, 'toSearchPage')
app.$themeToLink({ app.$themeToLink({
type : 1, type : 1,
link: '/goodsSearch/goodsSearch' link: '/goodsSearch/goodsSearch'
}) })
} }
}, },
}) })
...@@ -35,6 +35,7 @@ Component({ ...@@ -35,6 +35,7 @@ Component({
onClick(data) { onClick(data) {
let item = data.currentTarget.dataset.item; let item = data.currentTarget.dataset.item;
console.log(data.currentTarget.dataset.item, "iiii"); console.log(data.currentTarget.dataset.item, "iiii");
app.trackCpn(data, this.data.datas.componentName, item)
app.$themeToLink(item.link); app.$themeToLink(item.link);
}, },
loadImg(e) { loadImg(e) {
...@@ -50,4 +51,4 @@ Component({ ...@@ -50,4 +51,4 @@ Component({
this.setData({ bannerHeight: swiperH, firstLoad }); //设置高度 this.setData({ bannerHeight: swiperH, firstLoad }); //设置高度
} }
} }
}); });
\ No newline at end of file
...@@ -91,9 +91,7 @@ Component({ ...@@ -91,9 +91,7 @@ Component({
cube3H: res.height * (Math.ceil(_this.data.imgList.length / _this.data.datas.componentData.columnNum)) cube3H: res.height * (Math.ceil(_this.data.imgList.length / _this.data.datas.componentData.columnNum))
}) })
} }
} }
} }
}).exec() }).exec()
...@@ -132,7 +130,6 @@ Component({ ...@@ -132,7 +130,6 @@ Component({
wArr[_this.data.datas.componentData.columnNum - 1] wArr[_this.data.datas.componentData.columnNum - 1]
}) })
} }
_this.setData({ _this.setData({
w: wArr[_this.data.datas.componentData.columnNum - 1] w: wArr[_this.data.datas.componentData.columnNum - 1]
}) })
...@@ -178,7 +175,8 @@ Component({ ...@@ -178,7 +175,8 @@ Component({
onclickHandle(e){ onclickHandle(e){
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
console.log(item) console.log(item)
app.trackCpn(e, this.data.datas.componentName, item)
app.$themeToLink(item.link) app.$themeToLink(item.link)
} }
} }
}) })
\ No newline at end of file
...@@ -20,15 +20,15 @@ Component({ ...@@ -20,15 +20,15 @@ Component({
this.setData({ this.setData({
imgIcon: app.DFSImg(this.data.datas.componentData.backgroundImage, this.data.datas.componentData['sizeInfo']['width'] * 6, this.data.datas.componentData['sizeInfo']['width'] * 6,1) imgIcon: app.DFSImg(this.data.datas.componentData.backgroundImage, this.data.datas.componentData['sizeInfo']['width'] * 6, this.data.datas.componentData['sizeInfo']['width'] * 6,1)
}) })
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
clickHandler(){ clickHandler(e){
console.log('浮窗点击', this.data.datas.componentData.link) console.log('浮窗点击', this.data.datas.componentData.link)
app.trackCpn(e, this.data.datas.componentName)
app.$themeToLink(this.data.datas.componentData.link) app.$themeToLink(this.data.datas.componentData.link)
} }
} }
......
...@@ -56,7 +56,6 @@ const componentOptions = { ...@@ -56,7 +56,6 @@ const componentOptions = {
detached() {} detached() {}
}, },
attached() { attached() {
}, },
definitionFilter() {}, definitionFilter() {},
onPageScroll() { onPageScroll() {
...@@ -116,11 +115,11 @@ const componentOptions = { ...@@ -116,11 +115,11 @@ const componentOptions = {
// this.data.lists = lists; // this.data.lists = lists;
this.setData({ lists: lists }); this.setData({ lists: lists });
} }
}) })
}, },
toSpokesmanHomePage() { toSpokesmanHomePage(e) {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo' let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo'
app.trackCpn(e, this.data.datas.componentName)
$themeToLink({ $themeToLink({
type: 1, type: 1,
link:linkVal, link:linkVal,
...@@ -142,6 +141,7 @@ const componentOptions = { ...@@ -142,6 +141,7 @@ const componentOptions = {
toGoodsInfo(event) { toGoodsInfo(event) {
const item = event.currentTarget.dataset.item; const item = event.currentTarget.dataset.item;
let linkVal = `/goods/${item.terminalProductGoods.productId}` let linkVal = `/goods/${item.terminalProductGoods.productId}`
app.trackCpn(event, this.data.datas.componentName, item)
$themeToLink({ $themeToLink({
type: 1, type: 1,
link:linkVal, link:linkVal,
......
...@@ -57,10 +57,12 @@ const componentOptions = { ...@@ -57,10 +57,12 @@ const componentOptions = {
onChange(e) { onChange(e) {
this.setData({ timeData: e.detail }); this.setData({ timeData: e.detail });
}, },
onclickProduct() { onclickProduct(e) {
let { goodsType } = this.data.datas.componentData; let { goodsType } = this.data.datas.componentData;
let { let {
shopName,
productId, productId,
productName,
terminalProductId, terminalProductId,
terminalGoodsMixId terminalGoodsMixId
} = this.data.items; } = this.data.items;
...@@ -70,17 +72,22 @@ const componentOptions = { ...@@ -70,17 +72,22 @@ const componentOptions = {
} else if (goodsType == 1) { } else if (goodsType == 1) {
linkVal = `/pointShop/goodsDetail?productId${productId}&terminalProductId=${terminalProductId}&terminalGoodsMixId=${terminalGoodsMixId}`; linkVal = `/pointShop/goodsDetail?productId${productId}&terminalProductId=${terminalProductId}&terminalGoodsMixId=${terminalGoodsMixId}`;
} }
app.trackCpn(e, this.data.datas.componentName, {
shopName,productId,productName,terminalProductId,terminalGoodsMixId
})
$themeToLink({ $themeToLink({
type: 1, type: 1,
link: linkVal link: linkVal
}); });
}, },
onclickBuynow() { onclickBuynow(e) {
let { btnType } = this.data.datas.componentData; let { btnType } = this.data.datas.componentData;
let { let {
minProductGoodsMixid, minProductGoodsMixid,
minProductGoodsId, minProductGoodsId,
minGoodsId productName,
minGoodsId,
shopName
} = this.data.items; } = this.data.items;
let linkVal = ""; let linkVal = "";
if (btnType < 6) { if (btnType < 6) {
...@@ -92,10 +99,14 @@ const componentOptions = { ...@@ -92,10 +99,14 @@ const componentOptions = {
linkVal = `/order/orderConfirm?productGoodsMixId=${minProductGoodsMixid}&productGoodsId=${minProductGoodsId}&goodsId=${minGoodsId}&qty=1&goodsString=null&source=3`; linkVal = `/order/orderConfirm?productGoodsMixId=${minProductGoodsMixid}&productGoodsId=${minProductGoodsId}&goodsId=${minGoodsId}&qty=1&goodsString=null&source=3`;
} }
console.log(linkVal, "-------90"); console.log(linkVal, "-------90");
app.trackCpn(e, this.data.datas.componentName, {
shopName,minGoodsId,productName,minProductGoodsId,minProductGoodsMixid
})
$themeToLink({ type: 1, link: linkVal }); $themeToLink({ type: 1, link: linkVal });
}, },
toMerchants() { toMerchants(e) {
let { orgId } = this.data.items; let { orgId } = this.data.items;
app.trackCpn(e, this.data.datas.componentName, 'toMerchants')
$themeToLink({ type: 1, link: `/merchantsDetail/${orgId}` }); $themeToLink({ type: 1, link: `/merchantsDetail/${orgId}` });
}, },
......
...@@ -341,7 +341,7 @@ const componentOptions = { ...@@ -341,7 +341,7 @@ const componentOptions = {
console.log("---触发分页加载"); console.log("---触发分页加载");
this.getProductList(1, 2); this.getProductList(1, 2);
}, },
viewMore() { viewMore(e) {
let { let {
goodsType, goodsType,
style, style,
...@@ -358,6 +358,7 @@ const componentOptions = { ...@@ -358,6 +358,7 @@ const componentOptions = {
} else { } else {
linkVal = `/pointShop/productList?categoryName=${categoryName}&categoryId=${categoryId}`; linkVal = `/pointShop/productList?categoryName=${categoryName}&categoryId=${categoryId}`;
} }
app.trackCpn(e, this.data.datas.componentName, 'ViewMore查看更多')
$themeToLink({ $themeToLink({
type: 1, type: 1,
link: linkVal link: linkVal
......
...@@ -45,7 +45,8 @@ Component({ ...@@ -45,7 +45,8 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
toSearchPage(){ toSearchPage(e){
app.trackCpn(e, this.data.datas.componentName)
app.$themeToLink({ app.$themeToLink({
type: 1, type: 1,
link: '/contentSearch/contentSearch?placeHolderText=' + (this.data.datas.componentData["placeHolderVal"] || '') link: '/contentSearch/contentSearch?placeHolderText=' + (this.data.datas.componentData["placeHolderVal"] || '')
......
...@@ -73,7 +73,8 @@ Component({ ...@@ -73,7 +73,8 @@ Component({
}) })
}, },
toList(){ toList(e){
app.trackCpn(e, this.data.datas.componentName, '查看更多')
app.$themeToLink({ app.$themeToLink({
type: 1, type: 1,
link: '/liveBroadcast/list' link: '/liveBroadcast/list'
...@@ -81,6 +82,7 @@ Component({ ...@@ -81,6 +82,7 @@ Component({
}, },
toLiveDetail(e){ toLiveDetail(e){
let id = e.currentTarget.dataset.itemid let id = e.currentTarget.dataset.itemid
app.trackCpn(e, this.data.datas.componentName, id)
app.$themeToLink({ app.$themeToLink({
type: 1, type: 1,
link: '/liveBroadcast/lived?liveId=' + id link: '/liveBroadcast/lived?liveId=' + id
......
...@@ -89,7 +89,7 @@ Component({ ...@@ -89,7 +89,7 @@ Component({
if (val == 1){ if (val == 1){
if (this.data.datas.componentData.layoutType == 0){ if (this.data.datas.componentData.layoutType == 0){
this.setData({ this.setData({
WaterfallFlowListL: [], WaterfallFlowListL: [],
WaterfallFlowListR: [] WaterfallFlowListR: []
...@@ -133,7 +133,7 @@ Component({ ...@@ -133,7 +133,7 @@ Component({
['WaterfallFlowList[' + this.data.WaterfallFlowList.length + ']']: list ['WaterfallFlowList[' + this.data.WaterfallFlowList.length + ']']: list
}) })
} }
} }
if (this.data.WaterfallFlowList.length <= 0) { if (this.data.WaterfallFlowList.length <= 0) {
this.showList = false; this.showList = false;
...@@ -169,7 +169,7 @@ Component({ ...@@ -169,7 +169,7 @@ Component({
// let scrollTop = parseInt(el.scrollTop); // let scrollTop = parseInt(el.scrollTop);
// let domHeight = parseInt(res.height); // let domHeight = parseInt(res.height);
if (res.top < windowHeight && res.top + res.height > 0 && _this.data.finished == false) { if (res.top < windowHeight && res.top + res.height > 0 && _this.data.finished == false) {
_this.loadHandle(2); _this.loadHandle(2);
} }
// if ( // if (
...@@ -198,7 +198,7 @@ Component({ ...@@ -198,7 +198,7 @@ Component({
// } // }
} }
}).exec() }).exec()
// wx.createSelectorQuery().in(this).select("#ItemModule1").boundingClientRect(function(res){ // wx.createSelectorQuery().in(this).select("#ItemModule1").boundingClientRect(function(res){
// if (res) { // if (res) {
...@@ -222,6 +222,7 @@ Component({ ...@@ -222,6 +222,7 @@ Component({
itemClick(e){ itemClick(e){
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
console.log(item) console.log(item)
app.trackCpn(e, this.data.datas.componentName, item)
app.$themeToLink({ app.$themeToLink({
type: 1, type: 1,
link: `/merchantsDetail/${ item.boundOrgId }` link: `/merchantsDetail/${ item.boundOrgId }`
......
...@@ -42,7 +42,9 @@ Component({ ...@@ -42,7 +42,9 @@ Component({
*/ */
methods: { methods: {
onclickHandle(e) { onclickHandle(e) {
app.$themeToLink(this.data.datas.componentData.noticeList[e.currentTarget.dataset.index].link) let item = this.data.datas.componentData.noticeList[e.currentTarget.dataset.index]
app.trackCpn(e, this.data.datas.componentName, item)
app.$themeToLink(item.link)
}, },
getNoticeMargin() { getNoticeMargin() {
this.setData({ this.setData({
......
...@@ -37,7 +37,6 @@ Component({ ...@@ -37,7 +37,6 @@ Component({
WaterfallFlowListR : [] WaterfallFlowListR : []
}, },
ready(){ ready(){
if (this.data.datas.componentData.paddingList){ if (this.data.datas.componentData.paddingList){
this.setData({ this.setData({
getPaddingList: this.data.datas.componentData.paddingList getPaddingList: this.data.datas.componentData.paddingList
...@@ -87,6 +86,7 @@ Component({ ...@@ -87,6 +86,7 @@ Component({
methods: { methods: {
itemClick(e){ itemClick(e){
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
app.trackCpn(e, this.data.datas.componentName, item)
app.$themeToLink(item.link) app.$themeToLink(item.link)
}, },
bindload(e){ bindload(e){
...@@ -98,8 +98,6 @@ Component({ ...@@ -98,8 +98,6 @@ Component({
console.log(index,width,height) console.log(index,width,height)
this.setData({ this.setData({
lenI : this.data.lenI + 1 lenI : this.data.lenI + 1
}) })
...@@ -130,9 +128,6 @@ Component({ ...@@ -130,9 +128,6 @@ Component({
['imgArr[' + ii + '].height']: it.height /b ['imgArr[' + ii + '].height']: it.height /b
}) })
}) })
} }
} }
......
...@@ -10,8 +10,6 @@ Component({ ...@@ -10,8 +10,6 @@ Component({
} }
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
...@@ -29,7 +27,6 @@ Component({ ...@@ -29,7 +27,6 @@ Component({
this.setData({ this.setData({
img: app.DFSImg(this.data.datas.componentData.imageUrl,700,null,1) img: app.DFSImg(this.data.datas.componentData.imageUrl,700,null,1)
}) })
console.log(this.data.datas.componentData,'this.data.datas.componentData.once') console.log(this.data.datas.componentData,'this.data.datas.componentData.once')
if(!this.data.datas.componentData.once){ if(!this.data.datas.componentData.once){
console.log('laizhelile') console.log('laizhelile')
...@@ -68,7 +65,6 @@ Component({ ...@@ -68,7 +65,6 @@ Component({
let routes = getCurrentPages() let routes = getCurrentPages()
let page = routes[routes.length - 1].route let page = routes[routes.length - 1].route
return wx.getStorageSync(`${app.globalData.shopInfo.shopCode}_popFlag_${page}_${this.data.datas.id}`) return wx.getStorageSync(`${app.globalData.shopInfo.shopCode}_popFlag_${page}_${this.data.datas.id}`)
}, },
setPopFlag(value) { setPopFlag(value) {
app.globalData.setPopupStorage = 1; app.globalData.setPopupStorage = 1;
...@@ -80,17 +76,18 @@ Component({ ...@@ -80,17 +76,18 @@ Component({
wx.setStorageSync('popUpList', popUpList) wx.setStorageSync('popUpList', popUpList)
console.log(app.globalData) console.log(app.globalData)
}, },
backHandle(){ backHandle(e){
this.setData({ this.setData({
domainShow : false domainShow : false
}) })
if(this.data.datas.componentData.once){ if(this.data.datas.componentData.once){
this.setPopFlag("true"); this.setPopFlag("true");
} }
app.trackCpn(e, this.data.datas.componentName, '关闭自动弹窗广告')
clearTimeout(this.data.timeout); clearTimeout(this.data.timeout);
}, },
onclickHandle() { onclickHandle(e) {
app.trackCpn(e, this.data.datas.componentName, '点击自动弹窗广告')
app.$themeToLink(this.data.datas.componentData.link); app.$themeToLink(this.data.datas.componentData.link);
} }
} }
......
...@@ -32,7 +32,6 @@ const componentOptions = { ...@@ -32,7 +32,6 @@ const componentOptions = {
detached() {} detached() {}
}, },
attached() { attached() {
}, },
definitionFilter() {}, definitionFilter() {},
onPageScroll() { onPageScroll() {
...@@ -46,7 +45,6 @@ const componentOptions = { ...@@ -46,7 +45,6 @@ const componentOptions = {
}, },
// 页面被隐藏 // 页面被隐藏
hide() { hide() {
}, },
// 页面尺寸变化时 // 页面尺寸变化时
resize() {} resize() {}
...@@ -57,7 +55,8 @@ const componentOptions = { ...@@ -57,7 +55,8 @@ const componentOptions = {
// this.setData(showPop) // this.setData(showPop)
this.setData({ showPop: true }); this.setData({ showPop: true });
}, },
setNewShop() { setNewShop(e) {
app.trackCpn(e, '分销商组件')
// window.sessionStorage.setItem(getTokenTwo()+'currentState',0) // window.sessionStorage.setItem(getTokenTwo()+'currentState',0)
app.fenxiaoModel.getDistributorHomepage().then(res=>{ app.fenxiaoModel.getDistributorHomepage().then(res=>{
console.log(res,888888888) console.log(res,888888888)
...@@ -73,7 +72,6 @@ const componentOptions = { ...@@ -73,7 +72,6 @@ const componentOptions = {
}) })
}, },
copyShop() { copyShop() {
app.fenxiaoModel.oneClickShopQuickCopy({grossProfitMargin: parseFloat(this.data.distributionPrice1)}).then(res=>{ app.fenxiaoModel.oneClickShopQuickCopy({grossProfitMargin: parseFloat(this.data.distributionPrice1)}).then(res=>{
if(res == 'true') { if(res == 'true') {
this.initShopDetail() this.initShopDetail()
......
...@@ -52,7 +52,7 @@ Component({ ...@@ -52,7 +52,7 @@ Component({
}) })
this.queryBuyingShowList(0) this.queryBuyingShowList(0)
} }
app.trackCpn(e, this.data.datas.componentName, e.currentTarget.dataset)
}, },
queryBuyingShowList(type){ queryBuyingShowList(type){
if (this.data.datas.componentData["activityFlag"][0]["id"] == "" || !this.data.loaded){ if (this.data.datas.componentData["activityFlag"][0]["id"] == "" || !this.data.loaded){
...@@ -114,7 +114,7 @@ Component({ ...@@ -114,7 +114,7 @@ Component({
}else{ }else{
item.nameIcon = this.data.iconStyleList[this.data.datas.componentData['iconStyle']].toggle item.nameIcon = this.data.iconStyleList[this.data.datas.componentData['iconStyle']].toggle
} }
if (this.getFileType(item.urls[0]) == 'video'){ if (this.getFileType(item.urls[0]) == 'video'){
item.coverImg = app.DFSImg(`${item.urls[0]}?x-oss-process=video/snapshot,t_1,m_fast`) item.coverImg = app.DFSImg(`${item.urls[0]}?x-oss-process=video/snapshot,t_1,m_fast`)
}else{ }else{
...@@ -135,7 +135,7 @@ Component({ ...@@ -135,7 +135,7 @@ Component({
console.log(this.data.waterfallLeftList, this.data.waterfallRightList,' this.data.waterfallRightList') console.log(this.data.waterfallLeftList, this.data.waterfallRightList,' this.data.waterfallRightList')
}else{ }else{
let { waterfallLeftList, waterfallRightList } = this.data let { waterfallLeftList, waterfallRightList } = this.data
data.forEach((item, index) => { data.forEach((item, index) => {
item.customerHandImage = app.DFSImg(item.customerHandImage) item.customerHandImage = app.DFSImg(item.customerHandImage)
...@@ -286,12 +286,14 @@ Component({ ...@@ -286,12 +286,14 @@ Component({
buyingShowHandle(e){ buyingShowHandle(e){
let id = e.currentTarget.dataset.id let id = e.currentTarget.dataset.id
console.log(id) console.log(id)
app.trackCpn(e, this.data.datas.componentName, e.currentTarget.dataset)
app.$themeToLink({ app.$themeToLink({
type: 1, type: 1,
link: '/buyerShow/showDetail?buyingShowId=' + id link: '/buyerShow/showDetail?buyingShowId=' + id
}) })
}, },
viewMore(){ viewMore(e){
app.trackCpn(e, this.data.datas.componentName, 'ViewMore')
this.queryBuyingShowList(1); this.queryBuyingShowList(1);
} }
} }
......
...@@ -68,6 +68,7 @@ const componentOptions = { ...@@ -68,6 +68,7 @@ const componentOptions = {
this.onClose(); this.onClose();
}, },
copyText(e) { copyText(e) {
app.trackCpn(e, '首页分享', '复制链接')
let pagePath = `${processEnv.BASE_URL}?mixid=${globalData.shopInfo.shopCode}`; let pagePath = `${processEnv.BASE_URL}?mixid=${globalData.shopInfo.shopCode}`;
let copyVal = pagePath; let copyVal = pagePath;
app.fenxiaoModel.getSpokesmanidByShare().then(res=>{ app.fenxiaoModel.getSpokesmanidByShare().then(res=>{
...@@ -87,7 +88,8 @@ const componentOptions = { ...@@ -87,7 +88,8 @@ const componentOptions = {
}); });
}) })
}, },
toPosters() { toPosters(e) {
app.trackCpn(e, '首页分享', '生成海报')
let userInfo = wx.getStorageSync("userInfo") ? JSON.parse(wx.getStorageSync("userInfo")):''; let userInfo = wx.getStorageSync("userInfo") ? JSON.parse(wx.getStorageSync("userInfo")):'';
let queryHref = `${processEnv.BASE_URL}?mixid=${globalData.shopInfo.shopCode}`; let queryHref = `${processEnv.BASE_URL}?mixid=${globalData.shopInfo.shopCode}`;
app.fenxiaoModel.getSpokesmanidByShare().then(res=>{ app.fenxiaoModel.getSpokesmanidByShare().then(res=>{
......
...@@ -63,7 +63,7 @@ Component({ ...@@ -63,7 +63,7 @@ Component({
item.categoryImgUrl = app.DFSImg(item.categoryImgUrl,400,400) item.categoryImgUrl = app.DFSImg(item.categoryImgUrl,400,400)
} }
}) })
console.log(res.data.data.category[0].children, 'res.data.data.category[0].children') console.log(res.data.data.category[0].children, 'res.data.data.category[0].children')
...@@ -87,6 +87,7 @@ Component({ ...@@ -87,6 +87,7 @@ Component({
methods: { methods: {
onclick(e){ onclick(e){
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
app.trackCpn(e, this.data.datas.componentName, item)
app.$themeToLink({ app.$themeToLink({
type: 1, type: 1,
link: `/goods/commodityMenu?categoryName=${item.categoryName}&categoryId=${item.id}` link: `/goods/commodityMenu?categoryName=${item.categoryName}&categoryId=${item.id}`
......
...@@ -36,7 +36,8 @@ const componentOptions = { ...@@ -36,7 +36,8 @@ const componentOptions = {
: false; : false;
this.setData({ timeData: e.detail, "datas.isStart": isStart }); this.setData({ timeData: e.detail, "datas.isStart": isStart });
}, },
toActivity() { toActivity(e) {
app.trackCpn(e, this.data.datas.componentName)
$themeToLink({ type: 1, link: `/brandTopics/${this.data.datas.id}` }); $themeToLink({ type: 1, link: `/brandTopics/${this.data.datas.id}` });
} }
}, },
......
...@@ -292,10 +292,19 @@ const componentOptions = { ...@@ -292,10 +292,19 @@ const componentOptions = {
"-------------------------226" "-------------------------226"
); );
let { let {
shopName,
productId,
productName,
terminalProductId, terminalProductId,
terminalGoodsMixId, terminalGoodsMixId
productId
} = e.currentTarget.dataset.items; } = e.currentTarget.dataset.items;
app.trackCpn(e, this.data.datas.componentName, {
shopName,
productId,
productName,
terminalProductId,
terminalGoodsMixId
})
$themeToLink({ $themeToLink({
type: 1, type: 1,
link: `/goods/${productId}?limitedLime=true&endTime=${ link: `/goods/${productId}?limitedLime=true&endTime=${
...@@ -309,6 +318,11 @@ const componentOptions = { ...@@ -309,6 +318,11 @@ const componentOptions = {
terminalGoodsId, terminalGoodsId,
goodsId goodsId
} = e.currentTarget.dataset.items; } = e.currentTarget.dataset.items;
app.trackCpn(e, this.data.datas.componentName, {
terminalGoodsMixId,
terminalGoodsId,
goodsId
})
$themeToLink({ $themeToLink({
type: 1, type: 1,
link: `/order/orderConfirm?productGoodsMixId=${terminalGoodsMixId}&productGoodsId=${terminalGoodsId}&goodsId=${goodsId}&qty=1&goodsString=null` link: `/order/orderConfirm?productGoodsMixId=${terminalGoodsMixId}&productGoodsId=${terminalGoodsId}&goodsId=${goodsId}&qty=1&goodsString=null`
......
const app = getApp();
const componentOptions = { const componentOptions = {
// 组件选项 // 组件选项
options: { options: {
...@@ -23,7 +24,8 @@ const componentOptions = { ...@@ -23,7 +24,8 @@ const componentOptions = {
// 组件方法 // 组件方法
methods: { methods: {
init() {}, init() {},
playVideo() { playVideo(e) {
app.trackCpn(e, this.data.datas.componentName)
// 视频播放 // 视频播放
if (this.data.datas.componentData['nativeControl']) { if (this.data.datas.componentData['nativeControl']) {
return return
......
...@@ -57,7 +57,7 @@ const componentOptions = { ...@@ -57,7 +57,7 @@ const componentOptions = {
onChange(e) { onChange(e) {
this.setData({ timeData: e.detail }); this.setData({ timeData: e.detail });
}, },
onclickProduct() { onclickProduct(e) {
let { goodsType } = this.data.datas.componentData; let { goodsType } = this.data.datas.componentData;
let { let {
productId, productId,
...@@ -70,12 +70,13 @@ const componentOptions = { ...@@ -70,12 +70,13 @@ const componentOptions = {
} else if (goodsType == 1) { } else if (goodsType == 1) {
linkVal = `/pointShop/goodsDetail?productId${productId}&terminalProductId=${terminalProductId}&terminalGoodsMixId=${terminalGoodsMixId}`; linkVal = `/pointShop/goodsDetail?productId${productId}&terminalProductId=${terminalProductId}&terminalGoodsMixId=${terminalGoodsMixId}`;
} }
app.trackCpn(e, this.data.datas.componentName)
$themeToLink({ $themeToLink({
type: 1, type: 1,
link: linkVal link: linkVal
}); });
}, },
onclickBuynow() { onclickBuynow(e) {
let { btnType } = this.data.datas.componentData; let { btnType } = this.data.datas.componentData;
let { let {
minProductGoodsMixid, minProductGoodsMixid,
...@@ -92,10 +93,12 @@ const componentOptions = { ...@@ -92,10 +93,12 @@ const componentOptions = {
linkVal = `/order/orderConfirm?productGoodsMixId=${minProductGoodsMixid}&productGoodsId=${minProductGoodsId}&goodsId=${minGoodsId}&qty=1&goodsString=null&source=3`; linkVal = `/order/orderConfirm?productGoodsMixId=${minProductGoodsMixid}&productGoodsId=${minProductGoodsId}&goodsId=${minGoodsId}&qty=1&goodsString=null&source=3`;
} }
console.log(linkVal, "-------90"); console.log(linkVal, "-------90");
app.trackCpn(e, this.data.datas.componentName)
$themeToLink({ type: 1, link: linkVal }); $themeToLink({ type: 1, link: linkVal });
}, },
toMerchants() { toMerchants(e) {
let { orgId } = this.data.items; let { orgId } = this.data.items;
app.trackCpn(e, this.data.datas.componentName)
$themeToLink({ type: 1, link: `/merchantsDetail/${orgId}` }); $themeToLink({ type: 1, link: `/merchantsDetail/${orgId}` });
}, },
......
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