Authored by 郭成尧

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

... ... @@ -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
... ...
... ... @@ -92,8 +92,11 @@ if (isProduction) {
Object.assign(module.exports, {
appName: 'm.yohoblk.com for test',
domains: {
api: 'http://api-test1.yohops.com:9999/',
service: 'http://service-test1.yohops.com:9999/'
api: 'http://dev-api.yohops.com:9999/',
service: 'http://dev-service.yohops.com:9999/'
// api: 'http://api-test1.yohops.com:9999/',
// service: 'http://service-test1.yohops.com:9999/'
},
memcache: {
master: ['127.0.0.1:12111'],
... ...
... ... @@ -41,16 +41,16 @@
"winston": "^2.2.0",
"winston-daily-rotate-file": "^1.1.4",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "0.0.31"
"yoho-node-lib": "0.0.34"
},
"devDependencies": {
"autoprefixer": "^6.3.7",
"autoprefixer": "^6.4.0",
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-plugin-transform-runtime": "^6.12.0",
"babel-preset-es2015": "^6.9.0",
"babel-runtime": "^6.11.6",
"eslint": "^3.2.0",
"eslint": "^3.2.2",
"eslint-config-yoho": "^1.0.1",
"eslint-plugin-html": "^1.5.1",
"extract-text-webpack-plugin": "^1.0.1",
... ...
... ... @@ -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() {
... ...