Merge remote-tracking branch 'origin/develop' into develop
Showing
21 changed files
with
302 additions
and
135 deletions
@@ -3,7 +3,10 @@ | @@ -3,7 +3,10 @@ | ||
3 | |Name | Path| Note| | 3 | |Name | Path| Note| |
4 | |首页| /| | 4 | |首页| /| |
5 | |侧边栏| /sidebar| 只有 app 使用| | 5 | |侧边栏| /sidebar| 只有 app 使用| |
6 | -|品牌列表| /brand-list| | | ||
7 | -|品牌店铺| /product/brand?domain=colormad| | | 6 | +|品牌列表| /brands| | |
7 | +|品类| /cate| | | ||
8 | +|全部分类| /cate-all| | | ||
9 | +|品牌店铺| /product/shop?domain=sctest1| | | ||
8 | |品牌店铺分享页面| /product/brand-share?domain=colormad| | | 10 | |品牌店铺分享页面| /product/brand-share?domain=colormad| | |
9 | |商品详情| /product/{productId}| | | 11 | |商品详情| /product/{productId}| | |
12 | +|资讯列表| /news| | |
@@ -17,11 +17,11 @@ router.get('/', channel.index); // 首页 | @@ -17,11 +17,11 @@ router.get('/', channel.index); // 首页 | ||
17 | router.get('/channel/channel.json', channel.channel); // 查询所有频道 | 17 | router.get('/channel/channel.json', channel.channel); // 查询所有频道 |
18 | router.get('/channel/resources.json', channel.resources); // 资源位接口 | 18 | router.get('/channel/resources.json', channel.resources); // 资源位接口 |
19 | router.get('/channel/goods.json', channel.goods); // 首页查询商品列表 | 19 | router.get('/channel/goods.json', channel.goods); // 首页查询商品列表 |
20 | -router.get('/brand-list', brand.brandList); // 品牌列表页 | 20 | +router.get('/brands', brand.brandList); // 品牌列表页 |
21 | router.get('/get-brand-list', brand.getBrandList); // 获取品牌列表数据 | 21 | router.get('/get-brand-list', brand.getBrandList); // 获取品牌列表数据 |
22 | 22 | ||
23 | -router.get('/cate-resource', brand.cateResource); // 品类资源位页面 | ||
24 | -router.get('/cate', brand.cate); // 全部分类 | 23 | +router.get('/cate', brand.cateResource); // 品类资源位页面 |
24 | +router.get('/cate-all', brand.cate); // 全部分类 | ||
25 | router.get('/get-cate-list', brand.getCateList); // 全部分类数据列表 | 25 | router.get('/get-cate-list', brand.getCateList); // 全部分类数据列表 |
26 | 26 | ||
27 | router.get('/sidebar', channel.sidebar); // 资源位接口 | 27 | router.get('/sidebar', channel.sidebar); // 资源位接口 |
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | // const helpers = global.yoho.helpers; | 10 | // const helpers = global.yoho.helpers; |
11 | const serviceAPI = global.yoho.ServiceAPI; | 11 | const serviceAPI = global.yoho.ServiceAPI; |
12 | const URI_PACKAGE_ARTICLE = 'guang/service/v2/article/'; | 12 | const URI_PACKAGE_ARTICLE = 'guang/service/v2/article/'; |
13 | -const co = require('co'); | 13 | +const Prmoise = require('bluebird'); |
14 | const camelCase = global.yoho.camelCase; | 14 | const camelCase = global.yoho.camelCase; |
15 | 15 | ||
16 | /** | 16 | /** |
@@ -18,7 +18,7 @@ const camelCase = global.yoho.camelCase; | @@ -18,7 +18,7 @@ const camelCase = global.yoho.camelCase; | ||
18 | */ | 18 | */ |
19 | const model = { | 19 | const model = { |
20 | index(params) { | 20 | index(params) { |
21 | - return co(function*() { | 21 | + return Prmoise.coroutine(function*() { |
22 | const article = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticle', params); | 22 | const article = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticle', params); |
23 | const content = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticleContent', params); | 23 | const content = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticleContent', params); |
24 | const brands = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getBrand', params); | 24 | const brands = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getBrand', params); |
@@ -29,7 +29,7 @@ const model = { | @@ -29,7 +29,7 @@ const model = { | ||
29 | }, params)); | 29 | }, params)); |
30 | 30 | ||
31 | return camelCase([article, content, brands, other]); | 31 | return camelCase([article, content, brands, other]); |
32 | - }); | 32 | + })(); |
33 | } | 33 | } |
34 | }; | 34 | }; |
35 | 35 |
apps/news/models/index.js
0 → 100644
@@ -53,34 +53,26 @@ const getShopData = params => { | @@ -53,34 +53,26 @@ const getShopData = params => { | ||
53 | isFav: subResult[0].data.is_favorite === 'Y' | 53 | isFav: subResult[0].data.is_favorite === 'Y' |
54 | }); | 54 | }); |
55 | 55 | ||
56 | - /* TODO shop_template_type 待接口确认 */ | ||
57 | - if (subResult[0].data.shop_template_type === '3') { | ||
58 | - | ||
59 | - /* 取资源位店铺背景图 */ | ||
60 | - return api.all([ | ||
61 | - shopApi.getShopsDecoratorList({shopId: result[0].data.shop_id}) | ||
62 | - ]).then(thResult => { | ||
63 | - if (thResult.code === 200) { | ||
64 | - _.forEach(thResult[0].data.list, value => { | ||
65 | - | ||
66 | - /* TODO resource_name 待接口确认 */ | ||
67 | - if (value.resource_name === 'shopTopBanner_BLK') { | ||
68 | - Object.assign(finalResult, { | ||
69 | - brandBg: value.resource_data.shopSrc | ||
70 | - }); | ||
71 | - } | ||
72 | - }); | ||
73 | - | ||
74 | - } else { | ||
75 | - logger.info('getShopsDecoratorList api code no 200'); | ||
76 | - } | ||
77 | - | ||
78 | - return finalResult; | ||
79 | - }); | ||
80 | - | ||
81 | - } else { | ||
82 | - logger.info('no BLK template resource'); | ||
83 | - } | 56 | + /* 取资源位店铺背景图 */ |
57 | + return api.all([ | ||
58 | + shopApi.getShopsDecoratorList({shopId: result[0].data.shop_id}) | ||
59 | + ]).then(thResult => { | ||
60 | + if (thResult.code === 200) { | ||
61 | + _.forEach(thResult[0].data.list, value => { | ||
62 | + | ||
63 | + if (value.resource_name === 'shopTopBanner_app') { | ||
64 | + Object.assign(finalResult, { | ||
65 | + brandBg: value.resource_data.shopSrc | ||
66 | + }); | ||
67 | + } | ||
68 | + }); | ||
69 | + | ||
70 | + } else { | ||
71 | + logger.info('getShopsDecoratorList api code no 200'); | ||
72 | + } | ||
73 | + | ||
74 | + return finalResult; | ||
75 | + }); | ||
84 | } else { | 76 | } else { |
85 | logger.error('getShopInfoData api code no 200'); | 77 | logger.error('getShopInfoData api code no 200'); |
86 | } | 78 | } |
No preview for this file type
1 | <?xml version="1.0" standalone="no"?> | 1 | <?xml version="1.0" standalone="no"?> |
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | -<metadata>Generated by IcoMoon</metadata> | 4 | +<metadata> |
5 | +Created by FontForge 20120731 at Wed Jul 27 10:16:29 2016 | ||
6 | + By admin | ||
7 | +</metadata> | ||
5 | <defs> | 8 | <defs> |
6 | -<font id="iconfont" horiz-adv-x="1024"> | ||
7 | -<font-face units-per-em="1024" ascent="896" descent="-128" /> | ||
8 | -<missing-glyph horiz-adv-x="1024" /> | ||
9 | -<glyph unicode=" " horiz-adv-x="0" d="" /> | ||
10 | -<glyph unicode="" 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" /> | ||
11 | -<glyph unicode="" 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" /> | ||
12 | -<glyph unicode="" 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" /> | ||
13 | -<glyph unicode="" 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" /> | ||
14 | -<glyph unicode="" 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" /> | ||
15 | -<glyph unicode="" 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" /> | ||
16 | -<glyph unicode="" glyph-name="left" d="M245 384l-9 9 472 472 80-80-400-401 400-401-80-80-472 472z" /> | ||
17 | -<glyph unicode="" glyph-name="right" d="M785 384l13 13-488 487-84-84 416-416-416-416 84-84 488 487z" /> | ||
18 | -<glyph unicode="" 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" /> | ||
19 | -<glyph unicode="" 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" /> | ||
20 | -<glyph unicode="" 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" /> | ||
21 | -<glyph unicode="" 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" /> | ||
22 | -<glyph unicode="" 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" /> | ||
23 | -<glyph unicode="" 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" /> | ||
24 | -<glyph unicode="" 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" /> | ||
25 | -<glyph unicode="" 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" /> | ||
26 | -<glyph unicode="" glyph-name="notdef" horiz-adv-x="374" d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> | ||
27 | -<glyph unicode="" 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" /> | ||
28 | -<glyph unicode="" 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" /> | ||
29 | -<glyph unicode="" 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" /> | ||
30 | -<glyph unicode="" 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" /> | ||
31 | -<glyph unicode="" 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" /> | ||
32 | -<glyph unicode="" 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" /> | ||
33 | -<glyph unicode="" 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" /> | ||
34 | -</font></defs></svg> | ||
9 | +<font id="iconfont" horiz-adv-x="1024" > | ||
10 | + <font-face | ||
11 | + font-family="iconfont" | ||
12 | + font-weight="500" | ||
13 | + font-stretch="normal" | ||
14 | + units-per-em="1024" | ||
15 | + panose-1="2 0 6 3 0 0 0 0 0 0" | ||
16 | + ascent="896" | ||
17 | + descent="-128" | ||
18 | + x-height="792" | ||
19 | + bbox="-0.75 -221.6 1457 896" | ||
20 | + underline-thickness="50" | ||
21 | + underline-position="-100" | ||
22 | + unicode-range="U+0078-E617" | ||
23 | + /> | ||
24 | +<missing-glyph horiz-adv-x="374" | ||
25 | +d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> | ||
26 | + <glyph glyph-name=".notdef" horiz-adv-x="374" | ||
27 | +d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> | ||
28 | + <glyph glyph-name=".null" horiz-adv-x="0" | ||
29 | + /> | ||
30 | + <glyph glyph-name="nonmarkingreturn" horiz-adv-x="341" | ||
31 | + /> | ||
32 | + <glyph glyph-name="x" unicode="x" horiz-adv-x="1001" | ||
33 | +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 | ||
34 | +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 | ||
35 | +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" /> | ||
36 | + <glyph glyph-name="uniE600" unicode="" | ||
37 | +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 | ||
38 | +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 | ||
39 | +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" /> | ||
40 | + <glyph glyph-name="uniE601" unicode="" | ||
41 | +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 | ||
42 | +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" /> | ||
43 | + <glyph glyph-name="uniE602" unicode="" | ||
44 | +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 | ||
45 | +M945 669z" /> | ||
46 | + <glyph glyph-name="uniE603" unicode="" | ||
47 | +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" /> | ||
48 | + <glyph glyph-name="uniE604" unicode="" | ||
49 | +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 | ||
50 | +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 | ||
51 | +q102 111 189 111q27 0 52 -12.5t32.5 -20t11.5 -12.5q88 -84 75 -176z" /> | ||
52 | + <glyph glyph-name="uniE605" unicode="" | ||
53 | +d="M512 415l360 360l45 -45l-360 -360l360 -359l-45 -45l-360 359l-360 -359l-45 45l360 359l-360 360l45 45z" /> | ||
54 | + <glyph glyph-name="uniE606" unicode="" | ||
55 | +d="M245 384l-9 9l472 472l80 -80l-400 -401l400 -401l-80 -80l-472 472z" /> | ||
56 | + <glyph glyph-name="uniE607" unicode="" | ||
57 | +d="M785 384l13 13l-488 487l-84 -84l416 -416l-416 -416l84 -84l488 487z" /> | ||
58 | + <glyph glyph-name="uniE608" unicode="" | ||
59 | +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 | ||
60 | +t223 -92z" /> | ||
61 | + <glyph glyph-name="uniE609" unicode="" | ||
62 | +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" /> | ||
63 | + <glyph glyph-name="uniE60A" unicode="" horiz-adv-x="1463" | ||
64 | +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 | ||
65 | +v-262z" /> | ||
66 | + <glyph glyph-name="uniE60B" unicode="" | ||
67 | +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 | ||
68 | +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 | ||
69 | +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" /> | ||
70 | + <glyph glyph-name="uniE60C" unicode="" horiz-adv-x="1122" | ||
71 | +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 | ||
72 | +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" /> | ||
73 | + <glyph glyph-name="uniE60D" unicode="" horiz-adv-x="1122" | ||
74 | +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" /> | ||
75 | + <glyph glyph-name="uniE60E" unicode="" horiz-adv-x="1321" | ||
76 | +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" /> | ||
77 | + <glyph glyph-name="uniE60F" unicode="" | ||
78 | +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 | ||
79 | +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 | ||
80 | +l-108 -108z" /> | ||
81 | + <glyph glyph-name="uniE610" unicode="" | ||
82 | +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" /> | ||
83 | + <glyph glyph-name="uniE611" unicode="" horiz-adv-x="1313" | ||
84 | +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" /> | ||
85 | + <glyph glyph-name="uniE612" unicode="" | ||
86 | +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 | ||
87 | +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" /> | ||
88 | + <glyph glyph-name="uniE617" unicode="" | ||
89 | +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" /> | ||
90 | + </font> | ||
91 | +</defs></svg> |
No preview for this file type
No preview for this file type
@@ -23,6 +23,12 @@ class Loading { | @@ -23,6 +23,12 @@ class Loading { | ||
23 | this.settings = Object.assign({}, this.defaults, opts); | 23 | this.settings = Object.assign({}, this.defaults, opts); |
24 | 24 | ||
25 | this.elem = $(template()); | 25 | this.elem = $(template()); |
26 | + | ||
27 | + | ||
28 | + this.overlay = new Overlay({ | ||
29 | + animation: 'fade', | ||
30 | + clickToClose: false | ||
31 | + }); | ||
26 | } | 32 | } |
27 | 33 | ||
28 | 34 | ||
@@ -37,10 +43,6 @@ class Loading { | @@ -37,10 +43,6 @@ class Loading { | ||
37 | this.elem.appendTo('body'); | 43 | this.elem.appendTo('body'); |
38 | } | 44 | } |
39 | 45 | ||
40 | - this.overlay = new Overlay({ | ||
41 | - animation: 'fade', | ||
42 | - clickToClose: false | ||
43 | - }); | ||
44 | this.overlay.show(); | 46 | this.overlay.show(); |
45 | } | 47 | } |
46 | } | 48 | } |
@@ -108,7 +108,10 @@ class Overlay { | @@ -108,7 +108,10 @@ class Overlay { | ||
108 | }); | 108 | }); |
109 | } | 109 | } |
110 | 110 | ||
111 | - this._cleanup(); | 111 | + setTimeout(()=> { |
112 | + this._cleanup(); | ||
113 | + }, 200); | ||
114 | + | ||
112 | this.isVisible = false; | 115 | this.isVisible = false; |
113 | this.settings.onClose(); | 116 | this.settings.onClose(); |
114 | } | 117 | } |
@@ -24,8 +24,18 @@ const cate = { | @@ -24,8 +24,18 @@ const cate = { | ||
24 | lifestyle: '6f7b590ed3844e680d4052fc5c4d98ad' | 24 | lifestyle: '6f7b590ed3844e680d4052fc5c4d98ad' |
25 | }; | 25 | }; |
26 | 26 | ||
27 | +/* 资讯列表资源位 */ | ||
28 | +const news = { | ||
29 | + new: 'd4fdfcad1ec877d466d9780efaf4d296', | ||
30 | + sports: 'e1f8dce8cb9de1a0977479c13c4d3dcc', | ||
31 | + life: '5c0b9963d8b75e6fd788a2b49402be14', | ||
32 | + sneakers: 'c4a62196c30cae5301e419aa3f77747b', | ||
33 | + fashion: '70bc6b9d5c96bb7698eab85c7cd5ebbe' | ||
34 | +}; | ||
35 | + | ||
27 | module.exports = { | 36 | module.exports = { |
28 | channel, | 37 | channel, |
29 | brand, | 38 | brand, |
30 | - cate | 39 | + cate, |
40 | + news | ||
31 | }; | 41 | }; |
@@ -15,34 +15,22 @@ | @@ -15,34 +15,22 @@ | ||
15 | font-variant: normal; | 15 | font-variant: normal; |
16 | text-transform: none; | 16 | text-transform: none; |
17 | line-height: 1; | 17 | line-height: 1; |
18 | - | 18 | + |
19 | /* Better Font Rendering =========== */ | 19 | /* Better Font Rendering =========== */ |
20 | -webkit-font-smoothing: antialiased; | 20 | -webkit-font-smoothing: antialiased; |
21 | -moz-osx-font-smoothing: grayscale; | 21 | -moz-osx-font-smoothing: grayscale; |
22 | } | 22 | } |
23 | 23 | ||
24 | -.icon-x:before { | ||
25 | - content: "\e908"; | ||
26 | -} | ||
27 | - | ||
28 | -.icon-delete:before { | ||
29 | - content: "\e600"; | ||
30 | -} | ||
31 | - | ||
32 | .icon-bag:before { | 24 | .icon-bag:before { |
33 | content: "\e601"; | 25 | content: "\e601"; |
34 | } | 26 | } |
35 | 27 | ||
36 | -.icon-down:before { | ||
37 | - content: "\e602"; | ||
38 | -} | ||
39 | - | ||
40 | .icon-check:before { | 28 | .icon-check:before { |
41 | content: "\e603"; | 29 | content: "\e603"; |
42 | } | 30 | } |
43 | 31 | ||
44 | -.icon-love:before { | ||
45 | - content: "\e604"; | 32 | +.icon-yoho-share:before { |
33 | + content: "\e60a"; | ||
46 | } | 34 | } |
47 | 35 | ||
48 | .icon-close:before { | 36 | .icon-close:before { |
@@ -61,12 +49,24 @@ | @@ -61,12 +49,24 @@ | ||
61 | content: "\e608"; | 49 | content: "\e608"; |
62 | } | 50 | } |
63 | 51 | ||
64 | -.icon-love-solid:before { | ||
65 | - content: "\e609"; | 52 | +.icon-down:before { |
53 | + content: "\e602"; | ||
66 | } | 54 | } |
67 | 55 | ||
68 | -.icon-yoho-share:before { | ||
69 | - content: "\e60a"; | 56 | +.icon-up:before { |
57 | + content: "\e617"; | ||
58 | +} | ||
59 | + | ||
60 | +.icon-delete:before { | ||
61 | + content: "\e600"; | ||
62 | +} | ||
63 | + | ||
64 | +.icon-love:before { | ||
65 | + content: "\e604"; | ||
66 | +} | ||
67 | + | ||
68 | +.icon-love-solid:before { | ||
69 | + content: "\e609"; | ||
70 | } | 70 | } |
71 | 71 | ||
72 | .icon-filter:before { | 72 | .icon-filter:before { |
@@ -85,34 +85,18 @@ | @@ -85,34 +85,18 @@ | ||
85 | content: "\e60e"; | 85 | content: "\e60e"; |
86 | } | 86 | } |
87 | 87 | ||
88 | -.icon-up:before { | ||
89 | - content: "\e617"; | ||
90 | -} | ||
91 | - | ||
92 | -.icon-notdef:before { | ||
93 | - content: "\e900"; | ||
94 | -} | ||
95 | - | ||
96 | -.icon-wait-cargo:before { | ||
97 | - content: "\e901"; | ||
98 | -} | ||
99 | - | ||
100 | -.icon-wait-pay:before { | ||
101 | - content: "\e902"; | ||
102 | -} | ||
103 | - | ||
104 | -.icon-send-cargo:before { | ||
105 | - content: "\e903"; | 88 | +.icon-blk:before { |
89 | + content: "\e60f"; | ||
106 | } | 90 | } |
107 | 91 | ||
108 | -.icon-refund-exchange:before { | ||
109 | - content: "\e904"; | 92 | +.icon-importedlayers:before { |
93 | + content: "\e610"; | ||
110 | } | 94 | } |
111 | 95 | ||
112 | -.icon-sort-asc:before { | ||
113 | - content: "\e905"; | 96 | +.icon-sharenews:before { |
97 | + content: "\e611"; | ||
114 | } | 98 | } |
115 | 99 | ||
116 | -.icon-sort-desc:before { | ||
117 | - content: "\e906"; | 100 | +.icon-timeshare:before { |
101 | + content: "\e612"; | ||
118 | } | 102 | } |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | <feature-options name="size" :options="sizes" :selection="selection.size"></feature-options> | 22 | <feature-options name="size" :options="sizes" :selection="selection.size"></feature-options> |
23 | </section> | 23 | </section> |
24 | <button @click="addToCart()" | 24 | <button @click="addToCart()" |
25 | - class="button button-solid add-to-cart">{{config.btnTxt || '加入购物袋'}} | 25 | + class="button button-solid add-to-cart">{{buttonText || '加入购物袋'}} |
26 | </button> | 26 | </button> |
27 | </div> | 27 | </div> |
28 | </div> | 28 | </div> |
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | .feature-selector { | 31 | .feature-selector { |
32 | background: #fff; | 32 | background: #fff; |
33 | width: 100%; | 33 | width: 100%; |
34 | - height: 608px; | 34 | + min-height: 608px; |
35 | bottom: 0; | 35 | bottom: 0; |
36 | position: fixed; | 36 | position: fixed; |
37 | padding: 20px 30px; | 37 | padding: 20px 30px; |
@@ -80,6 +80,7 @@ | @@ -80,6 +80,7 @@ | ||
80 | margin-top: 30px; | 80 | margin-top: 30px; |
81 | margin-bottom: 0; | 81 | margin-bottom: 0; |
82 | padding: 0; | 82 | padding: 0; |
83 | + max-width: 600px; | ||
83 | } | 84 | } |
84 | 85 | ||
85 | li { | 86 | li { |
@@ -141,20 +142,11 @@ | @@ -141,20 +142,11 @@ | ||
141 | */ | 142 | */ |
142 | onAddToCart: Function, | 143 | onAddToCart: Function, |
143 | 144 | ||
144 | - config: Object | 145 | + buttonText: String |
145 | }, | 146 | }, |
146 | watch: { | 147 | watch: { |
147 | isVisible() { | 148 | isVisible() { |
148 | - const self = this; | ||
149 | - | ||
150 | if (this.isVisible) { | 149 | if (this.isVisible) { |
151 | - this.overlay = new Overlay({ | ||
152 | - disableScrolling: false, | ||
153 | - onClose: function() { | ||
154 | - self.isVisible = false; | ||
155 | - } | ||
156 | - }); | ||
157 | - | ||
158 | this.overlay.show(); | 150 | this.overlay.show(); |
159 | } else { | 151 | } else { |
160 | this.overlay.hide(); | 152 | this.overlay.hide(); |
@@ -235,6 +227,15 @@ | @@ -235,6 +227,15 @@ | ||
235 | featureOptions: require('./feature-options.vue') | 227 | featureOptions: require('./feature-options.vue') |
236 | }, | 228 | }, |
237 | created() { | 229 | created() { |
230 | + const self = this; | ||
231 | + | ||
232 | + this.overlay = new Overlay({ | ||
233 | + disableScrolling: false, | ||
234 | + onClose: function() { | ||
235 | + self.isVisible = false; | ||
236 | + } | ||
237 | + }); | ||
238 | + | ||
238 | // 选择颜色 | 239 | // 选择颜色 |
239 | this.$on('feature:color.select', (opt)=> { | 240 | this.$on('feature:color.select', (opt)=> { |
240 | const selection = { | 241 | const selection = { |
@@ -297,6 +298,12 @@ | @@ -297,6 +298,12 @@ | ||
297 | } | 298 | } |
298 | 299 | ||
299 | this.onAddToCart(this.selection, this.entity.pid); | 300 | this.onAddToCart(this.selection, this.entity.pid); |
301 | + }, | ||
302 | + | ||
303 | + getSelection() { | ||
304 | + return { | ||
305 | + | ||
306 | + }; | ||
300 | } | 307 | } |
301 | } | 308 | } |
302 | }; | 309 | }; |
1 | <template> | 1 | <template> |
2 | - <div></div> | 2 | + <resources v-bind:content-code.sync="contentCode"></resources> |
3 | + <div v-for="news in newsList" class="news-box"> | ||
4 | + <span class="tag">{{news.tag}}</span> | ||
5 | + <div class="img"> | ||
6 | + <a href="{{news.href}}"> | ||
7 | + <img v-lazy="news.src | resize 750 470" alt="" /> | ||
8 | + </a> | ||
9 | + </div> | ||
10 | + <div class="title"><a href="{{news.href}}">{{news.title}}</a></div> | ||
11 | + <div class="news-des"> | ||
12 | + {{news.des}} | ||
13 | + </div> | ||
14 | + <hr> | ||
15 | + <div class="bottom clearfix"> | ||
16 | + <span class="icon time-icon"></span> | ||
17 | + <span class="time">{{news.time}}</span> | ||
18 | + <span class="icon share"></span> | ||
19 | + </div> | ||
20 | + </div> | ||
3 | </template> | 21 | </template> |
4 | <style> | 22 | <style> |
23 | + .news-box { | ||
24 | + background: #f6f6f6; | ||
25 | + | ||
26 | + .tag { | ||
27 | + position: relative; | ||
28 | + top: 42px; | ||
29 | + left: 0; | ||
30 | + padding: 12px 24px; | ||
31 | + background: #000; | ||
32 | + color: #fff; | ||
33 | + } | ||
34 | + | ||
35 | + .img { | ||
36 | + width: 100%; | ||
37 | + height: 470px; | ||
38 | + overflow: hidden; | ||
39 | + | ||
40 | + img { | ||
41 | + width: 100%; | ||
42 | + } | ||
43 | + } | ||
44 | + | ||
45 | + .title { | ||
46 | + background: #fff; | ||
47 | + font-size: 32px; | ||
48 | + font-weight: 700; | ||
49 | + padding: 10px 20px; | ||
50 | + } | ||
51 | + | ||
52 | + .news-des { | ||
53 | + background: #fff; | ||
54 | + padding: 10px 20px; | ||
55 | + color: #939393; | ||
56 | + } | ||
57 | + | ||
58 | + hr { | ||
59 | + margin: 0 20px; | ||
60 | + border: #eee 1px solid; | ||
61 | + } | ||
62 | + | ||
63 | + .bottom { | ||
64 | + padding: 10px 20px; | ||
65 | + background: #fff; | ||
66 | + color: #939393; | ||
67 | + | ||
68 | + .share { | ||
69 | + float: right; | ||
70 | + } | ||
71 | + } | ||
72 | + } | ||
5 | </style> | 73 | </style> |
6 | <script> | 74 | <script> |
75 | + const contentCode = require('content-code'); | ||
76 | + const resources = require('component/resources/index.vue'); | ||
77 | + const qs = require('yoho-qs'); | ||
78 | + | ||
79 | + require('common/vue-filter'); | ||
80 | + | ||
7 | module.exports = { | 81 | module.exports = { |
8 | data() { | 82 | data() { |
9 | return { | 83 | return { |
10 | - msg: 'hello vue' | 84 | + contentCode: contentCode.brand[qs.brand || 'men'], |
85 | + newsList: [ | ||
86 | + { | ||
87 | + href: '//m.yoholbk.com', | ||
88 | + title: '这是一个标题', | ||
89 | + des: '这是一个副标题', | ||
90 | + time: '04.19 18.05', | ||
91 | + tag: '运动', | ||
92 | + src: 'http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg', | ||
93 | + }, | ||
94 | + { | ||
95 | + href: '//m.yoholbk.com', | ||
96 | + title: '这是一个标题', | ||
97 | + des: '这是一个副标题', | ||
98 | + time: '04.19 18.05', | ||
99 | + tag: '运动', | ||
100 | + src: 'http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg', | ||
101 | + } | ||
102 | + ] | ||
11 | }; | 103 | }; |
104 | + }, | ||
105 | + components: { | ||
106 | + resources | ||
12 | } | 107 | } |
13 | }; | 108 | }; |
14 | </script> | 109 | </script> |
@@ -414,7 +414,7 @@ | @@ -414,7 +414,7 @@ | ||
414 | */ | 414 | */ |
415 | onAddToCart: (selection)=> { | 415 | onAddToCart: (selection)=> { |
416 | $.post('/product/cart.json', { | 416 | $.post('/product/cart.json', { |
417 | - productSku: selection.size, | 417 | + productSku: selection.sizeId, |
418 | buyNumber: 1 | 418 | buyNumber: 1 |
419 | }).then((result)=> { | 419 | }).then((result)=> { |
420 | // TODO: 库存不足 后台暂未实现 | 420 | // TODO: 库存不足 后台暂未实现 |
@@ -426,7 +426,7 @@ | @@ -426,7 +426,7 @@ | ||
426 | this.showFeatureSelector = false; | 426 | this.showFeatureSelector = false; |
427 | tip('系统异常,请稍后重试'); | 427 | tip('系统异常,请稍后重试'); |
428 | } | 428 | } |
429 | - }); | 429 | + }); |
430 | } | 430 | } |
431 | }; | 431 | }; |
432 | }, | 432 | }, |
1 | <template> | 1 | <template> |
2 | - <top-bar v-bind:share-data="shareData"></top-bar> | ||
3 | <shop-top v-bind:shop-info="shopInfo"></shop-top> | 2 | <shop-top v-bind:shop-info="shopInfo"></shop-top> |
4 | <goods-list v-bind:data="productList"></goods-list> | 3 | <goods-list v-bind:data="productList"></goods-list> |
5 | <drawer v-ref:drawer> | 4 | <drawer v-ref:drawer> |
6 | <filter :config.once="filterConfig"></filter> | 5 | <filter :config.once="filterConfig"></filter> |
7 | </drawer> | 6 | </drawer> |
7 | + <top-bar v-bind:share-data="shareData"></top-bar> | ||
8 | </template> | 8 | </template> |
9 | 9 | ||
10 | <script> | 10 | <script> |
1 | <template> | 1 | <template> |
2 | - <div class="top-box clearfix"> | 2 | + <div class="top-box clearfix" v-bind:class='{"top-box-left" : this.$parent.$refs.drawer.on}'> |
3 | <span class="icon back" @click="goBack()"></span> | 3 | <span class="icon back" @click="goBack()"></span> |
4 | <div class="right"> | 4 | <div class="right"> |
5 | <span v-if="shareData.isFav" class="icon" @click="collectShop()"></span> | 5 | <span v-if="shareData.isFav" class="icon" @click="collectShop()"></span> |
@@ -41,6 +41,10 @@ | @@ -41,6 +41,10 @@ | ||
41 | } | 41 | } |
42 | } | 42 | } |
43 | } | 43 | } |
44 | + | ||
45 | + .top-box-left { | ||
46 | + left: -655px; | ||
47 | + } | ||
44 | </style> | 48 | </style> |
45 | 49 | ||
46 | <script> | 50 | <script> |
@@ -88,7 +92,7 @@ | @@ -88,7 +92,7 @@ | ||
88 | }); | 92 | }); |
89 | }, | 93 | }, |
90 | showFilter() { | 94 | showFilter() { |
91 | - | 95 | + this.$parent.$refs.drawer.on = !this.$parent.$refs.drawer.on; |
92 | } | 96 | } |
93 | } | 97 | } |
94 | }; | 98 | }; |
-
Please register or login to post a comment