Authored by 陈轩

fix

... ... @@ -21,7 +21,6 @@ exports.index = (req, res) => {
/* 查询 产品列表 */
exports.fetchProducts = (req, res, next) => {
const params = {
uid: req.user.uid, // mock data
page: req.query.page || 1,
order: req.query.order || 1,
query: req.query.query
... ...
... ... @@ -3,7 +3,7 @@
<show-box :is-first="true">
<image-carousel :goods="entity.goodsList"></image-carousel>
<div class="title-box">
<h1>{{entity.productName}}</h1>
<h1 class="line-clamp-2">{{entity.productName}}</h1>
<i class="price" v-if="entity.productPriceBo.marketPrice > entity.productPriceBo.salesPrice"
:class="{'strike-through': entity.productPriceBo.salesPrice > 0}">{{entity.productPriceBo.formatMarketPrice}}</i>
... ... @@ -14,16 +14,14 @@
</div>
</show-box>
<show-box v-if="entity.brand">
<div class="brand">
<img :src="entity.brand.brandIco | resize 110 68" width="55" height="34"/>
<show-box class="brand" v-if="entity.brand">
<img :src="entity.brand.brandIco | resize 110 68"/>
<h2>{{entity.brand.brandName}}</h2>
<a :href="entity.brand.brandDomain | brandUrl">
进入店铺
<span class="icon icon-right"></span>
</a>
</div>
<h2>{{entity.brand.brandName}}</h2>
<a :href="entity.brand.brandDomain | brandUrl">
进入店铺
<span class="icon icon-right"></span>
</a>
</show-box>
<div class="separator" v-if="isApp"><span>继续拖动,查看商品信息</span>
... ... @@ -154,7 +152,7 @@
</ul>
</show-box>
<show-box :is-last="true">
<show-box class="product-detail-desc" :is-last="true">
<h2>商品详情</h2>
<i>DETAILS</i>
... ... @@ -201,33 +199,45 @@
background: #f6f6f6;
}
.show-box .brand {
max-height: 108px;
line-height: 48px;
.show-box.brand {
$lh: 68px;
overflow: hidden;
img {
vertical-align: middle;
height: 68px;
width: auto;
max-width: 110px;
float: left;
}
h2 {
display: inline-block;
font-size: 28px;
vertical-align: middle;
margin-left: 30px;
width: 50%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: $lh;
}
a {
float: right;
font-size: 28px;
line-height: $lh;
color: #b0b0b0;
}
}
.product-detail-desc {
/* 覆盖 img width,height 属性 */
img {
width: 100% !important;
height: auto !important;
}
}
.separator {
text-align: center;
color: #c4c4c4;
... ...
... ... @@ -13,8 +13,7 @@
word-wrap: break-word;
img {
max-width: 100%;
height: auto !important;
width: 100%;
}
p {
... ...
... ... @@ -31,7 +31,7 @@
el: '#product-list',
data: function() {
return {
sortName: locationQuery.sort_name,
sortName: locationQuery.title || locationQuery.sort_name, // 优先使用 title
orderConfig: [],
filterConfig: null,
... ... @@ -79,23 +79,23 @@
order: this.order,
page: nextPage
}, this.filter, locationQuery))
.done(res => {
if (res.code === 200) {
self.page = res.data.page;
self.totalPage = res.data.pageTotal;
self.$set('productList', self.productList.concat(res.data.productList));
if (!self.filterConfig) {
self.$set('filterConfig', res.data.filter);
.done(res => {
if (res.code === 200) {
self.page = res.data.page;
self.totalPage = res.data.pageTotal;
self.$set('productList', self.productList.concat(res.data.productList));
if (!self.filterConfig) {
self.$set('filterConfig', res.data.filter);
}
}
}
})
.fail(error => {
tip('网络出错~');
})
.always(() => {
self.inSearching = false;
});
})
.fail(error => {
tip('网络出错~');
})
.always(() => {
self.inSearching = false;
});
},
openFilter() {
... ...