|
|
<template>
|
|
|
<div>
|
|
|
<filter-box :val="order" :filter="filterConfig" v-if="enableOrder" :search-page="true"></filter-box>
|
|
|
<product-list :data="productList" :state="listState" class="list-items" @click-product="clickProduct"></product-list>
|
|
|
<product-list :data="productList" :state="listState" class="list-items"
|
|
|
@click-product="clickProduct" :report-page-name="pageName"
|
|
|
:report-page-param="query"></product-list>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import Vue from 'vue';
|
|
|
import _ from 'lodash';
|
|
|
import $ from 'jquery';
|
|
|
import lazyload from 'vue-lazyload';
|
|
|
import infinitScroll from 'vue-infinite-scroll';
|
...
|
...
|
@@ -37,7 +40,10 @@ |
|
|
inSearching: false,
|
|
|
enableOrder: false,
|
|
|
filterConfig: null,
|
|
|
filter: {}
|
|
|
filter: {},
|
|
|
|
|
|
// for yas report
|
|
|
pageName: 'h5FP_search',
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -89,7 +95,6 @@ |
|
|
|
|
|
this.inSearching = true;
|
|
|
|
|
|
|
|
|
return $.get(this.url, Object.assign({
|
|
|
order: this.order, // 排序 信息
|
|
|
query: this.query,
|
...
|
...
|
@@ -99,8 +104,14 @@ |
|
|
if (res.data) {
|
|
|
this.page = res.data.page;
|
|
|
this.totalPage = res.data.page_total;
|
|
|
this.productList = this.productList.concat(res.data.product_list);
|
|
|
|
|
|
// yas report param injection
|
|
|
_.each(res.data.product_list, item => {
|
|
|
item.from_page_name = this.pageName;
|
|
|
item.from_page_param = this.query;
|
|
|
});
|
|
|
|
|
|
this.productList = this.productList.concat(res.data.product_list);
|
|
|
if (!this.filterConfig) {
|
|
|
this.filterConfig = res.data.filter;
|
|
|
}
|
...
|
...
|
|