Authored by zhangxiaoru

help

1 {{# classicBrands}} 1 {{# classicBrands}}
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">  
4 {{# big}} 3 {{# big}}
5 - <img class="big-img" src="{{image src 565 340}}" alt="big-img"> 4 + <a href="{{url}}" target="_blank">
  5 + <img class="big-img" src="{{image src 565 340}}">
  6 + </a>
6 {{/ big}} 7 {{/ big}}
  8 +
7 {{# small}} 9 {{# small}}
8 - <img class="small-img {{#if @first}}first{{/if}}" src="{{image src 281 285}}" alt="big-img">  
9 - {{/ small}} 10 + <a href="{{url}}" target="_blank">
  11 + <img class="small-img {{#if @first}}first{{/if}}" src="{{image src 281 285}}">
10 </a> 12 </a>
  13 + {{/ small}}
11 </div> 14 </div>
12 {{/ classicBrands}} 15 {{/ classicBrands}}
@@ -15,9 +15,11 @@ @@ -15,9 +15,11 @@
15 {{/each}} 15 {{/each}}
16 </ul> 16 </ul>
17 {{#banner}} 17 {{#banner}}
  18 + {{#if image}}
18 <a href="{{url}}"> 19 <a href="{{url}}">
19 <img class="banner-img" data-original="{{image banner 150 120}}"> 20 <img class="banner-img" data-original="{{image banner 150 120}}">
20 </a> 21 </a>
  22 + {{/if}}
21 {{/banner}} 23 {{/banner}}
22 </div> 24 </div>
23 25
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 <div class="brand-products slide-container"> 26 <div class="brand-products slide-container">
27 {{#if noNewProduct}} 27 {{#if noNewProduct}}
28 <p class="no-product-info"> 28 <p class="no-product-info">
29 - 暂无新品, 去<a href="/{{siteUrl}}/brand" target="_blank">名牌频道</a>看看吧 29 + 暂无新品, 去<a href="/product/shop/{{brandDomain}}{{#if shopId}}?shopId={{shopId}}{{/if}}" target="_blank">名牌频道</a>看看吧
30 </p> 30 </p>
31 {{^}} 31 {{^}}
32 <div class="slide-switch"> 32 <div class="slide-switch">
@@ -103,8 +103,9 @@ const list = { @@ -103,8 +103,9 @@ const list = {
103 data.filter.groupSort = DataHelper.sortConvert(sortData.data.sort); 103 data.filter.groupSort = DataHelper.sortConvert(sortData.data.sort);
104 retData.filter = DataHelper.filterHandle(data.filter, q); 104 retData.filter = DataHelper.filterHandle(data.filter, q);
105 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 106 +
  107 + // retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0)
  108 + // || (data.standard && data.standard.length > 0); //eslint-disable-line
108 } 109 }
109 110
110 retData.navPath = { 111 retData.navPath = {
@@ -212,7 +212,7 @@ const setPathNav = (data, name, channel) => { @@ -212,7 +212,7 @@ const setPathNav = (data, name, channel) => {
212 212
213 if (!_.isEmpty(sort)) { 213 if (!_.isEmpty(sort)) {
214 navs.push({ 214 navs.push({
215 - link: helpers.urlFormat('/list', { 215 + link: helpers.urlFormat('/product/list', {
216 msort: sort.sort_id, 216 msort: sort.sort_id,
217 gender: gender 217 gender: gender
218 }), 218 }),
@@ -223,7 +223,7 @@ const setPathNav = (data, name, channel) => { @@ -223,7 +223,7 @@ const setPathNav = (data, name, channel) => {
223 // 二级分类 223 // 二级分类
224 if (!_.isEmpty(sort.sub)) { 224 if (!_.isEmpty(sort.sub)) {
225 navs.push({ 225 navs.push({
226 - link: helpers.urlFormat('/list', { 226 + link: helpers.urlFormat('/product/list', {
227 msort: sort.sort_id, 227 msort: sort.sort_id,
228 misort: sort.sub.sort_id, 228 misort: sort.sub.sort_id,
229 gender: gender 229 gender: gender
@@ -379,6 +379,11 @@ const setProductData = base => { @@ -379,6 +379,11 @@ const setProductData = base => {
379 // 默认第一张图片 379 // 默认第一张图片
380 if (!_.has(resData, 'img')) { 380 if (!_.has(resData, 'img')) {
381 resData.img = value.colorImage; 381 resData.img = value.colorImage;
  382 +
  383 + // 只有一张图时不显示左右切换箭头
  384 + if (thumbs.length < 2) {
  385 + resData.btnsHide = true;
  386 + }
382 } 387 }
383 388
384 // 商品尺码列表 389 // 商品尺码列表
@@ -35,24 +35,24 @@ function _paramHanlde(obj) { @@ -35,24 +35,24 @@ function _paramHanlde(obj) {
35 // obj.standard = JSON.stringify(standards); 35 // obj.standard = JSON.stringify(standards);
36 // } 36 // }
37 37
38 - let _gender;  
39 -  
40 - if (obj.yh_channel) {  
41 - switch (obj.yh_channel) {  
42 - case 'men':  
43 - _gender = '1,3';  
44 - break;  
45 - case 'women':  
46 - _gender = '2,3';  
47 - break;  
48 - default:  
49 - break;  
50 - }  
51 - } 38 + // let _gender;
  39 + //
  40 + // if (obj.yh_channel) {
  41 + // switch (obj.yh_channel) {
  42 + // case 'men':
  43 + // _gender = '1,3';
  44 + // break;
  45 + // case 'women':
  46 + // _gender = '2,3';
  47 + // break;
  48 + // default:
  49 + // break;
  50 + // }
  51 + // }
52 52
53 - if (obj.gender || _gender) {  
54 - obj.gender = obj.gender || _gender;  
55 - } 53 + // if (obj.gender || _gender) {
  54 + // obj.gender = obj.gender || _gender;
  55 + // }
56 return obj; 56 return obj;
57 } 57 }
58 58
@@ -157,15 +157,16 @@ const ShopService = { @@ -157,15 +157,16 @@ const ShopService = {
157 } 157 }
158 info.resources = resources; 158 info.resources = resources;
159 info.menus = shopMenu(domain, resources.navigationBar); 159 info.menus = shopMenu(domain, resources.navigationBar);
160 - } else { 160 + }
  161 + if (info.brandId) {
161 let brandInfo = yield BrandService.getBrandInfo(info.brandId, uid); 162 let brandInfo = yield BrandService.getBrandInfo(info.brandId, uid);
162 163
163 - info.name = brandInfo.brandName; 164 + info.name = info.name || brandInfo.brandName;
164 165
165 // info.info = brandInfo.brandIntro; 166 // info.info = brandInfo.brandIntro;
166 info.btnName = '品牌介绍'; 167 info.btnName = '品牌介绍';
167 - info.isFavorite = brandInfo.isFavorite === 'Y';  
168 - info.banner = info.brandBanner; 168 + info.isFavorite = info.isFavorite || (brandInfo.isFavorite === 'Y');
  169 + info.banner = info.banner || info.brandBanner;
169 } 170 }
170 return info; 171 return info;
171 })(); 172 })();
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <div class="thumbs left clearfix"> 11 <div class="thumbs left clearfix">
12 <div class="thumb-show right"> 12 <div class="thumb-show right">
13 <img id="main-thumb" src="{{image img 482 643}}" style="display: block;"> 13 <img id="main-thumb" src="{{image img 482 643}}" style="display: block;">
14 - <div class="check-btns"> 14 + <div class="check-btns{{#if btnsHide}} hide{{/if}}">
15 <span class="iconfont pre-thumb">&#xe62c;</span> 15 <span class="iconfont pre-thumb">&#xe62c;</span>
16 <span class="iconfont next-thumb">&#xe629;</span> 16 <span class="iconfont next-thumb">&#xe629;</span>
17 </div> 17 </div>
@@ -202,7 +202,7 @@ @@ -202,7 +202,7 @@
202 {{# basic}} 202 {{# basic}}
203 <li> 203 <li>
204 <label class="title">{{key}}<span></span></label> 204 <label class="title">{{key}}<span></span></label>
205 - : {{value}} 205 + : <span class="info">{{value}}</span>
206 </li> 206 </li>
207 {{/ basic}} 207 {{/ basic}}
208 </ul> 208 </ul>
@@ -211,7 +211,7 @@ @@ -211,7 +211,7 @@
211 {{# comfort}} 211 {{# comfort}}
212 <li> 212 <li>
213 <label class="title">{{name}}<span></span></label> 213 <label class="title">{{name}}<span></span></label>
214 - : <span class="min-des">{{minDes}}</span> 214 + : <span class="min-des info">{{minDes}}</span>
215 {{# blocks}} 215 {{# blocks}}
216 <span class="comfort-block{{#if cur}} cur{{/if}}"></span> 216 <span class="comfort-block{{#if cur}} cur{{/if}}"></span>
217 {{/ blocks}} 217 {{/ blocks}}
@@ -171,7 +171,7 @@ @@ -171,7 +171,7 @@
171 <div class="style-body nano"> 171 <div class="style-body nano">
172 <div class="nano-content"> 172 <div class="nano-content">
173 {{#each style}} 173 {{#each style}}
174 - <div class="input-radio" data-value="{{styleId}}"> 174 + <div class="input-radio {{#if checked}}default-check{{/if}}" data-value="{{styleId}}">
175 {{> icon/radio }} 175 {{> icon/radio }}
176 <label>{{styleName}}</label> 176 <label>{{styleName}}</label>
177 </div> 177 </div>
@@ -23,7 +23,7 @@ module.exports = { @@ -23,7 +23,7 @@ module.exports = {
23 }, 23 },
24 cookieDomain: 'yohoblk.com', 24 cookieDomain: 'yohoblk.com',
25 domains: { 25 domains: {
26 - singleApi: 'http://192.168.102.31:8092/brower', 26 + singleApi: 'http://192.168.102.31:8092/',
27 api: 'http://api-test1.yohops.com:9999/', 27 api: 'http://api-test1.yohops.com:9999/',
28 service: 'http://service-test1.yohops.com:9999/', 28 service: 'http://service-test1.yohops.com:9999/',
29 search: 'http://192.168.102.216:8080/yohosearch/' 29 search: 'http://192.168.102.216:8080/yohosearch/'
@@ -48,7 +48,8 @@ module.exports = { @@ -48,7 +48,8 @@ module.exports = {
48 name: 'error', 48 name: 'error',
49 level: 'error', 49 level: 'error',
50 filename: 'logs/error.log', 50 filename: 'logs/error.log',
51 - handleExceptions: true 51 + handleExceptions: true,
  52 + maxFiles: 7
52 }, 53 },
53 udp: { // send by udp 54 udp: { // send by udp
54 measurement: 'yohoblk_pc_log', 55 measurement: 'yohoblk_pc_log',
@@ -110,7 +111,7 @@ if (isProduction) { @@ -110,7 +111,7 @@ if (isProduction) {
110 Object.assign(module.exports, { 111 Object.assign(module.exports, {
111 appName: 'www.yohoblk.com for test', 112 appName: 'www.yohoblk.com for test',
112 domains: { 113 domains: {
113 - singleApi: process.env.TEST_SINGLEAPI || 'http://192.168.102.31:8092/brower', 114 + singleApi: process.env.TEST_SINGLEAPI || 'http://192.168.102.31:8092/',
114 api: process.env.TEST_API || 'http://testapi.yoho.cn:28078/', 115 api: process.env.TEST_API || 'http://testapi.yoho.cn:28078/',
115 service: process.env.TEST_SERVICE || 'http://testservice.yoho.cn:28077/', 116 service: process.env.TEST_SERVICE || 'http://testservice.yoho.cn:28077/',
116 search: process.env.TEST_SEARCH || 'http://192.168.102.216:8080/yohosearch/' 117 search: process.env.TEST_SEARCH || 'http://192.168.102.216:8080/yohosearch/'
@@ -62,7 +62,7 @@ function changeThumb($dom) { @@ -62,7 +62,7 @@ function changeThumb($dom) {
62 } 62 }
63 63
64 function chooseDefaultSize() { 64 function chooseDefaultSize() {
65 - var $item = $sizeList.not('.hide').children(); 65 + var $item = $sizeList.not('.hide').children().not('.disable');
66 66
67 if ($colorItem && $colorItem.length === 1 && 67 if ($colorItem && $colorItem.length === 1 &&
68 $item && $item.length === 1) { 68 $item && $item.length === 1) {
@@ -342,6 +342,10 @@ var YohoListPage = { @@ -342,6 +342,10 @@ var YohoListPage = {
342 $('.style-body .input-radio', this.rootDoc).check({ 342 $('.style-body .input-radio', this.rootDoc).check({
343 type: 'radio' 343 type: 'radio'
344 }); 344 });
  345 + $('.style-body .input-radio.default-check', this.rootDoc).check({
  346 + type: 'radio',
  347 + checked: true
  348 + });
345 YohoListPage.mulitStyle = false; 349 YohoListPage.mulitStyle = false;
346 $('.style-mulit-btn .btn').addClass('white'); 350 $('.style-mulit-btn .btn').addClass('white');
347 }, 351 },
@@ -357,6 +361,7 @@ var YohoListPage = { @@ -357,6 +361,7 @@ var YohoListPage = {
357 filterBrand: function(letter) { 361 filterBrand: function(letter) {
358 $('.yoho-product-list .brand-list .input-radio').each(function() { 362 $('.yoho-product-list .brand-list .input-radio').each(function() {
359 var first = $(this).data('word').toString(); // eslint-disable-line 363 var first = $(this).data('word').toString(); // eslint-disable-line
  364 + var name = $(this).find('label').text().toLowerCase();
360 365
361 first = first.toLowerCase(); 366 first = first.toLowerCase();
362 if (letter === '0-9') { 367 if (letter === '0-9') {
@@ -366,7 +371,7 @@ var YohoListPage = { @@ -366,7 +371,7 @@ var YohoListPage = {
366 $(this).show(); 371 $(this).show();
367 } 372 }
368 } else { 373 } else {
369 - if (!letter || first === letter) { 374 + if (!letter || first === letter || name.indexOf(letter) === 0) {
370 $(this).show(); 375 $(this).show();
371 } else { 376 } else {
372 $(this).hide(); 377 $(this).hide();
@@ -449,7 +454,7 @@ var YohoListPage = { @@ -449,7 +454,7 @@ var YohoListPage = {
449 }, 454 },
450 455
451 go: function(q) { 456 go: function(q) {
452 - var qs = $.extend(common.queryString(), q); 457 + var qs = $.extend(common.queryString(), q, {page: q.page || 1});
453 458
454 location.search = $.param(qs); 459 location.search = $.param(qs);
455 }, 460 },
@@ -289,6 +289,10 @@ @@ -289,6 +289,10 @@
289 padding-left: 100%; 289 padding-left: 100%;
290 } 290 }
291 } 291 }
  292 +
  293 + .info {
  294 + margin-left: 4px;
  295 + }
292 } 296 }
293 297
294 .des-basic { 298 .des-basic {
@@ -315,6 +319,9 @@ @@ -315,6 +319,9 @@
315 height: 12px; 319 height: 12px;
316 border: 1px solid #1d1d1d; 320 border: 1px solid #1d1d1d;
317 display: inline-block; 321 display: inline-block;
  322 + margin: 0 4px;
  323 + position: relative;
  324 + top: 1px;
318 } 325 }
319 326
320 .comfort-block.cur { 327 .comfort-block.cur {
@@ -385,13 +385,14 @@ @@ -385,13 +385,14 @@
385 } 385 }
386 386
387 .goods-img-list { 387 .goods-img-list {
388 - margin: 2px 10px; 388 + margin: 2px 0 2px 10px;
389 float: left; 389 float: left;
390 390
391 .goods-img-col { 391 .goods-img-col {
392 display: inline-block; 392 display: inline-block;
393 vertical-align: top; 393 vertical-align: top;
394 width: 60px; 394 width: 60px;
  395 + margin-right: 10px;
395 } 396 }
396 397
397 img { 398 img {
@@ -125,6 +125,15 @@ @@ -125,6 +125,15 @@
125 padding: 5px; 125 padding: 5px;
126 margin-top: 8px; 126 margin-top: 8px;
127 } 127 }
  128 +
  129 + .consignee {
  130 + display: block;
  131 + float: left;
  132 + max-width: 140px;
  133 + overflow: hidden;
  134 + white-space: nowrap;
  135 + text-overflow: ellipsis;
  136 + }
128 } 137 }
129 138
130 .address-chosed { 139 .address-chosed {
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 </p> 10 </p>
11 11
12 <p class="name-and-phone"> 12 <p class="name-and-phone">
13 - {{consignee}} 13 + <em class="consignee">{{consignee}}</em>
14 <span class="phone bold">{{mobile}}</span> 14 <span class="phone bold">{{mobile}}</span>
15 </p> 15 </p>
16 16