Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -3,7 +3,10 @@
|Name | Path| Note|
|首页| /|
|侧边栏| /sidebar| 只有 app 使用|
|品牌列表| /brand-list| |
|品牌店铺| /product/brand?domain=colormad| |
|品牌列表| /brands| |
|品类| /cate| |
|全部分类| /cate-all| |
|品牌店铺| /product/shop?domain=sctest1| |
|品牌店铺分享页面| /product/brand-share?domain=colormad| |
|商品详情| /product/{productId}| |
|资讯列表| /news| |
... ...
... ... @@ -17,11 +17,11 @@ router.get('/', channel.index); // 首页
router.get('/channel/channel.json', channel.channel); // 查询所有频道
router.get('/channel/resources.json', channel.resources); // 资源位接口
router.get('/channel/goods.json', channel.goods); // 首页查询商品列表
router.get('/brand-list', brand.brandList); // 品牌列表页
router.get('/brands', brand.brandList); // 品牌列表页
router.get('/get-brand-list', brand.getBrandList); // 获取品牌列表数据
router.get('/cate-resource', brand.cateResource); // 品类资源位页面
router.get('/cate', brand.cate); // 全部分类
router.get('/cate', brand.cateResource); // 品类资源位页面
router.get('/cate-all', brand.cate); // 全部分类
router.get('/get-cate-list', brand.getCateList); // 全部分类数据列表
router.get('/sidebar', channel.sidebar); // 资源位接口
... ...
... ... @@ -10,7 +10,7 @@
// const helpers = global.yoho.helpers;
const serviceAPI = global.yoho.ServiceAPI;
const URI_PACKAGE_ARTICLE = 'guang/service/v2/article/';
const co = require('co');
const Prmoise = require('bluebird');
const camelCase = global.yoho.camelCase;
/**
... ... @@ -18,7 +18,7 @@ const camelCase = global.yoho.camelCase;
*/
const model = {
index(params) {
return co(function*() {
return Prmoise.coroutine(function*() {
const article = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticle', params);
const content = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticleContent', params);
const brands = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getBrand', params);
... ... @@ -29,7 +29,7 @@ const model = {
}, params));
return camelCase([article, content, brands, other]);
});
})();
}
};
... ...
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/7/27
* Time: 10:11
*/
'use strict';
... ...
<div class="index">
<div id="index">
<index-box></index-box>
</div>
... ...
... ... @@ -53,34 +53,26 @@ const getShopData = params => {
isFav: subResult[0].data.is_favorite === 'Y'
});
/* TODO shop_template_type 待接口确认 */
if (subResult[0].data.shop_template_type === '3') {
/* 取资源位店铺背景图 */
return api.all([
shopApi.getShopsDecoratorList({shopId: result[0].data.shop_id})
]).then(thResult => {
if (thResult.code === 200) {
_.forEach(thResult[0].data.list, value => {
/* TODO resource_name 待接口确认 */
if (value.resource_name === 'shopTopBanner_BLK') {
Object.assign(finalResult, {
brandBg: value.resource_data.shopSrc
});
}
});
} else {
logger.info('getShopsDecoratorList api code no 200');
}
return finalResult;
});
} else {
logger.info('no BLK template resource');
}
/* 取资源位店铺背景图 */
return api.all([
shopApi.getShopsDecoratorList({shopId: result[0].data.shop_id})
]).then(thResult => {
if (thResult.code === 200) {
_.forEach(thResult[0].data.list, value => {
if (value.resource_name === 'shopTopBanner_app') {
Object.assign(finalResult, {
brandBg: value.resource_data.shopSrc
});
}
});
} else {
logger.info('getShopsDecoratorList api code no 200');
}
return finalResult;
});
} else {
logger.error('getShopInfoData api code no 200');
}
... ...
No preview for this file type
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<metadata>
Created by FontForge 20120731 at Wed Jul 27 10:16:29 2016
By admin
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="896" descent="-128" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="0" d="" />
<glyph unicode="&#xe600;" glyph-name="delete" d="M911 725h-242v123q0 21-13.5 34.5t-34.5 13.5h-246q-20 0-33.5-13.5t-13.5-34.5v-123h-246q-21 0-34.5-13.5t-13.5-34 13.5-34 34.5-13.5h829q21 0 34.5 13.5t13.5 34-13.5 34-34.5 13.5zM423 725v72h147v-72h-147zM765 579q-21 0-34.5-14t-13.5-34v-560h-441v560q0 20-13.5 34t-34 14-34-14-13.5-34v-611q0-21 13.5-34.5t34.5-13.5h536q20 0 33.5 13.5t13.5 34.5v611q3 20-11.5 34t-35.5 14zM447 67v389q0 20-13.5 33.5t-34 13.5-34-13.5-13.5-33.5v-389q0-21 13.5-34.5t34-13.5 34 13.5 13.5 34.5zM645 67v389q0 20-13.5 33.5t-34.5 13.5q-20 0-35.5-13.5t-15.5-33.5v-389q0-21 13.5-34.5t34.5-13.5 36 13.5 15 34.5z" />
<glyph unicode="&#xe601;" glyph-name="bag" d="M512 812q43 0 82.5-17t68-45.5 45.5-68 17-82.5v-43h171v-640q0-53-37.5-90.5t-90.5-37.5h-512q-53 0-90.5 37.5t-37.5 90.5v640h171v43q0 43 17 82.5t45.5 68 68 45.5 82.5 17zM811-84v555h-598v-555q0-18 12.5-30.5t30.5-12.5h512q18 0 30.5 12.5t12.5 30.5zM512 727q-53 0-90.5-37.5t-37.5-90.5v-43h256v43q0 53-37.5 90.5t-90.5 37.5z" />
<glyph unicode="&#xe602;" glyph-name="down" d="M516 256l409 404q2 1 6 6t7 8 8 7 9 5.5 8.5 2 8.5-2.5l38-21q7-7 7.5-17.5t-6.5-17.5l-476-471q-7-8-17.5-8t-17.5 7zM531 158q-8-7-18.5-7t-17.5 8l-475 471q-7 7-7 17.5t7 17.5l38 21q4 3 8.5 2.5t8.5-2 9-5.5 8-7 7-8 6-6l415-407z" />
<glyph unicode="&#xe603;" glyph-name="check" d="M998.5 724.5q-12.5 11.5-29.5 11t-29-12.5l-552-588-302 297q-12 12-29.5 12t-29.5-12.5-12-29.5 13-29l332-327v-1q2-1 9-5 1-1 2.5-2t2.5-1q7-3 15-3t16 3q1 1 3 2l1 1q7 5 9 6l1 1 581 619q12 13 11.5 30t-13 28.5z" />
<glyph unicode="&#xe604;" glyph-name="love" d="M887 653q-19 24-31 33l-8 8q-53 51-126 51-103 0-211-106-107 106-210 106-74 0-126-51l-5-4-3-4q-12-9-31-33-74-93-60-191 7-48 33.5-98.5t61.5-92 80-82.5 84-70 77.5-54.5 57.5-36.5 28-15l13-7 14 7q8 4 27 15t58 36.5 78 54.5 84 70 80 82.5 61.5 92 33.5 98.5q14 98-60 191zM893 470q-7-52-43.5-109t-81.5-101-100-86.5-91.5-66-65.5-38.5q-28 15-64.5 38.5t-92 66-100 86.5-81 101-43.5 109q-13 92 75 176 4 5 11.5 12.5t32 20 52.5 12.5q87 0 189-111l21-23 22 23q102 111 189 111 27 0 52-12.5t32.5-20 11.5-12.5q88-84 75-176z" />
<glyph unicode="&#xe605;" glyph-name="close" d="M512 415l360 360 45-45-360-360 360-359-45-45-360 359-360-359-45 45 360 359-360 360 45 45z" />
<glyph unicode="&#xe606;" glyph-name="left" d="M245 384l-9 9 472 472 80-80-400-401 400-401-80-80-472 472z" />
<glyph unicode="&#xe607;" glyph-name="right" d="M785 384l13 13-488 487-84-84 416-416-416-416 84-84 488 487z" />
<glyph unicode="&#xe608;" glyph-name="search" d="M682 74q-108-89-249-89-107 0-197.5 53t-143.5 143.5-53 197.5 53 197.5 143.5 143.5 197.5 53 197.5-53 143.5-143.5 53-197.5q0-141-89-249l286-286-56-56zM433.5 64q130.5 0 222.5 92t92 222.5-92 223-222.5 92.5-223-92.5-92.5-223 92.5-222.5 223-92z" />
<glyph unicode="&#xe609;" glyph-name="love-solid" d="M513 17q-15 0-121 93t-168 161q-37 40-64 95.5t-27 99.5q0 97 61.5 166.5t149.5 69.5q49 0 93-34.5t76-86.5q31 52 75 86.5t93 34.5q88 0 150-69.5t62-166.5q0-47-27-104t-65-92q-20-18-61.5-57t-74-68.5-67-61-57-49-28.5-17.5z" />
<glyph unicode="&#xe60a;" glyph-name="yoho-share" horiz-adv-x="1463" d="M798-160q0-46 25-58t61 16l537 420q36 28 36 68t-36 68l-537 424q-36 29-61 16.5t-25-57.5v-238q-138 0-252.5-24.5t-192-63-137.5-94-94.5-109.5-57.5-117-31.5-109.5-11-94-1.5-63.5 2-25q47 62 87 104t90 78 103.5 57.5 127 36.5 161.5 21 207 6v-262z" />
<glyph unicode="&#xe60b;" glyph-name="filter" d="M150.5 805q23.5 0 40-16.5t16.5-40-16.5-40.5-40-17-40.5 17-17 40.5 17 40 40.5 16.5zM150 600q49 0 87.5 28.5t53.5 74.5h731v91h-731q-15 45-53.5 73.5t-87.5 28.5q-61 0-104.5-43.5t-43.5-104.5 43.5-104.5 104.5-43.5zM723 327q-23 0-40 16.5t-17 40.5 17 40.5 40.5 16.5 40-16.5 16.5-40.5-16.5-40.5-40.5-16.5zM864 430q-15 45-53.5 73.5t-87 28.5-87.5-28.5-53-73.5h-583v-92h583q14-45 53-73.5t87.5-28.5 87 28.5 53.5 73.5h160v92h-160zM150.5-37q-23.5 0-40.5 16.5t-17 40 17 40.5 40.5 17 40-17 16.5-40.5-16.5-40-40-16.5zM150 168q-61 0-104.5-43.5t-43.5-104.5 43.5-104.5 104.5-43.5q49 0 87.5 28.5t53.5 73.5h731v91h-731q-15 46-53.5 74.5t-87.5 28.5z" />
<glyph unicode="&#xe60c;" glyph-name="focus" horiz-adv-x="1122" d="M793 798q92 0 150.5-65t58.5-161q0-82-54-145l-398-413-399 413q-53 63-53 145 0 96 58 161t150 65q43 0 90-22t79-52 53.5-58.5 21.5-42.5q0 14 21 42.5t53.5 58.5 79 52 89.5 22zM793 896q-63 0-127-30t-116-78q-53 48-117 78t-127 30q-131 0-218.5-92.5t-87.5-231.5q0-118 76-208l5-5 398-413 71-73 70 73 398 413 3 2 2 3q76 90 76 208 0 139-87.5 231.5t-218.5 92.5z" />
<glyph unicode="&#xe60d;" glyph-name="focused" horiz-adv-x="1122" d="M793 896q-63 0-127-30t-116-78q-53 48-117 78t-127 30q-131 0-218.5-92.5t-87.5-231.5q0-118 76-208l5-5 398-413 71-73 70 73 398 413 3 2 2 3q76 90 76 208 0 139-87.5 231.5t-218.5 92.5z" />
<glyph unicode="&#xe60e;" glyph-name="share" horiz-adv-x="1321" d="M1297 366l-597 530v-328q-448-11-616-283-87-142-84-319 1-32 2-32 65 82 120.5 129.5t135.5 82 183 47.5 259 15v-328z" />
<glyph unicode="&#xe617;" glyph-name="up" d="M24 94l22-22q9-10 22-10t23 10l424 430 420-426q9-9 21.5-9t21.5 9l22 22q9 9 9 22t-9 23l-458 464q-5 5-12 7-9 7-20.5 6t-20.5-9l-465-472q-9-9-9-22t9-23z" />
<glyph unicode="&#xe900;" glyph-name="notdef" horiz-adv-x="374" d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
<glyph unicode="&#xe901;" glyph-name="wait-cargo" horiz-adv-x="1067" d="M992.619 896h-910.891l-81.088-460.587-0.64-563.413h1062.784v556.011l-70.165 467.989zM919.211 810.667l51.52-341.333h-292.629l-7.531-33.28c-13.76-61.013-71.403-105.301-137.024-105.301-65.429 0-123.029 44.117-136.96 104.917l-7.595 33.131h-295.829l60.181 341.867h765.867zM85.333-42.667v426.133h238.613c33.685-81.685 116.864-138.048 209.6-138.048 93.035 0 176.277 56.576 209.792 138.581h234.112v-426.667h-892.117z" />
<glyph unicode="&#xe902;" glyph-name="wait-pay" horiz-adv-x="1003" d="M794.122 666.122v229.878h-794.122v-1024h1003.102v794.122h-208.98zM83.592 812.408h626.939v-146.286h-626.939v146.286zM83.592 582.531h835.918v-626.939h-835.918v626.939zM167.184 457.143h668.735v-83.592h-668.735v83.592zM752.327 122.776h83.592v-83.592h-83.592v83.592z" />
<glyph unicode="&#xe903;" glyph-name="send-cargo" horiz-adv-x="1045" d="M1043.101 896h-1024v-397.061h83.592v-626.939h856.816v626.939h83.592v397.061zM186.284 498.939h689.633v-543.347h-689.633v543.347zM102.693 812.408h856.816v-229.878h-856.816v229.878zM374.366 373.551h313.469v-83.592h-313.469v83.592z" />
<glyph unicode="&#xe904;" glyph-name="refund-exchange" horiz-adv-x="1208" d="M1062.994 173.281c87.388 186.573 52.531 411.873-100.25 564.675-156.303 156.303-392.52 192.041-587.735 88.924l38.236-72.438c163.287 86.2 360.837 56.3 491.581-74.404 127.713-127.754 156.938-316.068 83.988-472.044l-141.947 66.437 96.154-265.298 265.298 96.154-145.326 67.994zM314.798 84.234c-127.734 127.734-156.959 316.047-84.009 472.023l141.967-66.437-96.174 265.298-265.298-96.154 145.306-67.994c-87.388-186.573-52.511-411.873 100.291-564.654 96.768-96.788 224.133-147.354 353.505-147.333 79.544 0 159.867 19.128 234.209 58.388l-38.236 72.438c-163.287-86.18-360.817-56.32-491.561 74.424z" />
<glyph unicode="&#xe905;" glyph-name="sort-asc" horiz-adv-x="585" d="M585.143 475.428q0-14.857-10.857-25.714t-25.714-10.857h-512q-14.857 0-25.714 10.857t-10.857 25.714 10.857 25.714l256 256q10.857 10.857 25.714 10.857t25.714-10.857l256-256q10.857-10.857 10.857-25.714z" />
<glyph unicode="&#xe906;" glyph-name="sort-desc" horiz-adv-x="585" d="M585.143 256q0-14.857-10.857-25.714l-256-256q-10.857-10.857-25.714-10.857t-25.714 10.857l-256 256q-10.857 10.857-10.857 25.714t10.857 25.714 25.714 10.857h512q14.857 0 25.714-10.857t10.857-25.714z" />
<glyph unicode="&#xe908;" glyph-name="x" horiz-adv-x="1001" d="M281 543q-27-1-53-1h-83q-18 0-36.5-6t-32.5-18.5-23-32-9-45.5v-76h912v41q0 16-0.5 30t-0.5 18q0 13-5 29t-17 29.5-31.5 22.5-49.5 9h-133v-97h-438v97zM955 310v-52q0-23 0.5-52t0.5-58-10.5-47.5-26-30-33-16-31.5-4.5q-14-1-29.5-0.5t-29.5 0.5h-32l-45 128h-439l-44-128h-63q-20 0-45 1-25 0-41 9.5t-25.5 23-13.5 29.5-4 30v167h911zM163 247q-12 0-21-8.5t-9-21.5 9-21.5 21-8.5q13 0 22 8.5t9 21.5-9 21.5-22 8.5zM316 123q-8-26-14-48-5-19-10.5-37t-7.5-25-3-15 1-14.5 9.5-10.5 21.5-4h365q23 0 34 12t2 38q-5 13-9.5 30.5t-9.5 34.5q-5 19-11 39h-368zM336 498v228q0 11 2.5 23t10 21.5 20.5 15.5 34 6h188q31 0 51.5-14.5t20.5-52.5v-227h-327z" />
</font></defs></svg>
\ No newline at end of file
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
panose-1="2 0 6 3 0 0 0 0 0 0"
ascent="896"
descent="-128"
x-height="792"
bbox="-0.75 -221.6 1457 896"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E617"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
<glyph glyph-name=".notdef" horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
<glyph glyph-name=".null" horiz-adv-x="0"
/>
<glyph glyph-name="nonmarkingreturn" horiz-adv-x="341"
/>
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
<glyph glyph-name="uniE600" unicode="&#xe600;"
d="M911 725h-242v123q0 21 -13.5 34.5t-34.5 13.5h-246q-20 0 -33.5 -13.5t-13.5 -34.5v-123h-246q-21 0 -34.5 -13.5t-13.5 -34t13.5 -34t34.5 -13.5h829q21 0 34.5 13.5t13.5 34t-13.5 34t-34.5 13.5zM423 725v72h147v-72h-147zM765 579q-21 0 -34.5 -14t-13.5 -34v-560
h-441v560q0 20 -13.5 34t-34 14t-34 -14t-13.5 -34v-611q0 -21 13.5 -34.5t34.5 -13.5h536q20 0 33.5 13.5t13.5 34.5v611q3 20 -11.5 34t-35.5 14zM447 67v389q0 20 -13.5 33.5t-34 13.5t-34 -13.5t-13.5 -33.5v-389q0 -21 13.5 -34.5t34 -13.5t34 13.5t13.5 34.5zM645 67
v389q0 20 -13.5 33.5t-34.5 13.5q-20 0 -35.5 -13.5t-15.5 -33.5v-389q0 -21 13.5 -34.5t34.5 -13.5t36 13.5t15 34.5z" />
<glyph glyph-name="uniE601" unicode="&#xe601;"
d="M512 812q43 0 82.5 -17t68 -45.5t45.5 -68t17 -82.5v-43h171v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-512q-53 0 -90.5 37.5t-37.5 90.5v640h171v43q0 43 17 82.5t45.5 68t68 45.5t82.5 17zM811 -84v555h-598v-555q0 -18 12.5 -30.5t30.5 -12.5h512q18 0 30.5 12.5
t12.5 30.5zM512 727q-53 0 -90.5 -37.5t-37.5 -90.5v-43h256v43q0 53 -37.5 90.5t-90.5 37.5z" />
<glyph glyph-name="uniE602" unicode="&#xe602;"
d="M516 256l409 404q2 1 6 6t7 8t8 7t9 5.5t8.5 2t8.5 -2.5l38 -21q7 -7 7.5 -17.5t-6.5 -17.5l-476 -471q-7 -8 -17.5 -8t-17.5 7zM86 669zM531 158q-8 -7 -18.5 -7t-17.5 8l-475 471q-7 7 -7 17.5t7 17.5l38 21q4 3 8.5 2.5t8.5 -2t9 -5.5t8 -7t7 -8t6 -6l415 -407z
M945 669z" />
<glyph glyph-name="uniE603" unicode="&#xe603;"
d="M998.5 724.5q-12.5 11.5 -29.5 11t-29 -12.5l-552 -588l-302 297q-12 12 -29.5 12t-29.5 -12.5t-12 -29.5t13 -29l332 -327v-1q2 -1 9 -5q1 -1 2.5 -2t2.5 -1q7 -3 15 -3t16 3q1 1 3 2l1 1q7 5 9 6l1 1l581 619q12 13 11.5 30t-13 28.5z" />
<glyph glyph-name="uniE604" unicode="&#xe604;"
d="M887 653q-19 24 -31 33l-4 4l-4 4q-53 51 -126 51q-103 0 -211 -106q-107 106 -210 106q-74 0 -126 -51l-5 -4l-3 -4q-12 -9 -31 -33q-74 -93 -60 -191q7 -48 33.5 -98.5t61.5 -92t80 -82.5t84 -70t77.5 -54.5t57.5 -36.5t28 -15l13 -7l14 7q8 4 27 15t58 36.5t78 54.5
t84 70t80 82.5t61.5 92t33.5 98.5q14 98 -60 191zM893 470q-7 -52 -43.5 -109t-81.5 -101t-100 -86.5t-91.5 -66t-65.5 -38.5q-28 15 -64.5 38.5t-92 66t-100 86.5t-81 101t-43.5 109q-13 92 75 176q4 5 11.5 12.5t32 20t52.5 12.5q87 0 189 -111l21 -23l22 23
q102 111 189 111q27 0 52 -12.5t32.5 -20t11.5 -12.5q88 -84 75 -176z" />
<glyph glyph-name="uniE605" unicode="&#xe605;"
d="M512 415l360 360l45 -45l-360 -360l360 -359l-45 -45l-360 359l-360 -359l-45 45l360 359l-360 360l45 45z" />
<glyph glyph-name="uniE606" unicode="&#xe606;"
d="M245 384l-9 9l472 472l80 -80l-400 -401l400 -401l-80 -80l-472 472z" />
<glyph glyph-name="uniE607" unicode="&#xe607;"
d="M785 384l13 13l-488 487l-84 -84l416 -416l-416 -416l84 -84l488 487z" />
<glyph glyph-name="uniE608" unicode="&#xe608;"
d="M682 74q-108 -89 -249 -89q-107 0 -197.5 53t-143.5 143.5t-53 197.5t53 197.5t143.5 143.5t197.5 53t197.5 -53t143.5 -143.5t53 -197.5q0 -141 -89 -249l286 -286l-56 -56zM433.5 64q130.5 0 222.5 92t92 222.5t-92 223t-222.5 92.5t-223 -92.5t-92.5 -223t92.5 -222.5
t223 -92z" />
<glyph glyph-name="uniE609" unicode="&#xe609;"
d="M513 17q-15 0 -121 93t-168 161q-37 40 -64 95.5t-27 99.5q0 97 61.5 166.5t149.5 69.5q49 0 93 -34.5t76 -86.5q31 52 75 86.5t93 34.5q88 0 150 -69.5t62 -166.5q0 -47 -27 -104t-65 -92q-20 -18 -61.5 -57t-74 -68.5t-67 -61t-57 -49t-28.5 -17.5z" />
<glyph glyph-name="uniE60A" unicode="&#xe60a;" horiz-adv-x="1463"
d="M798 -160q0 -46 25 -58t61 16l537 420q36 28 36 68t-36 68l-537 424q-36 29 -61 16.5t-25 -57.5v-238q-138 0 -252.5 -24.5t-192 -63t-137.5 -94t-94.5 -109.5t-57.5 -117t-31.5 -109.5t-11 -94t-1.5 -63.5t2 -25q47 62 87 104t90 78t103.5 57.5t127 36.5t161.5 21t207 6
v-262z" />
<glyph glyph-name="uniE60B" unicode="&#xe60b;"
d="M150.5 805q23.5 0 40 -16.5t16.5 -40t-16.5 -40.5t-40 -17t-40.5 17t-17 40.5t17 40t40.5 16.5zM150 600q49 0 87.5 28.5t53.5 74.5h731v91h-731q-15 45 -53.5 73.5t-87.5 28.5q-61 0 -104.5 -43.5t-43.5 -104.5t43.5 -104.5t104.5 -43.5zM723 327q-23 0 -40 16.5
t-17 40.5t17 40.5t40.5 16.5t40 -16.5t16.5 -40.5t-16.5 -40.5t-40.5 -16.5zM864 430q-15 45 -53.5 73.5t-87 28.5t-87.5 -28.5t-53 -73.5h-583v-92h583q14 -45 53 -73.5t87.5 -28.5t87 28.5t53.5 73.5h160v92h-160zM150.5 -37q-23.5 0 -40.5 16.5t-17 40t17 40.5t40.5 17
t40 -17t16.5 -40.5t-16.5 -40t-40 -16.5zM150 168q-61 0 -104.5 -43.5t-43.5 -104.5t43.5 -104.5t104.5 -43.5q49 0 87.5 28.5t53.5 73.5h731v91h-731q-15 46 -53.5 74.5t-87.5 28.5z" />
<glyph glyph-name="uniE60C" unicode="&#xe60c;" horiz-adv-x="1122"
d="M793 798q92 0 150.5 -65t58.5 -161q0 -82 -54 -145l-398 -413l-399 413q-53 63 -53 145q0 96 58 161t150 65q43 0 90 -22t79 -52t53.5 -58.5t21.5 -42.5q0 14 21 42.5t53.5 58.5t79 52t89.5 22zM793 896q-63 0 -127 -30t-116 -78q-53 48 -117 78t-127 30
q-131 0 -218.5 -92.5t-87.5 -231.5q0 -118 76 -208l3 -3l2 -2l398 -413l71 -73l70 73l398 413l3 2l2 3q76 90 76 208q0 139 -87.5 231.5t-218.5 92.5z" />
<glyph glyph-name="uniE60D" unicode="&#xe60d;" horiz-adv-x="1122"
d="M793 896q-63 0 -127 -30t-116 -78q-53 48 -117 78t-127 30q-131 0 -218.5 -92.5t-87.5 -231.5q0 -118 76 -208l3 -3l2 -2l398 -413l71 -73l70 73l398 413l3 2l2 3q76 90 76 208q0 139 -87.5 231.5t-218.5 92.5z" />
<glyph glyph-name="uniE60E" unicode="&#xe60e;" horiz-adv-x="1321"
d="M1297 366l-597 530v-328q-448 -11 -616 -283q-87 -142 -84 -319q1 -32 2 -32q65 82 120.5 129.5t135.5 82t183 47.5t259 15v-328z" />
<glyph glyph-name="uniE60F" unicode="&#xe60f;"
d="M337 406.5q7 6.5 7 20.5q0 13 -7 20q-7 6 -22 6h-6v-53h5q16 0 23 6.5zM320 360h-11v-56h15q21 0 30 7q9 8 9 21q0 12 -9 20t-34 8zM811 890h-598q-86 0 -146.5 -60.5t-60.5 -146.5v-598q0 -86 60.5 -146.5t146.5 -60.5h598q86 0 146.5 60.5t60.5 146.5v598
q0 86 -60.5 146.5t-146.5 60.5zM388 282q-12 -12 -28 -17t-39 -5h-57v236h39q23 0 37 -4q15 -4 25 -13q11 -9 17 -23t6 -28q0 -23 -14 -39q14 -7 23 -20q11 -17 11 -39q0 -28 -20 -48zM556 260h-111v236h46v-192h65v-44zM767 260h-60l-78 97h-1v-97h-45v236h45v-81l79 81h62
l-108 -108z" />
<glyph glyph-name="uniE610" unicode="&#xe610;"
d="M0 896v-1024q139 0 272 37t245 103t206.5 160.5t160.5 206.5t103 245t37 272h-1024zM657 281l-44 -43l-201 201l-201 -201l-43 43l201 201l-201 201l43 43l201 -201l201 201l44 -43l-201 -201z" />
<glyph glyph-name="uniE611" unicode="&#xe611;" horiz-adv-x="1313"
d="M1303 363l-599 533v-330q-159 -4 -283.5 -41t-196.5 -93t-122 -124t-69.5 -134t-27 -121.5t-6 -89t2.5 -34.5q65 83 120.5 131t136 82.5t184 47.5t261.5 15v-330z" />
<glyph glyph-name="uniE612" unicode="&#xe612;"
d="M490 406h-223v-44h267v356h-44v-312zM512 874q-100 0 -190.5 -39t-156 -104.5t-104.5 -156t-39 -190.5t39 -190.5t104.5 -156t156 -104.5t190.5 -39t190.5 39t156 104.5t104.5 156t39 190.5t-39 190.5t-104.5 156t-156 104.5t-190.5 39zM512 -54q-89 0 -170 34.5
t-140 93.5t-93.5 140t-34.5 170t34.5 170t93.5 140t140 93.5t170 34.5t170 -34.5t140 -93.5t93.5 -140t34.5 -170t-34.5 -170t-93.5 -140t-140 -93.5t-170 -34.5z" />
<glyph glyph-name="uniE617" unicode="&#xe617;"
d="M24 94l22 -22q9 -10 22 -10t23 10l424 430l420 -426q9 -9 21.5 -9t21.5 9l22 22q9 9 9 22t-9 23l-458 464q-5 5 -12 7q-9 7 -20.5 6t-20.5 -9l-465 -472q-9 -9 -9 -22t9 -23z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -23,6 +23,12 @@ class Loading {
this.settings = Object.assign({}, this.defaults, opts);
this.elem = $(template());
this.overlay = new Overlay({
animation: 'fade',
clickToClose: false
});
}
... ... @@ -37,10 +43,6 @@ class Loading {
this.elem.appendTo('body');
}
this.overlay = new Overlay({
animation: 'fade',
clickToClose: false
});
this.overlay.show();
}
}
... ...
... ... @@ -108,7 +108,10 @@ class Overlay {
});
}
this._cleanup();
setTimeout(()=> {
this._cleanup();
}, 200);
this.isVisible = false;
this.settings.onClose();
}
... ...
... ... @@ -24,8 +24,18 @@ const cate = {
lifestyle: '6f7b590ed3844e680d4052fc5c4d98ad'
};
/* 资讯列表资源位 */
const news = {
new: 'd4fdfcad1ec877d466d9780efaf4d296',
sports: 'e1f8dce8cb9de1a0977479c13c4d3dcc',
life: '5c0b9963d8b75e6fd788a2b49402be14',
sneakers: 'c4a62196c30cae5301e419aa3f77747b',
fashion: '70bc6b9d5c96bb7698eab85c7cd5ebbe'
};
module.exports = {
channel,
brand,
cate
cate,
news
};
... ...
... ... @@ -15,34 +15,22 @@
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-x:before {
content: "\e908";
}
.icon-delete:before {
content: "\e600";
}
.icon-bag:before {
content: "\e601";
}
.icon-down:before {
content: "\e602";
}
.icon-check:before {
content: "\e603";
}
.icon-love:before {
content: "\e604";
.icon-yoho-share:before {
content: "\e60a";
}
.icon-close:before {
... ... @@ -61,12 +49,24 @@
content: "\e608";
}
.icon-love-solid:before {
content: "\e609";
.icon-down:before {
content: "\e602";
}
.icon-yoho-share:before {
content: "\e60a";
.icon-up:before {
content: "\e617";
}
.icon-delete:before {
content: "\e600";
}
.icon-love:before {
content: "\e604";
}
.icon-love-solid:before {
content: "\e609";
}
.icon-filter:before {
... ... @@ -85,34 +85,18 @@
content: "\e60e";
}
.icon-up:before {
content: "\e617";
}
.icon-notdef:before {
content: "\e900";
}
.icon-wait-cargo:before {
content: "\e901";
}
.icon-wait-pay:before {
content: "\e902";
}
.icon-send-cargo:before {
content: "\e903";
.icon-blk:before {
content: "\e60f";
}
.icon-refund-exchange:before {
content: "\e904";
.icon-importedlayers:before {
content: "\e610";
}
.icon-sort-asc:before {
content: "\e905";
.icon-sharenews:before {
content: "\e611";
}
.icon-sort-desc:before {
content: "\e906";
.icon-timeshare:before {
content: "\e612";
}
... ...
... ... @@ -20,6 +20,7 @@
height: 88px;
min-height: inherit;
margin-right: 20px;
margin-top: 20px;
}
</style>
<script>
... ...
... ... @@ -22,7 +22,7 @@
<feature-options name="size" :options="sizes" :selection="selection.size"></feature-options>
</section>
<button @click="addToCart()"
class="button button-solid add-to-cart">{{config.btnTxt || '加入购物袋'}}
class="button button-solid add-to-cart">{{buttonText || '加入购物袋'}}
</button>
</div>
</div>
... ... @@ -31,7 +31,7 @@
.feature-selector {
background: #fff;
width: 100%;
height: 608px;
min-height: 608px;
bottom: 0;
position: fixed;
padding: 20px 30px;
... ... @@ -80,6 +80,7 @@
margin-top: 30px;
margin-bottom: 0;
padding: 0;
max-width: 600px;
}
li {
... ... @@ -141,20 +142,11 @@
*/
onAddToCart: Function,
config: Object
buttonText: String
},
watch: {
isVisible() {
const self = this;
if (this.isVisible) {
this.overlay = new Overlay({
disableScrolling: false,
onClose: function() {
self.isVisible = false;
}
});
this.overlay.show();
} else {
this.overlay.hide();
... ... @@ -235,6 +227,15 @@
featureOptions: require('./feature-options.vue')
},
created() {
const self = this;
this.overlay = new Overlay({
disableScrolling: false,
onClose: function() {
self.isVisible = false;
}
});
// 选择颜色
this.$on('feature:color.select', (opt)=> {
const selection = {
... ... @@ -297,6 +298,12 @@
}
this.onAddToCart(this.selection, this.entity.pid);
},
getSelection() {
return {
};
}
}
};
... ...
<template>
<div></div>
<resources v-bind:content-code.sync="contentCode"></resources>
<div v-for="news in newsList" class="news-box">
<span class="tag">{{news.tag}}</span>
<div class="img">
<a href="{{news.href}}">
<img v-lazy="news.src | resize 750 470" alt="" />
</a>
</div>
<div class="title"><a href="{{news.href}}">{{news.title}}</a></div>
<div class="news-des">
{{news.des}}
</div>
<hr>
<div class="bottom clearfix">
<span class="icon time-icon">&#xe612;</span>
<span class="time">{{news.time}}</span>
<span class="icon share">&#xe611;</span>
</div>
</div>
</template>
<style>
.news-box {
background: #f6f6f6;
.tag {
position: relative;
top: 42px;
left: 0;
padding: 12px 24px;
background: #000;
color: #fff;
}
.img {
width: 100%;
height: 470px;
overflow: hidden;
img {
width: 100%;
}
}
.title {
background: #fff;
font-size: 32px;
font-weight: 700;
padding: 10px 20px;
}
.news-des {
background: #fff;
padding: 10px 20px;
color: #939393;
}
hr {
margin: 0 20px;
border: #eee 1px solid;
}
.bottom {
padding: 10px 20px;
background: #fff;
color: #939393;
.share {
float: right;
}
}
}
</style>
<script>
const contentCode = require('content-code');
const resources = require('component/resources/index.vue');
const qs = require('yoho-qs');
require('common/vue-filter');
module.exports = {
data() {
return {
msg: 'hello vue'
contentCode: contentCode.brand[qs.brand || 'men'],
newsList: [
{
href: '//m.yoholbk.com',
title: '这是一个标题',
des: '这是一个副标题',
time: '04.19 18.05',
tag: '运动',
src: 'http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg',
},
{
href: '//m.yoholbk.com',
title: '这是一个标题',
des: '这是一个副标题',
time: '04.19 18.05',
tag: '运动',
src: 'http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg',
}
]
};
},
components: {
resources
}
};
</script>
... ...
... ... @@ -414,7 +414,7 @@
*/
onAddToCart: (selection)=> {
$.post('/product/cart.json', {
productSku: selection.size,
productSku: selection.sizeId,
buyNumber: 1
}).then((result)=> {
// TODO: 库存不足 后台暂未实现
... ... @@ -426,7 +426,7 @@
this.showFeatureSelector = false;
tip('系统异常,请稍后重试');
}
});
});
}
};
},
... ...
... ... @@ -29,6 +29,7 @@
}
.blk-icon {
font-size: 64px;
margin-left: 50px;
margin-right: 20px;
float: left;
... ...
<template>
<top-bar v-bind:share-data="shareData"></top-bar>
<shop-top v-bind:shop-info="shopInfo"></shop-top>
<goods-list v-bind:data="productList"></goods-list>
<drawer v-ref:drawer>
<filter :config.once="filterConfig"></filter>
</drawer>
<top-bar v-bind:share-data="shareData"></top-bar>
</template>
<script>
... ...
<template>
<div class="top-box clearfix">
<div class="top-box clearfix" v-bind:class='{"top-box-left" : this.$parent.$refs.drawer.on}'>
<span class="icon back" @click="goBack()">&#xe606;</span>
<div class="right">
<span v-if="shareData.isFav" class="icon" @click="collectShop()">&#xe60d;</span>
... ... @@ -41,6 +41,10 @@
}
}
}
.top-box-left {
left: -655px;
}
</style>
<script>
... ... @@ -88,7 +92,7 @@
});
},
showFilter() {
this.$parent.$refs.drawer.on = !this.$parent.$refs.drawer.on;
}
}
};
... ...