Authored by yyq

Merge branch 'feature/import' of git.yoho.cn:fe/yoho-miniapp-eshop into feature/import

... ... @@ -41,13 +41,13 @@ Component({
floor_item_index
} = e.currentTarget.dataset;
this.triggerEvent('clickreport', {
let repParams = {
F_ID: floor_id,
F_NAME: floor_name,
F_URL: floor_url,
F_INDEX: floor_index,
I_INDEX: floor_item_index
});
};
// 店铺装修楼层URL规则解析
if (this.data.urlRule === 'shopDecor') {
... ... @@ -85,9 +85,14 @@ Component({
break;
}
}
repParams.F_URL = url;
this.triggerEvent('clickreport', repParams);
return global.router.go(url, params);
}
repParams.F_URL = this.data.url;
this.triggerEvent('clickreport', repParams);
return global.router.goUrl(this.data.url);
}
}
... ...
... ... @@ -7,6 +7,20 @@ Component({
properties: {
type: Object,
value: {}
},
// use for floors' click report
floorId: {
type: String,
value: ''
},
floorName: {
type: String,
value: ''
},
floorIndex: {
type: String, // start from 1
value: ''
}
},
methods: {
... ...
... ... @@ -34,6 +34,9 @@ Page({
yas = new Yas(app);
},
onShow: function() {
yas.pageOpenReport();
yas.report('YB_MAIN_TAB_C', {TAB_ID: 1});
const shopId = app.getShopId();
wx.setNavigationBarTitle({
... ... @@ -81,13 +84,31 @@ Page({
},
toSearch() {
yas.report('YB_SEARCH_C', {SEARCH_POS: 1});
router.go('productSearch');
},
resourceClickReport: function(e) {
decorFloorReport: function(e) {
yas.report('YB_MAIN_EVENT', e.detail);
},
// 商品点击
productReport: function(params) {
const gender = this.data.gender;
const repParams = {
F_ID: '20180718',
F_NAME: 'shopGoods',
F_URL: `/pages/goodsDetail/goodsDetail?fromPage=home&productSkn=${params.detail.productSkn}`,
F_INDEX: this.data.decorFloors.length,
I_INDEX: params.detail.idx + '',
TAB_ID: this.data.order,
GENDER: gender ? (gender === '1,3' ? '1' : '2') : '0' // eslint-disable-line
};
yas.report('YB_MAIN_EVENT', repParams);
},
recordHeight: function() {
const query = wx.createSelectorQuery();
... ...
... ... @@ -17,7 +17,7 @@
<resources
floors="{{decorFloors}}"
floor-index="1"
bindclickreport="resourceClickReport">
bindclickreport="decorFloorReport">
</resources>
<view class="product-list">
<view class="header-filter {{floatFilter ? 'float' : ''}}">
... ... @@ -28,6 +28,7 @@
<view class="filter-stand-in" hidden="{{!floatFilter}}"></view>
<view class="list">
<product-list
bindproductclick="productReport"
list="{{shopProductList}}"
show-no-more="{{allLoaded}}"
show-loading="{{showLoading}}">
... ...