Authored by yyq

Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0

@@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
2 <div class="brand-img-box {{#if right}}right{{/if}} {{#if bottomSpace}}mb10{{/if}}"> 2 <div class="brand-img-box {{#if right}}right{{/if}} {{#if bottomSpace}}mb10{{/if}}">
3 <a href="{{url}}" target="_blank"> 3 <a href="{{url}}" target="_blank">
4 {{# big}} 4 {{# big}}
5 - <img class="big-img lazy-img" data-original="{{image src 565 340}}" alt="big-img"> 5 + <img class="big-img" src="{{image src 565 340}}" alt="big-img">
6 {{/ big}} 6 {{/ big}}
7 {{# small}} 7 {{# small}}
8 - <img class="small-img lazy-img {{#if @first}}first{{/if}}" data-original="{{image src 281 285}}" alt="big-img"> 8 + <img class="small-img {{#if @first}}first{{/if}}" src="{{image src 281 285}}" alt="big-img">
9 {{/ small}} 9 {{/ small}}
10 </a> 10 </a>
11 </div> 11 </div>
@@ -120,7 +120,7 @@ const list = (req, res) => { @@ -120,7 +120,7 @@ const list = (req, res) => {
120 { 120 {
121 link: 'http://www.yohoblk.com/editorial', 121 link: 'http://www.yohoblk.com/editorial',
122 pathTitle: '资讯', 122 pathTitle: '资讯',
123 - name: '资讯' 123 + name: 'Editorial资讯'
124 }, 124 },
125 { 125 {
126 pathTitle: '资讯', 126 pathTitle: '资讯',
@@ -185,7 +185,7 @@ const detail = (req, res, next) => { @@ -185,7 +185,7 @@ const detail = (req, res, next) => {
185 { 185 {
186 link: 'http://www.yohoblk.com/editorial', 186 link: 'http://www.yohoblk.com/editorial',
187 pathTitle: '资讯', 187 pathTitle: '资讯',
188 - name: '资讯' 188 + name: 'Editorial资讯'
189 }, 189 },
190 { 190 {
191 pathTitle: '资讯', 191 pathTitle: '资讯',
@@ -38,9 +38,12 @@ const list = { @@ -38,9 +38,12 @@ const list = {
38 let nav = [DataHelper.getChannelNav(channel)]; 38 let nav = [DataHelper.getChannelNav(channel)];
39 39
40 if (data.filter) { 40 if (data.filter) {
  41 + data.filter.standard = data.standard;
41 data.filter.groupSort = DataHelper.sortConvert(allSort.data.sort); 42 data.filter.groupSort = DataHelper.sortConvert(allSort.data.sort);
42 retData.filter = DataHelper.filterHandle(data.filter, q); 43 retData.filter = DataHelper.filterHandle(data.filter, q);
43 retData.filter.showPrice = data.total > 10; 44 retData.filter.showPrice = data.total > 10;
  45 + retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0)
  46 + || (data.standard && data.standard.length > 0); //eslint-disable-line
44 nav = _.concat(nav, retData.filter.nav); 47 nav = _.concat(nav, retData.filter.nav);
45 } 48 }
46 49
@@ -96,9 +99,12 @@ const list = { @@ -96,9 +99,12 @@ const list = {
96 let data = camelCase(listData.data); 99 let data = camelCase(listData.data);
97 100
98 if (data.filter) { 101 if (data.filter) {
  102 + data.filter.standard = data.standard;
99 data.filter.groupSort = DataHelper.sortConvert(sortData.data.sort); 103 data.filter.groupSort = DataHelper.sortConvert(sortData.data.sort);
100 retData.filter = DataHelper.filterHandle(data.filter, q); 104 retData.filter = DataHelper.filterHandle(data.filter, q);
101 retData.filter.showPrice = data.total > 10; 105 retData.filter.showPrice = data.total > 10;
  106 + retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0)
  107 + || (data.standard && data.standard.length > 0); //eslint-disable-line
102 } 108 }
103 109
104 retData.navPath = { 110 retData.navPath = {
@@ -29,9 +29,7 @@ const Query = { @@ -29,9 +29,7 @@ const Query = {
29 query: query 29 query: query
30 }; 30 };
31 31
32 - Promise.all([Search.queryAllSort({  
33 - query: query  
34 - }), Search.queryProduct(q)]).then(allResult => { 32 + Promise.all([Search.queryAllSort(q), Search.queryProduct(q)]).then(allResult => {
35 let allSort = camelCase(allResult[0]); 33 let allSort = camelCase(allResult[0]);
36 let result = allResult[1]; 34 let result = allResult[1];
37 35
@@ -51,7 +49,6 @@ const Query = { @@ -51,7 +49,6 @@ const Query = {
51 retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0) 49 retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0)
52 || (data.standard && data.standard.length > 0); //eslint-disable-line 50 || (data.standard && data.standard.length > 0); //eslint-disable-line
53 51
54 - console.log(retData.filter.standard);  
55 } 52 }
56 53
57 retData.navPath = { 54 retData.navPath = {
@@ -134,9 +134,12 @@ const shop = { @@ -134,9 +134,12 @@ const shop = {
134 if (!hasBrand) { 134 if (!hasBrand) {
135 delete q.brand; 135 delete q.brand;
136 } 136 }
  137 + ret.filter.standard = ret.standard;
137 ret.filter.groupSort = DataHelper.sortConvert(allSort.data.sort); 138 ret.filter.groupSort = DataHelper.sortConvert(allSort.data.sort);
138 data.filter = DataHelper.filterHandle(ret.filter, q); 139 data.filter = DataHelper.filterHandle(ret.filter, q);
139 data.filter.showPrice = ret.total > 10; 140 data.filter.showPrice = ret.total > 10;
  141 + data.filter.showInfo = (data.filter.style && data.filter.style.length > 0)
  142 + || (ret.standard && ret.standard.length > 0); //eslint-disable-line
140 } 143 }
141 144
142 data.paginationData = { 145 data.paginationData = {
@@ -91,6 +91,12 @@ const Search = { @@ -91,6 +91,12 @@ const Search = {
91 return api.get('', finalParams); 91 return api.get('', finalParams);
92 }, 92 },
93 queryAllSort(params) { 93 queryAllSort(params) {
  94 +
  95 + params = _.clone(params) || {};
  96 +
  97 + delete params.msort;
  98 + delete params.misort;
  99 +
94 return api.get('', _.assign({ 100 return api.get('', _.assign({
95 method: 'web.regular.groupsort' 101 method: 'web.regular.groupsort'
96 }, params), {code: 200}); 102 }, params), {code: 200});
@@ -23,7 +23,7 @@ const _ = require('lodash'); @@ -23,7 +23,7 @@ const _ = require('lodash');
23 function shopMenu(domain, customMenu) { 23 function shopMenu(domain, customMenu) {
24 let menus = [ 24 let menus = [
25 {id: 'index', name: '店铺首页', url: `/product/shop/${domain}`}, 25 {id: 'index', name: '店铺首页', url: `/product/shop/${domain}`},
26 - {id: 'all', name: '全部商品', url: `/product/shop/${domain}/list`, icon: '&#xe60a;'}, 26 + {id: 'all', name: '全部商品', url: `/product/shop/${domain}/list`},
27 {id: 'hot', name: '人气单品', url: `/product/shop/${domain}/list?order=s_n_desc`}, 27 {id: 'hot', name: '人气单品', url: `/product/shop/${domain}/list?order=s_n_desc`},
28 {id: 'new', name: '新品上架', url: `/product/shop/${domain}/list?order=s_t_desc`} 28 {id: 'new', name: '新品上架', url: `/product/shop/${domain}/list?order=s_t_desc`}
29 ]; 29 ];
1 var cancelOrder = require('./order/cancel-order'); 1 var cancelOrder = require('./order/cancel-order');
  2 +var confirmReceive = require('./order/confirm-receive');
2 var editOrder = require('./order/edit-order'); 3 var editOrder = require('./order/edit-order');
3 var countDown = require('./order/countdown'); 4 var countDown = require('./order/countdown');
4 5
@@ -40,6 +41,13 @@ $('.order .edit-btn').on('click', function() { @@ -40,6 +41,13 @@ $('.order .edit-btn').on('click', function() {
40 }, reload); 41 }, reload);
41 }); 42 });
42 43
  44 +$('.complete-btn').on('click', function() {
  45 + var code = $(this).closest('.order').data('code');
  46 +
  47 + confirmReceive.done(code);
  48 +
  49 +});
  50 +
43 if ($('.left-time').length) { 51 if ($('.left-time').length) {
44 countDown.intervalValue = 1000; 52 countDown.intervalValue = 1000;
45 countDown.showSec = true; 53 countDown.showSec = true;
@@ -296,11 +296,29 @@ function bindCancelEvent() { @@ -296,11 +296,29 @@ function bindCancelEvent() {
296 296
297 297
298 function bindExpressEvent() { 298 function bindExpressEvent() {
  299 + $('body').on('click', function(e) {
  300 + if ($(e.target).hasClass('express')) {
  301 + return false;
  302 + }
  303 +
  304 + $('.express-info').each(function(idx, el) {
  305 + if (!$(el).hasClass('hide')) {
  306 + $(el).addClass('hide');
  307 + }
  308 + });
  309 + });
  310 +
299 $('.express').on('click', function() { 311 $('.express').on('click', function() {
300 var $this = $(this); 312 var $this = $(this);
301 var code = $this.closest('.order').data('code'); 313 var code = $this.closest('.order').data('code');
302 var $info = $this.find('.express-info'); 314 var $info = $this.find('.express-info');
303 315
  316 + $('.express-info').each(function(idx, el) {
  317 + if (!$(el).hasClass('hide')) {
  318 + $(el).addClass('hide');
  319 + }
  320 + });
  321 +
304 if ($info.length) { 322 if ($info.length) {
305 $info.toggleClass('hide'); 323 $info.toggleClass('hide');
306 } else { 324 } else {
@@ -318,7 +336,6 @@ function bindConfirmReceiveEvent() { @@ -318,7 +336,6 @@ function bindConfirmReceiveEvent() {
318 }); 336 });
319 } 337 }
320 338
321 -  
322 function bindEvent() { 339 function bindEvent() {
323 bindPaginationClick(); 340 bindPaginationClick();
324 bindDeleteEvent(); 341 bindDeleteEvent();
@@ -8,6 +8,8 @@ var $ = require('yoho-jquery'); @@ -8,6 +8,8 @@ var $ = require('yoho-jquery');
8 var Cart = require('./cart/cart'); 8 var Cart = require('./cart/cart');
9 var Stepper = require('./cart/stepper'); 9 var Stepper = require('./cart/stepper');
10 10
  11 +require('../common/return-top');
  12 +
11 $(function() { 13 $(function() {
12 var $this; 14 var $this;
13 var editable = true; 15 var editable = true;
@@ -396,7 +396,8 @@ Cart = { @@ -396,7 +396,8 @@ Cart = {
396 sizes: color.sizes, 396 sizes: color.sizes,
397 pic: color.thumbs[0], 397 pic: color.thumbs[0],
398 selectable: color.total > 0, 398 selectable: color.total > 0,
399 - colorName: color.name 399 + colorName: color.name,
  400 + rbg: color.rgb
400 }); 401 });
401 if (color.color === defaultColor && color.cur) { 402 if (color.color === defaultColor && color.cur) {
402 defaultImg = color.thumbs[0]; 403 defaultImg = color.thumbs[0];
@@ -150,6 +150,7 @@ summary { @@ -150,6 +150,7 @@ summary {
150 html, 150 html,
151 body { 151 body {
152 font-family: BrownStd, "黑体"; 152 font-family: BrownStd, "黑体";
  153 + color: #1b1b1b;
153 } 154 }
154 155
155 .clearfix { 156 .clearfix {
@@ -173,7 +174,7 @@ img { @@ -173,7 +174,7 @@ img {
173 a { 174 a {
174 outline: none; 175 outline: none;
175 text-decoration: none; 176 text-decoration: none;
176 - color: #000; 177 + color: #1b1b1b;
177 } 178 }
178 179
179 *:focus { 180 *:focus {
@@ -39,11 +39,12 @@ @@ -39,11 +39,12 @@
39 width: 140px; 39 width: 140px;
40 height: 35px; 40 height: 35px;
41 position: absolute; 41 position: absolute;
42 - bottom: 29px; 42 + bottom: 50px;
43 background-color: white; 43 background-color: white;
44 outline: none; 44 outline: none;
45 - border: 1pX solid black;  
46 - font-size: 16px; 45 + border: 2px solid black;
  46 + font-size: 14px;
  47 + font-weight: bold;
47 cursor: pointer; 48 cursor: pointer;
48 } 49 }
49 } 50 }
@@ -89,12 +89,12 @@ @@ -89,12 +89,12 @@
89 89
90 &.prev { 90 &.prev {
91 left: 50%; 91 left: 50%;
92 - margin-left: -620px; 92 + margin-left: -615px;
93 } 93 }
94 94
95 &.next { 95 &.next {
96 right: 50%; 96 right: 50%;
97 - margin-right: -620px; 97 + margin-right: -615px;
98 } 98 }
99 99
100 &:hover { 100 &:hover {
@@ -161,8 +161,8 @@ @@ -161,8 +161,8 @@
161 position: relative; 161 position: relative;
162 display: inline-block; 162 display: inline-block;
163 margin: 0 3px; 163 margin: 0 3px;
164 - width: 9px;  
165 - height: 9px; 164 + width: 10px;
  165 + height: 10px;
166 background: #ccc; 166 background: #ccc;
167 cursor: pointer; 167 cursor: pointer;
168 z-index: 2; 168 z-index: 2;
@@ -35,18 +35,22 @@ @@ -35,18 +35,22 @@
35 } 35 }
36 36
37 .brand-text-box { 37 .brand-text-box {
38 - $size: 16px; 38 + $size: 14px;
39 $line-height: 1.4; 39 $line-height: 1.4;
40 $lines-to-show: 3; 40 $lines-to-show: 3;
41 41
42 width: 0; 42 width: 0;
43 border: none; 43 border: none;
  44 + padding-top: 35px !important;
  45 + padding-bottom: 50px !important;
44 46
45 p { 47 p {
46 height: calc($size*$line-height*$lines-to-show); 48 height: calc($size*$line-height*$lines-to-show);
47 width: calc($width-2*$space); 49 width: calc($width-2*$space);
  50 + margin: 15px 0;
48 padding-right: $space; 51 padding-right: $space;
49 font-size: $size; 52 font-size: $size;
  53 + font-weight: bold;
50 line-height: $line-height; 54 line-height: $line-height;
51 overflow: hidden; 55 overflow: hidden;
52 -webkit-line-clamp: $lines-to-show; 56 -webkit-line-clamp: $lines-to-show;
@@ -55,6 +59,7 @@ @@ -55,6 +59,7 @@
55 } 59 }
56 60
57 button { 61 button {
  62 + width: 120px;
58 left: calc($width/2-$buttonWidth/2); /* stylelint-disable-line */ 63 left: calc($width/2-$buttonWidth/2); /* stylelint-disable-line */
59 } 64 }
60 65
@@ -115,12 +115,17 @@ @@ -115,12 +115,17 @@
115 height: 30px; 115 height: 30px;
116 } 116 }
117 117
  118 + .table-body {
  119 + height: 53px;
  120 + }
  121 +
118 .table-body td { 122 .table-body td {
119 padding: 8px 0 8px 10px; 123 padding: 8px 0 8px 10px;
120 } 124 }
121 125
122 .select-row { 126 .select-row {
123 border: solid 2px black; 127 border: solid 2px black;
  128 + height: 54px;
124 } 129 }
125 130
126 .width-name { 131 .width-name {
@@ -17,10 +17,13 @@ @@ -17,10 +17,13 @@
17 } 17 }
18 } 18 }
19 19
  20 + .good-info {
  21 + width: 515px !important;
  22 + }
  23 +
20 &.returns { 24 &.returns {
21 .good-info { 25 .good-info {
22 border: none; 26 border: none;
23 - width: 530px !important;  
24 27
25 .detail { 28 .detail {
26 width: 380px !important; 29 width: 380px !important;
1 .blk-cart-page { 1 .blk-cart-page {
2 .cart-header { 2 .cart-header {
3 - margin: 50px auto; 3 + margin: 10px auto;
4 width: 100%; 4 width: 100%;
5 padding: 30px; 5 padding: 30px;
6 border-bottom: 1px solid #eee; 6 border-bottom: 1px solid #eee;
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 11
12 .toggle-chk { 12 .toggle-chk {
13 span { 13 span {
14 - font-weight: bold; 14 + font-weight: normal;
15 } 15 }
16 .not-checked { 16 .not-checked {
17 color: #999; 17 color: #999;
@@ -38,8 +38,8 @@ @@ -38,8 +38,8 @@
38 } 38 }
39 39
40 .iconfont { 40 .iconfont {
41 - font-size: 16px;  
42 - line-height: 16px; 41 + font-size: 14px;
  42 + line-height: 14px;
43 } 43 }
44 44
45 .item { 45 .item {
@@ -63,9 +63,6 @@ $hoverColor: #379ed6; @@ -63,9 +63,6 @@ $hoverColor: #379ed6;
63 } 63 }
64 64
65 .toggle-chk-item { 65 .toggle-chk-item {
66 - span {  
67 - font-weight: bold;  
68 - }  
69 .not-checked { 66 .not-checked {
70 color: #999; 67 color: #999;
71 } 68 }
@@ -85,8 +82,8 @@ $hoverColor: #379ed6; @@ -85,8 +82,8 @@ $hoverColor: #379ed6;
85 } 82 }
86 83
87 .iconfont { 84 .iconfont {
88 - font-size: 16px;  
89 - line-height: 16px; 85 + font-size: 14px;
  86 + line-height: 14px;
90 } 87 }
91 88
92 .pro-info { 89 .pro-info {
@@ -672,6 +672,7 @@ @@ -672,6 +672,7 @@
672 .invoice-content-radio { 672 .invoice-content-radio {
673 display: inline-block; 673 display: inline-block;
674 cursor: pointer; 674 cursor: pointer;
  675 + width: 115px;
675 } 676 }
676 677
677 .row { 678 .row {
@@ -680,6 +681,11 @@ @@ -680,6 +681,11 @@
680 681
681 .iconfont { 682 .iconfont {
682 font-size: 16px; 683 font-size: 16px;
  684 + color: #e0e0e0;
  685 + }
  686 +
  687 + .checked {
  688 + color: #1b1b1b;
683 } 689 }
684 690
685 .input { 691 .input {
@@ -6,9 +6,6 @@ @@ -6,9 +6,6 @@
6 padding: 30px; 6 padding: 30px;
7 border: 1px solid #eee; 7 border: 1px solid #eee;
8 .toggle-chk { 8 .toggle-chk {
9 - span {  
10 - font-weight: bold;  
11 - }  
12 .not-checked { 9 .not-checked {
13 color: #999; 10 color: #999;
14 } 11 }
@@ -28,8 +25,8 @@ @@ -28,8 +25,8 @@
28 } 25 }
29 26
30 .iconfont { 27 .iconfont {
31 - font-size: 16px;  
32 - line-height: 16px; 28 + font-size: 14px;
  29 + line-height: 14px;
33 } 30 }
34 31
35 .action { 32 .action {
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 {{# sub_express_deatil}} 14 {{# sub_express_deatil}}
15 {{#if @first}} 15 {{#if @first}}
16 <div class="tip"> 16 <div class="tip">
17 - <p>以上为最新跟踪信息<a href='/me/order/detail?code={{order_code}}'>查看全部</a></p> 17 + <p>以上为最新跟踪信息<a href='/me/order/detail?orderCode={{order_code}}' target="_blank">查看全部</a></p>
18 </div> 18 </div>
19 {{/if}} 19 {{/if}}
20 {{/ sub_express_deatil}} 20 {{/ sub_express_deatil}}