|
|
<template>
|
|
|
<shop-top v-bind:shop-info="shopInfo"></shop-top>
|
|
|
<goods-list v-bind:data="productList"></goods-list>
|
|
|
<div v-bind:class='{"shop-goods-top": !shopInfo.isBlkShop}'>
|
|
|
<goods-list v-bind:data="productList"></goods-list>
|
|
|
</div>
|
|
|
<filter :config="filterConfig" v-ref:filter></filter>
|
|
|
<top-bar v-bind:share-data="shareData"></top-bar>
|
|
|
</template>
|
|
|
|
|
|
<style>
|
|
|
.shop-goods-top {
|
|
|
margin-top: 140px;
|
|
|
}
|
|
|
</style>
|
|
|
<script>
|
|
|
const $ = require('yoho-jquery');
|
|
|
const qs = require('yoho-qs');
|
|
|
const qs = require('yoho-qs/parse');
|
|
|
const bus = require('common/vue-bus');
|
|
|
const tip = require('common/tip');
|
|
|
|
...
|
...
|
@@ -24,7 +30,6 @@ |
|
|
module.exports = {
|
|
|
data() {
|
|
|
return {
|
|
|
domain: qs.domain,
|
|
|
shareData: {}, // 分享相关数据
|
|
|
shopInfo: {}, // 店铺介绍相关数据
|
|
|
|
...
|
...
|
@@ -34,9 +39,7 @@ |
|
|
// query
|
|
|
url: '/product/shop/goods.json',
|
|
|
sort: '',
|
|
|
filter: {
|
|
|
domain: qs.domain
|
|
|
},
|
|
|
filter: {},
|
|
|
page: 0, // page= 0 未搜索, 1 并且productList.length =0 没有数据, page = page_total 全部加载完
|
|
|
totalPage: 3,
|
|
|
|
...
|
...
|
@@ -64,7 +67,7 @@ |
|
|
$.get({
|
|
|
url: '/product/shop/info.json',
|
|
|
data: {
|
|
|
domain: this.domain
|
|
|
domain: locationQuery.domain
|
|
|
}
|
|
|
}).done(result => {
|
|
|
if (result) {
|
...
|
...
|
@@ -134,7 +137,7 @@ |
|
|
},
|
|
|
created() {
|
|
|
const self = this;
|
|
|
|
|
|
|
|
|
this.getShopInfo();
|
|
|
this.search();
|
|
|
bus.$on('list.paging', () => {
|
...
|
...
|
@@ -155,7 +158,6 @@ |
|
|
* 2. 关闭 filter 组件
|
|
|
*/
|
|
|
bus.$on('filter.change', function({val}) {
|
|
|
console.log(val);
|
|
|
let filter = {};
|
|
|
|
|
|
$.each(val, (type, item) => {
|
...
|
...
|
|