Authored by 陈轩

save

... ... @@ -307,7 +307,7 @@ const shop = {
* 红人店铺
*/
redShop(req, res, next) {
let shopId = 40; // test
let shopId = 34; // test
Promise.all([
redsShopModel.getBanner(shopId), // 0: 获取红人店 banner
... ... @@ -316,7 +316,8 @@ const shop = {
redsShopModel.getShopsdecorator(shopId) // 3. 获取店铺装修元素
]).then(valArr => {
let banner = _.get(valArr[0], 'data.banner');
let brandsData = valArr[1];
let brand = _.get(valArr[1], 'data[0]', {});
let introData = valArr[2];
let decoratorsData = valArr[3];
... ... @@ -326,7 +327,8 @@ const shop = {
localCss: true,
module: 'product',
page: 'reds-shop',
banner, brandsData, introData, decoratorsData,
shopId,
banner, brand, introData, decoratorsData,
time3: [0, 1, 2]
});
});
... ...
... ... @@ -14,7 +14,8 @@ const api = global.yoho.API;
*/
exports.getBanner = shopId => {
let params = {
method: 'app.popular.shop.banner',
// method: 'app.popular.shop.banner',
method: 'app.shop.banner', //TODO: this is mock api,use up
shop_id: shopId,
app_type: 0 // 0 有货 1 blk
};
... ... @@ -43,7 +44,8 @@ exports.getShopsBrands = shopId => {
*/
exports.getIntro = shopId => {
let params = {
method: 'app.popular.shops.getIntro',
// method: 'app.popular.shops.getIntro',
method: 'app.shops.getIntro',
shop_id: shopId,
app_type: 0
};
... ...
{{!--
desc: 红人店铺
--}}
<input type="hidden" name="shop-id" class="shop-id" value="{{shopId}}">
<div class="reds-shop">
{{!--shop-header--}}
<div class="shop-header">
<img class="banner" {{#if banner}} src="{{banner}}"{{/if}} alt="banner">
<div class="shop-header brand-header" data-id="{{brand.brand_id}}">
<img class="banner" {{#if banner}} src="{{image banner 750 234}}"{{/if}} alt="banner">
<div class="shop-info">
<img class="logo" src="//img10.static.yhbimg.com/yhb-img01/2016/03/24/15/01ef24d3ec4caabd8c416901cdf4739917.jpg?imageMogr2/thumbnail/500x500/extent/500x500/background/d2hpdGU=/position/center/quality/60" alt="logo">
<img class="logo" src="{{image brand.brand_ico 120 120}}" alt="logo">
<div class="shop-info-base">
<h1 class="shopname">vans</h1>
<h1 class="shopname">{{brand.brand_name}}</h1>
<div class="favs">粉丝数: 534 <i class="iconfont favs-btn like">&#xe605;</i></div>
</div>
<div class="shop-intro">
... ... @@ -30,7 +32,8 @@
{{!--shop-tab: 红人首页--}}
<div class="">
<div class="shop-coupon coupon-content">
<div class="shop-coupon coupon-group"></div>
{{!--<div class="shop-coupon coupon-content">
{{#each time3}}
<div class="coupon-small">
<div class="coupon-left">
... ... @@ -47,7 +50,7 @@
</div>
</div>
{{/each}}
</div>
</div>--}}
<div class="shop-swiper">
</div>
... ...
require('product/shop/redshop.page.css');
require('./shop/coupon');
... ...
... ... @@ -24,12 +24,11 @@
}
.shop-coupon {
padding-right: 30px;
// padding-right: 30px;
background-color: #f0f0f0;
white-space: nowrap;
overflow-x: auto;
// white-space: nowrap;
.coupon-small {
/*.coupon-small {
float: none;
display: inline-block !important;
white-space: normal;
... ... @@ -37,7 +36,7 @@
&::-webkit-scrollbar {
display: none;
}
}*/
}
.shop-swiper {
... ...