Authored by huzhiming

feat(second): 添加详情页部分数据埋点 reviewed by tao.huang

... ... @@ -119,7 +119,6 @@ export default {
name: 'Filtrate',
components: {},
props: {
yasParams: Object,
storage_id: Number,
visible: false
},
... ...
... ... @@ -8,12 +8,12 @@
* @path: 页面访问路径及参数说明 http://m.yohobuy.com:6001/xianyu/second/product/商品id.html
!-->
<template>
<LayoutApp :show-back="true" title="商品详情">
<LayoutApp :show-back="true" title="商品详情" class="second-detail-wrap">
<LayoutScroll
ref="pageScroll"
class="second-detail-wrap"
@scroll-end="''">
<cube-slide ref="slide" v-if="info.imageList" :options="slideOptions" :data="info.imageList" :loop='false'>
@scroll-end="false"
:loading="{hide: true, noMore: true}">
<cube-slide ref="slide" v-if="info.imageList" :options="slideOptions" :data="info.imageList">
<cube-slide-item v-for="(item, index) in info.imageList" :key="index">
<image-format
:lazy="false"
... ... @@ -110,15 +110,35 @@ export default {
}
},
created() {},
mounted() {
// console.log('mounted', this.info);
},
mounted() {},
activated() {
if (this.$refs.pageScroll) {
this.$refs.pageScroll.scrollTop = 0;
}
// console.log('mounted', this.info);
this.fetchDetailById({ skup: this.skup })
this.refresh();
/*
[二手商品详情页打开时]
1.FP_NAME:来源页面名称;eg:XY_UFO...
2.FP_PARAM:来源页面参数;搜索关键词,系列ID,品牌ID,商品池ID;
3.TAB_ID:tab切id,1-人气,2-价格,3-新品;
4.TAB_NAME:tab切名称,人气,价格,新品;
5.PRD_ID:商品id;
6.PRD_TYPE:1-二手,2-全新瑕疵;
*/
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_UFO_PRD_DT_INFO',
param:{
FP_NAME: `XY_UFO${this.$route.name}`,
FP_PARAM: this.skup,
TAB_ID: '',
TAB_NAME: '',
PRD_ID: this.$route.query.pid,
PRD_TYPE: this.info.describeInfo
}
}
});
},
deactivated() {},
// beforeRouteEnter (to, from, next) {},
... ... @@ -134,6 +154,27 @@ export default {
// 购买
buy() {
/*
新增二手商品订单:二手商品详情页-购买按钮点击
1.P_NAME:页面名称;
2.PRD_ID:商品ID;
3.PRD_SKU:商品SKU;
4.PRD_SIZE:尺码;
5.ORD_TYPE:订单类型;1-出售,2-购买,3-求购,4-变现;5-二手;6-全新瑕疵;
*/
const { sizeName, describeInfo } = this.info;
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_UFO_PRD_DT_BUY_SEL_C',
param:{
P_NAME: `XY_UFO${this.$route.name}`,
PRD_ID: this.$route.query.pid,
PRD_SIZE: this.info.sizeName,
ORD_TYPE: this.info.describeInfo
}
}
});
this.$router.push({
name: 'OrderBuyConfirm',
query: {
... ... @@ -161,7 +202,10 @@ export default {
<style rel='stylesheet/scss' lang='scss' scoped>
@import '@/pages/product/product-detail.scss';
.second-detail-wrap {
padding-bottom: 120px;
display: flex;
}
/deep/ .layout-context {
margin-bottom: 130px;
}
.ellipsis {
... ... @@ -173,6 +217,8 @@ export default {
/* banner */
.cube-slide {
height: 396px;
max-height: 396px;
/deep/ .cube-slide-dots {
padding: 0;
}
... ... @@ -180,6 +226,8 @@ export default {
img {
display: flex;
height: 375px;
min-height: 375px;
max-height: 375px;
margin: 0 auto;
max-width: max-content;
}
... ... @@ -250,7 +298,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 40px 40px;
margin: 0 40px 0;
border: 1px solid #f2f2f2;
border-radius: 4px;
.image {
... ... @@ -288,11 +336,12 @@ export default {
bottom: 0;
display: flex;
width: 100%;
height: 120px;
height: 112px;
padding: 16px 30px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.08);
text-align: center;
background: #fff;
z-index: 5;
@include cube-ufo-btn;
.price {
... ...
... ... @@ -50,7 +50,6 @@
<FilterList
:visible.sync="filterModalVisible"
:storage_id="storage_id"
:yasParams="{P_NAME: 'XY_UFOSearchList', TYPE_ID: 1}"
@submit="handleFilterSubmit"
></FilterList>
</section>
... ... @@ -135,9 +134,10 @@ export default {
}
if (type==='price') {
queryOptions.sort = (queryOptions.sort===''||queryOptions.sort==='p_asc')?'p_desc':'p_asc'
// queryOptions.second_type = sort;
}
if (type==='second_type') {
if (type==='shaixuan') {
queryOptions.second_type = sort;
}
... ... @@ -148,12 +148,35 @@ export default {
second_type: queryOptions.second_type,
sort: queryOptions.sort
});
/*
二手商品列表页-顶部TAB切换按钮点击
新增二手、全新瑕疵商品列表页TAB点击:
1.P_NAME:页面名称,XY_UFO...
2.TYPE_ID:列表页入口类型,1-搜索结果页,2-系列,3-品牌,4-商品池;
3.P_PARAM:条件值,搜索关键词,系列ID,品牌ID,商品池ID;
4.TAB_IreportYasD:tab切id,1-人气,2-价格,3-新品,4-筛选;5-推荐
5.TAB_NAME:tab切名称,人气,价格,新品,筛选;推荐
*/
// TODO:zhiming 调整数据上报传参,与徐兰沟通
// this.$store.dispatch('reportYas', {
// params: {
// appop: 'XY_UFO_PRD_LIST_TAB_C',
// param:{
// P_NAME: `XY_UFO${this.$route.name}`,
// TYPE_ID: '商品详情页选尺码进二手',
// P_PARAM: `second_type=${queryOptions.second_type},sort=${queryOptions.sort},storage_id=${this.storage_id},productId=${this.$route.query.pid}`,
// TAB_ID: type,
// TAB_NAME: type,
// },
// }
// });
},
handleFilterSubmit(selected) {
const { second_type } = selected;
// console.log('hooks@selected', selected);
this.handleSortChange({ type: 'second_type', sort: second_type })
}
this.handleSortChange({ type: 'shaixuan', sort: second_type })
},
},
computed: {
...mapState('second', ["productList", "isMore"]),
... ...
... ... @@ -39,8 +39,8 @@ export default {
...item,
secondhand_image: item.image,
skup_price: item.price,
pre_sale_flag: item.status,
size_name: item.sizeName
sechondHandTypeName: item.sechondHandTypeName,
size_name: item.sizeName.replace('码', '')
}));
if (isReset) {
... ...