...
|
...
|
@@ -14,10 +14,10 @@ |
|
|
<div class="filter">
|
|
|
<div class="filter-tab">
|
|
|
<div class="tab-item" :class="{'selected-tab': queryOptions.sort==null}"
|
|
|
@click="handleSortChange({ type: 'tuijian', sort: null})"
|
|
|
@click.stop="handleSortChange({ type: 'tuijian', sort: null})"
|
|
|
>推荐</div>
|
|
|
<div class="tab-item middle"
|
|
|
@click="handleSortChange({ type: 'price', sort: null })"
|
|
|
@click.stop="handleSortChange({ type: 'price', sort: null })"
|
|
|
>
|
|
|
<span :class="{'selected-tab': queryOptions.sort!=null}">价格</span>
|
|
|
<div class="price-arrow"
|
...
|
...
|
@@ -29,7 +29,7 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
<div class="middle">
|
|
|
<div class="screen middle" @click="filterModalVisible=true">
|
|
|
<div class="screen middle" @click="handleSortChange({ type: 'shaixuan', sort: null});filterModalVisible=true">
|
|
|
<div class="screen-img"></div>
|
|
|
筛选
|
|
|
</div>
|
...
|
...
|
@@ -43,7 +43,7 @@ |
|
|
v-if="productList.length"
|
|
|
class="product-list"
|
|
|
>
|
|
|
<SecondList :list="productList"></SecondList>
|
|
|
<SecondList :list="productList" :yasParams="yasParams"></SecondList>
|
|
|
</LayoutScroll>
|
|
|
<!-- <EmptyList class="empty-wrapper product-list" :tip="`暂无数据`" v-show="productList.isEmpty" /> -->
|
|
|
</LayoutApp>
|
...
|
...
|
@@ -133,12 +133,11 @@ export default { |
|
|
queryOptions.sort = null
|
|
|
}
|
|
|
if (type==='price') {
|
|
|
queryOptions.sort = (queryOptions.sort===''||queryOptions.sort==='p_asc')?'p_desc':'p_asc'
|
|
|
|
|
|
// queryOptions.second_type = sort;
|
|
|
queryOptions.sort = (queryOptions.sort===null||queryOptions.sort==='p_asc')?'p_desc':'p_asc'
|
|
|
}
|
|
|
if (type==='shaixuan') {
|
|
|
if (type==='shaixuanConfirm') {
|
|
|
queryOptions.second_type = sort;
|
|
|
console.log(queryOptions.second_type);
|
|
|
}
|
|
|
|
|
|
this.$set(this.queryOptions, 'sort', queryOptions.sort);
|
...
|
...
|
@@ -153,29 +152,82 @@ export default { |
|
|
二手商品列表页-顶部TAB切换按钮点击
|
|
|
新增二手、全新瑕疵商品列表页TAB点击:
|
|
|
1.P_NAME:页面名称,XY_UFO...
|
|
|
2.TYPE_ID:列表页入口类型,1-搜索结果页,2-系列,3-品牌,4-商品池;
|
|
|
2.TYPE_ID:列表页入口类型,1-搜索结果页,2-系列,3-品牌,4-商品池 5-商品详情;
|
|
|
3.P_PARAM:条件值,搜索关键词,系列ID,品牌ID,商品池ID;
|
|
|
4.TAB_IreportYasD:tab切id,1-人气,2-价格,3-新品,4-筛选;5-推荐
|
|
|
4.TAB_ID: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,
|
|
|
// },
|
|
|
// }
|
|
|
// });
|
|
|
let yasParam = {
|
|
|
TAB_ID: null,
|
|
|
TAB_NAME: null,
|
|
|
}
|
|
|
switch (type) {
|
|
|
case 'price':
|
|
|
yasParam.TAB_ID = 2
|
|
|
yasParam.TAB_NAME = '价格'
|
|
|
break;
|
|
|
case 'shaixuan':
|
|
|
yasParam.TAB_ID = 4
|
|
|
yasParam.TAB_NAME = '筛选'
|
|
|
break;
|
|
|
default:
|
|
|
yasParam.TAB_ID = 5
|
|
|
yasParam.TAB_NAME = '推荐'
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
appop: 'XY_UFO_PRD_LIST_TAB_C',
|
|
|
param:{
|
|
|
P_NAME: `XY_UFO${this.$route.name}`,
|
|
|
TYPE_ID: 5,
|
|
|
P_PARAM: this.$route.query.pid,
|
|
|
...yasParam
|
|
|
},
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
handleFilterSubmit(selected) {
|
|
|
const { second_type } = selected;
|
|
|
// console.log('hooks@selected', selected);
|
|
|
this.handleSortChange({ type: 'shaixuan', sort: second_type })
|
|
|
|
|
|
/*
|
|
|
新增二手、全新瑕疵商品列表页筛选点击:
|
|
|
1.TYPE_ID:列表类型,1-搜索结果页,2-系列,3-品牌,4-商品池;5-商品详情;
|
|
|
2.P_PARAM:条件值,搜索关键词,系列ID,品牌ID,商品池ID;
|
|
|
3.TAB_ID:tab切id,1-人气,2-价格,3-新品 4-筛选;5-推荐;
|
|
|
4.TAB_NAME:tab切名称,人气,价格,新品;
|
|
|
5.ENT_PARAMS:选中条件的集合,包含ENT_KEY,ENT_ID两个参数;
|
|
|
6.ENT_NAME:筛选条件的名称
|
|
|
7.ENT_ID:筛选条件的值;
|
|
|
*/
|
|
|
|
|
|
let yasParam = {
|
|
|
P_NAME: `XY_UFO${this.$route.name}`,
|
|
|
TYPE_ID: 5,
|
|
|
P_PARAM: this.$route.query.pid,
|
|
|
TAB_ID: null,
|
|
|
TAB_NAME: null,
|
|
|
ENT_PARAMS: { 'second_type': second_type },
|
|
|
ENT_NAME: 'second_type',
|
|
|
ENT_ID: second_type,
|
|
|
}
|
|
|
|
|
|
if (this.queryOptions.sort===null) {
|
|
|
yasParam.TAB_ID = 5
|
|
|
yasParam.TAB_NAME = '推荐'
|
|
|
} else {
|
|
|
yasParam.TAB_ID = 2
|
|
|
yasParam.TAB_NAME = '价格'
|
|
|
}
|
|
|
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
appop: 'XY_UFO_PRD_LIST_SCREEN_C',
|
|
|
param: {...yasParam},
|
|
|
}
|
|
|
});
|
|
|
this.handleSortChange({ type: 'shaixuanConfirm', sort: second_type })
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -185,6 +237,38 @@ export default { |
|
|
...mapState('product', ["selectedProductInfo"]),
|
|
|
computePageTitle() {
|
|
|
return this.selectedProductInfo.product.product_name
|
|
|
},
|
|
|
yasParams() {
|
|
|
/*
|
|
|
1.P_NAME:页面名称,XY_UFO...
|
|
|
2.TYPE_ID:列表页入口类型,1-搜索结果页,2-系列,3-品牌,4-商品池;5-二手;
|
|
|
3.P_PARAM:列表入口页面参数,搜索关键词,系列ID,品牌ID,商品池ID;
|
|
|
4.TAB_ID:tab切id,2-价格,4-推荐;
|
|
|
5.TAB_NAME:tab切名称,价格,推荐;
|
|
|
6.I_INDEX:曝光顺序;
|
|
|
7.PRD_ID:商品id;
|
|
|
8.PRD_TYPE:1-二手,2-全新瑕疵;
|
|
|
*/
|
|
|
let _yasParams = {
|
|
|
P_NAME: `XY_UFO${this.$route.name}`,
|
|
|
TYPE_ID: 5,
|
|
|
P_PARAM: null,
|
|
|
TAB_ID: null,
|
|
|
TAB_NAME: null,
|
|
|
I_INDEX: null,
|
|
|
PRD_ID: this.$route.query.pid,
|
|
|
PRD_TYPE: this.queryOptions.second_type===5 ? 2 : 1
|
|
|
}
|
|
|
|
|
|
if (this.queryOptions.sort===null) {
|
|
|
_yasParams.TAB_ID = 5
|
|
|
_yasParams.TAB_NAME = '推荐'
|
|
|
} else {
|
|
|
_yasParams.TAB_ID = 2
|
|
|
_yasParams.TAB_NAME = '价格'
|
|
|
}
|
|
|
|
|
|
return _yasParams;
|
|
|
}
|
|
|
},
|
|
|
watch: {},
|
...
|
...
|
|