Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0
Showing
22 changed files
with
65 additions
and
44 deletions
@@ -2,9 +2,8 @@ | @@ -2,9 +2,8 @@ | ||
2 | <div class="slide-wrapper"> | 2 | <div class="slide-wrapper"> |
3 | <ul> | 3 | <ul> |
4 | {{# slider}} | 4 | {{# slider}} |
5 | - <a href="{{url}}" target= "_blank"> | ||
6 | - <li class="banner-item" style="{{#if bgColor}}background-color:{{bgColor}}{{/if}}; background-image:url('{{image src 1150 570}}')"> | ||
7 | - </a> | 5 | + <li class="banner-item" style="{{#if bgColor}}background-color:{{bgColor}}{{/if}}; background-image:url('{{image src 1150 570}}')"> |
6 | + <a href="{{url}}" target= "_blank"></a> | ||
8 | {{# tips}} | 7 | {{# tips}} |
9 | <div class="slide-tips"> | 8 | <div class="slide-tips"> |
10 | <div class="g-mark"></div> | 9 | <div class="g-mark"></div> |
@@ -36,7 +36,6 @@ const _processListData = (list) => { | @@ -36,7 +36,6 @@ const _processListData = (list) => { | ||
36 | }); | 36 | }); |
37 | 37 | ||
38 | _.forEach(list.list.artList, (data) => { | 38 | _.forEach(list.list.artList, (data) => { |
39 | - // console.log(data) | ||
40 | 39 | ||
41 | if (data.author) { | 40 | if (data.author) { |
42 | listData = _.assign(listData, { | 41 | listData = _.assign(listData, { |
@@ -230,7 +229,7 @@ const _getRelatedData = (idList) => { | @@ -230,7 +229,7 @@ const _getRelatedData = (idList) => { | ||
230 | cnAlphabet: data.cn_alphabet | 229 | cnAlphabet: data.cn_alphabet |
231 | }); | 230 | }); |
232 | }); | 231 | }); |
233 | - | 232 | + console.log(productList); |
234 | return productList; | 233 | return productList; |
235 | } else { | 234 | } else { |
236 | logger.error('推荐商品 cood 不是 200'); | 235 | logger.error('推荐商品 cood 不是 200'); |
@@ -247,6 +246,7 @@ const _getRelatedData = (idList) => { | @@ -247,6 +246,7 @@ const _getRelatedData = (idList) => { | ||
247 | const _processContentData = (list) => { | 246 | const _processContentData = (list) => { |
248 | list = list || []; | 247 | list = list || []; |
249 | list = camelCase(list); | 248 | list = camelCase(list); |
249 | + console.log(list); | ||
250 | 250 | ||
251 | let contentData = { | 251 | let contentData = { |
252 | contents: [] | 252 | contents: [] |
@@ -282,6 +282,7 @@ const _processContentData = (list) => { | @@ -282,6 +282,7 @@ const _processContentData = (list) => { | ||
282 | if (value.goods) { | 282 | if (value.goods) { |
283 | 283 | ||
284 | _.forEach(value.goods.data, function(data) { | 284 | _.forEach(value.goods.data, function(data) { |
285 | + console.log(data); | ||
285 | 286 | ||
286 | idList += data.id + ','; | 287 | idList += data.id + ','; |
287 | related.relatedReco.push(data); | 288 | related.relatedReco.push(data); |
@@ -308,7 +309,10 @@ const _processContentData = (list) => { | @@ -308,7 +309,10 @@ const _processContentData = (list) => { | ||
308 | 309 | ||
309 | if (related.relatedReco) { | 310 | if (related.relatedReco) { |
310 | _.forEach(related.relatedReco, function(data, index) { | 311 | _.forEach(related.relatedReco, function(data, index) { |
312 | + data = _.assign(data, { | ||
311 | 313 | ||
314 | + // link: `${config.siteUrl}/product/list/pro_${result[index].id}_data.${data.productSkc}` | ||
315 | + }); | ||
312 | data = _.assign(data, result[index]); | 316 | data = _.assign(data, result[index]); |
313 | }); | 317 | }); |
314 | result.splice(0, recoLength.length); | 318 | result.splice(0, recoLength.length); |
@@ -87,6 +87,7 @@ const favorite = { | @@ -87,6 +87,7 @@ const favorite = { | ||
87 | 87 | ||
88 | ret.content.favorite.data = retData; | 88 | ret.content.favorite.data = retData; |
89 | ret.content.banner = thumb; | 89 | ret.content.banner = thumb; |
90 | + console.log(retData); | ||
90 | } | 91 | } |
91 | 92 | ||
92 | res.display('index', ret); | 93 | res.display('index', ret); |
@@ -20,7 +20,10 @@ const getAddressDataAsync = (uid, limit) => { | @@ -20,7 +20,10 @@ const getAddressDataAsync = (uid, limit) => { | ||
20 | method: 'app.address.gethidden', | 20 | method: 'app.address.gethidden', |
21 | uid: uid, | 21 | uid: uid, |
22 | limit: limit | 22 | limit: limit |
23 | - }).then(result => result); | 23 | + }).then(result => { |
24 | + console.log(result); | ||
25 | + return result; | ||
26 | + }); | ||
24 | }; | 27 | }; |
25 | 28 | ||
26 | 29 |
@@ -229,8 +229,6 @@ const _getDetail = (uid, code) => { | @@ -229,8 +229,6 @@ const _getDetail = (uid, code) => { | ||
229 | method: 'app.SpaceOrders.detail', | 229 | method: 'app.SpaceOrders.detail', |
230 | uid: uid, | 230 | uid: uid, |
231 | order_code: code | 231 | order_code: code |
232 | - }, { | ||
233 | - cache: 100 | ||
234 | }); | 232 | }); |
235 | }; | 233 | }; |
236 | 234 | ||
@@ -249,8 +247,6 @@ const _getUserOrder = (uid, type, page) => { | @@ -249,8 +247,6 @@ const _getUserOrder = (uid, type, page) => { | ||
249 | type: type, | 247 | type: type, |
250 | page: page, | 248 | page: page, |
251 | limit: pageSize | 249 | limit: pageSize |
252 | - }, { | ||
253 | - cache: 100 | ||
254 | }).then(result => { | 250 | }).then(result => { |
255 | let orderList = []; | 251 | let orderList = []; |
256 | let total = false; | 252 | let total = false; |
@@ -314,6 +310,10 @@ const _getUserOrder = (uid, type, page) => { | @@ -314,6 +310,10 @@ const _getUserOrder = (uid, type, page) => { | ||
314 | 310 | ||
315 | item.isRefundOrder = ot === 7; | 311 | item.isRefundOrder = ot === 7; |
316 | 312 | ||
313 | + if (parseInt(item.payLefttime, 10) !== 0) { | ||
314 | + item.showLeftTime = true; | ||
315 | + } | ||
316 | + | ||
317 | if (item.isCancel === 'Y') { | 317 | if (item.isCancel === 'Y') { |
318 | item.showBuyBtn = true; | 318 | item.showBuyBtn = true; |
319 | item.statusStr = '已取消'; | 319 | item.statusStr = '已取消'; |
@@ -398,8 +398,6 @@ const getExpressInfo = (uid, code) => { | @@ -398,8 +398,6 @@ const getExpressInfo = (uid, code) => { | ||
398 | method: 'app.express.get', | 398 | method: 'app.express.get', |
399 | uid: uid, | 399 | uid: uid, |
400 | order_code: code | 400 | order_code: code |
401 | - }, { | ||
402 | - cache: true | ||
403 | }); | 401 | }); |
404 | }; | 402 | }; |
405 | 403 | ||
@@ -511,7 +509,8 @@ const getOrderDetail = (uid, code) => { | @@ -511,7 +509,8 @@ const getOrderDetail = (uid, code) => { | ||
511 | detail.createTime = _convertUnixTime(detail.createTime); | 509 | detail.createTime = _convertUnixTime(detail.createTime); |
512 | 510 | ||
513 | if (detail.isCancel === 'N' && | 511 | if (detail.isCancel === 'N' && |
514 | - st === 0) { | 512 | + st === 0 && |
513 | + parseInt(detail.payLefttime, 10) !== 0) { | ||
515 | detail.showLeftTime = true; | 514 | detail.showLeftTime = true; |
516 | } | 515 | } |
517 | 516 |
@@ -21,13 +21,15 @@ | @@ -21,13 +21,15 @@ | ||
21 | <td class="width-opearte"> | 21 | <td class="width-opearte"> |
22 | <div> | 22 | <div> |
23 | <span class="blue opreation update-address" data-id="{{address_id}}">修改</span> | 23 | <span class="blue opreation update-address" data-id="{{address_id}}">修改</span> |
24 | - {{#if default}} | 24 | + |
25 | + <em class="op-sep {{#if default}}hide{{/if}}">|</em> | ||
26 | + <span class="blue opreation del-address {{#if default}}hide{{/if}}" data-id="{{address_id}}">删除</span> | ||
27 | + {{#if default}} | ||
25 | <span class="btn set-default opreation current-default" data-id={{address_id}}>默认地址</span> | 28 | <span class="btn set-default opreation current-default" data-id={{address_id}}>默认地址</span> |
26 | - {{else}} | ||
27 | - <em class="op-sep">|</em> | ||
28 | - <span class="blue opreation del-address" data-id="{{address_id}}">删除</span> | ||
29 | - <span class="btn set-default opreation " data-id={{address_id}}>设为默认</span> | ||
30 | - {{/if}} | 29 | + {{else}} |
30 | + <span class="btn set-default opreation " data-id={{address_id}}>设为默认</span> | ||
31 | + {{/if}} | ||
32 | + | ||
31 | </div> | 33 | </div> |
32 | </td> | 34 | </td> |
33 | </tr> | 35 | </tr> |
@@ -30,7 +30,8 @@ | @@ -30,7 +30,8 @@ | ||
30 | 30 | ||
31 | <div class="way"> | 31 | <div class="way"> |
32 | {{#if takeGoods}} | 32 | {{#if takeGoods}} |
33 | - <p class="contact">我们会尽快将您的商品发出,请耐心等待,如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094" target="_blank"><span class="iconfont"></span></a>在线客服</p> | 33 | + <p class="contact">我们会尽快将您的商品发出,请耐心等待,如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094" target="_blank"><span class="iconfont"></span>在线客服</a> |
34 | + </p> | ||
34 | {{/if}} | 35 | {{/if}} |
35 | 36 | ||
36 | {{#if reminder}} | 37 | {{#if reminder}} |
@@ -50,7 +51,7 @@ | @@ -50,7 +51,7 @@ | ||
50 | {{/if}} | 51 | {{/if}} |
51 | 52 | ||
52 | {{#if doubt}} | 53 | {{#if doubt}} |
53 | - <p class="contact">如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094" target="_blank"><span class="iconfont"></span>在线客服</p></a> | 54 | + <p class="contact">如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094" target="_blank"><span class="iconfont"></span>在线客服</a></p> |
54 | {{/if}} | 55 | {{/if}} |
55 | 56 | ||
56 | {{#if auditSuccess}} | 57 | {{#if auditSuccess}} |
@@ -22,7 +22,9 @@ | @@ -22,7 +22,9 @@ | ||
22 | {{#if showPayButton}} | 22 | {{#if showPayButton}} |
23 | <div class="pay-operation"> | 23 | <div class="pay-operation"> |
24 | {{#if isOnlinePaid}} | 24 | {{#if isOnlinePaid}} |
25 | + {{#if showLeftTime}} | ||
25 | <span class="iconfont hide-when-invalid"></span><p class="left-time" data-left="{{payLefttime}}"></p> | 26 | <span class="iconfont hide-when-invalid"></span><p class="left-time" data-left="{{payLefttime}}"></p> |
27 | + {{/if}} | ||
26 | <a href="{{payUrl}}"> | 28 | <a href="{{payUrl}}"> |
27 | <span class="btn red hide-when-invalid">立即付款</span> | 29 | <span class="btn red hide-when-invalid">立即付款</span> |
28 | </a> | 30 | </a> |
@@ -126,7 +126,6 @@ | @@ -126,7 +126,6 @@ | ||
126 | <div class="info"> | 126 | <div class="info"> |
127 | <p class="title" title="{{name}}">{{name}}</p> | 127 | <p class="title" title="{{name}}">{{name}}</p> |
128 | <p>颜色:{{color}} 尺码:{{size}}</p> | 128 | <p>颜色:{{color}} 尺码:{{size}}</p> |
129 | - <p>×{{num}}</p> | ||
130 | </div> | 129 | </div> |
131 | <div class="reason">{{reason}}</div> | 130 | <div class="reason">{{reason}}</div> |
132 | <div class="num">{{num}}</div> | 131 | <div class="num">{{num}}</div> |
@@ -91,10 +91,15 @@ const getProductItemData = (params, url, uid) => { | @@ -91,10 +91,15 @@ const getProductItemData = (params, url, uid) => { | ||
91 | let resData = {}; | 91 | let resData = {}; |
92 | let data = {}; | 92 | let data = {}; |
93 | 93 | ||
94 | + // 如果status为0,即商品下架时则返回空对象 | ||
95 | + if (!result.status) { | ||
96 | + return resData; | ||
97 | + } | ||
98 | + | ||
94 | if (!result.productName && | 99 | if (!result.productName && |
95 | !result.erpProductId && | 100 | !result.erpProductId && |
96 | !result.productPriceBo) { | 101 | !result.productPriceBo) { |
97 | - return data; | 102 | + return resData; |
98 | } | 103 | } |
99 | 104 | ||
100 | result.uid = uid; | 105 | result.uid = uid; |
@@ -106,8 +106,8 @@ if (isProduction) { | @@ -106,8 +106,8 @@ if (isProduction) { | ||
106 | Object.assign(module.exports, { | 106 | Object.assign(module.exports, { |
107 | appName: 'www.yohoblk.com for test', | 107 | appName: 'www.yohoblk.com for test', |
108 | domains: { | 108 | domains: { |
109 | - api: 'http://api-test1.yohops.com:9999/', | ||
110 | - service: 'http://service-test1.yohops.com:9999/', | 109 | + api: 'http://testapi.yoho.cn:28078/', |
110 | + service: 'http://testservice.yoho.cn:28077/', | ||
111 | search: 'http://192.168.102.216:8080/yohosearch/' | 111 | search: 'http://192.168.102.216:8080/yohosearch/' |
112 | }, | 112 | }, |
113 | useOneapm: true, | 113 | useOneapm: true, |
@@ -118,9 +118,6 @@ if (isProduction) { | @@ -118,9 +118,6 @@ if (isProduction) { | ||
118 | session: ['127.0.0.1:12111'], | 118 | session: ['127.0.0.1:12111'], |
119 | timeout: 1000, | 119 | timeout: 1000, |
120 | retries: 0 | 120 | retries: 0 |
121 | - }, | ||
122 | - pay: { | ||
123 | - serviceNotify: 'http://service-test1.yohops.com:9999/' | ||
124 | } | 121 | } |
125 | }); | 122 | }); |
126 | } | 123 | } |
@@ -74,14 +74,7 @@ | @@ -74,14 +74,7 @@ | ||
74 | </a> | 74 | </a> |
75 | </li> | 75 | </li> |
76 | </ul> | 76 | </ul> |
77 | - <div class="hot-search hide"> | ||
78 | - <a href="#">外套</a> | ||
79 | - <a href="#">长裤</a> | ||
80 | - <a href="#">大衣</a> | ||
81 | - <a href="#">毛衣</a> | ||
82 | - <a href="#">图案</a> | ||
83 | - <a href="#">简约连衣裙</a> | ||
84 | - </div> | 77 | + <div class="hot-search hide"></div> |
85 | </div> | 78 | </div> |
86 | </div> | 79 | </div> |
87 | </div> | 80 | </div> |
@@ -77,7 +77,8 @@ function getNavImg(code, dom) { | @@ -77,7 +77,8 @@ function getNavImg(code, dom) { | ||
77 | }, | 77 | }, |
78 | success: function(result) { | 78 | success: function(result) { |
79 | if (result.code === 200) { | 79 | if (result.code === 200) { |
80 | - dom.data('show', true).html('<img src="' + result.data.src + '">'); | 80 | + dom.data('show', true).html('<a href="' + result.data.url + |
81 | + '"><img src="' + result.data.src + '" title="' + result.data.title + '"></a>'); | ||
81 | } | 82 | } |
82 | } | 83 | } |
83 | }); | 84 | }); |
@@ -22,6 +22,7 @@ var $commentList = $commentArea.find('.comments-wrap'), | @@ -22,6 +22,7 @@ var $commentList = $commentArea.find('.comments-wrap'), | ||
22 | pag = 0; | 22 | pag = 0; |
23 | 23 | ||
24 | require('../plugins/share'); | 24 | require('../plugins/share'); |
25 | +require('../common/header'); | ||
25 | 26 | ||
26 | // require('yoho-unslider'); | 27 | // require('yoho-unslider'); |
27 | 28 |
@@ -11,6 +11,7 @@ var _alert = dialog.Alert; | @@ -11,6 +11,7 @@ var _alert = dialog.Alert; | ||
11 | 11 | ||
12 | require('../common/header'); | 12 | require('../common/header'); |
13 | require('../common/return-top'); | 13 | require('../common/return-top'); |
14 | +require('../common/header'); | ||
14 | 15 | ||
15 | $('.editorial-index-page').on('click', '.like-icon', function() { | 16 | $('.editorial-index-page').on('click', '.like-icon', function() { |
16 | var $this = $(this), | 17 | var $this = $(this), |
@@ -32,7 +33,7 @@ $('.editorial-index-page').on('click', '.like-icon', function() { | @@ -32,7 +33,7 @@ $('.editorial-index-page').on('click', '.like-icon', function() { | ||
32 | }).then(function(data) { | 33 | }).then(function(data) { |
33 | if (data.code === 200) { | 34 | if (data.code === 200) { |
34 | $this.next('b').html(data.data); | 35 | $this.next('b').html(data.data); |
35 | - $this.toggleClass('liked'); | 36 | + $this.toggleClass('liked'); |
36 | } else { | 37 | } else { |
37 | new _alert(data.message).show(); | 38 | new _alert(data.message).show(); |
38 | } | 39 | } |
@@ -10,6 +10,7 @@ var _alert = dialog.Alert; | @@ -10,6 +10,7 @@ var _alert = dialog.Alert; | ||
10 | 10 | ||
11 | require('../common/header'); | 11 | require('../common/header'); |
12 | require('../common/return-top'); | 12 | require('../common/return-top'); |
13 | +require('../common/header'); | ||
13 | 14 | ||
14 | lazyLoad($('.content-msg img.lazy')); | 15 | lazyLoad($('.content-msg img.lazy')); |
15 | 16 |
@@ -266,8 +266,12 @@ $(function() { | @@ -266,8 +266,12 @@ $(function() { | ||
266 | }, | 266 | }, |
267 | success: function(data) { | 267 | success: function(data) { |
268 | if (data.code === 200) { | 268 | if (data.code === 200) { |
269 | + $('.del-address').removeClass('hide'); | ||
270 | + $('.op-sep').removeClass('hide'); | ||
269 | $('.current-default').removeClass('current-default').text('设为默认'); | 271 | $('.current-default').removeClass('current-default').text('设为默认'); |
270 | $(self).addClass('current-default').text('默认地址'); | 272 | $(self).addClass('current-default').text('默认地址'); |
273 | + $(self).siblings('.del-address').addClass('hide'); | ||
274 | + $(self).siblings('.op-sep').addClass('hide'); | ||
271 | tbody.find('.table-body').eq(0).before('<tr class=\'table-body select-row\'>' + tr.html() + | 275 | tbody.find('.table-body').eq(0).before('<tr class=\'table-body select-row\'>' + tr.html() + |
272 | '</tr>'); | 276 | '</tr>'); |
273 | tr.remove(); | 277 | tr.remove(); |
@@ -277,11 +281,12 @@ $(function() { | @@ -277,11 +281,12 @@ $(function() { | ||
277 | 281 | ||
278 | } | 282 | } |
279 | }); | 283 | }); |
284 | + | ||
280 | }); | 285 | }); |
281 | 286 | ||
282 | 287 | ||
283 | // 选中某一行 | 288 | // 选中某一行 |
284 | - $(document).on('click', '.table-body', function() { | 289 | + $(document).on('mousemove', '.table-body', function() { |
285 | $('.table-body').removeClass('select-row'); | 290 | $('.table-body').removeClass('select-row'); |
286 | $(this).addClass('select-row'); | 291 | $(this).addClass('select-row'); |
287 | 292 |
@@ -90,7 +90,7 @@ $submitExpress.click(function() { | @@ -90,7 +90,7 @@ $submitExpress.click(function() { | ||
90 | $showExpress.on('click', '.reset-express', function() { | 90 | $showExpress.on('click', '.reset-express', function() { |
91 | var expressId = $showExpress.data('id'); | 91 | var expressId = $showExpress.data('id'); |
92 | 92 | ||
93 | - $expressCode.val(expressId); | 93 | + $expressCompany.val(expressId); |
94 | $showExpress.addClass('hide'); | 94 | $showExpress.addClass('hide'); |
95 | $editExpress.removeClass('hide'); | 95 | $editExpress.removeClass('hide'); |
96 | }); | 96 | }); |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | position: relative; | 19 | position: relative; |
20 | 20 | ||
21 | &.bottom-space { | 21 | &.bottom-space { |
22 | - margin-bottom: 15px; | 22 | + margin-bottom: 20px; |
23 | } | 23 | } |
24 | 24 | ||
25 | &.right-space { | 25 | &.right-space { |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | 49 | ||
50 | img { | 50 | img { |
51 | width: $bigImgWidth; | 51 | width: $bigImgWidth; |
52 | - height: calc($smallImgHeight*2+$space+4px); | 52 | + height: calc($smallImgHeight*2+$space+10px); |
53 | } | 53 | } |
54 | } | 54 | } |
55 | 55 |
@@ -67,16 +67,18 @@ | @@ -67,16 +67,18 @@ | ||
67 | .contact { | 67 | .contact { |
68 | line-height: 50px; | 68 | line-height: 50px; |
69 | height: 50px; | 69 | height: 50px; |
70 | - color: #219dd6; | ||
71 | 70 | ||
72 | span { | 71 | span { |
73 | margin-left: 20px; | 72 | margin-left: 20px; |
74 | } | 73 | } |
75 | 74 | ||
75 | + a { | ||
76 | + color: #219dd6; | ||
77 | + } | ||
78 | + | ||
76 | .iconfont { | 79 | .iconfont { |
77 | font-size: 12px; | 80 | font-size: 12px; |
78 | margin-right: 5px; | 81 | margin-right: 5px; |
79 | - color: #219dd6; | ||
80 | } | 82 | } |
81 | } | 83 | } |
82 | } | 84 | } |
-
Please register or login to post a comment