Authored by 姜枫

fix 我的订单列表查询问题

... ... @@ -26,8 +26,8 @@ exports.order = (req, res, next) => {
// 获取第一页数据做服务端渲染
let initialData = {
type: 1,
page: 1,
type: req.query.type || 1,
page: req.query.page || 1,
gender: req.query.gender || '1,3',
yh_channel: req.query.channel || 1,
uid: req.user.uid
... ... @@ -46,6 +46,7 @@ exports.order = (req, res, next) => {
title: 'Yoho!Buy 有货',
pageFooter: true,
order: result[0] || [],
walkwayUrl: result[1] && result[1].length ? '' : '//m.yohobuy.com/product/new',
firstPageOrdersList: result[1] || []
});
}).catch(next);
... ...
... ... @@ -9,11 +9,11 @@
</ul>
<div id="order-container" class="order-container">
{{#if walkwayUrl}}
{{#if @root.walkwayUrl}}
<div class="no-order">
<div class="icon"></div>
<span>你还没有订单!</span>
<a class="walk-way" href="{{walkwayUrl}}">随便逛逛</a>
<a class="walk-way" href="{{@root.walkwayUrl}}">随便逛逛</a>
</div>
{{^}}
<div class="firstscreen-orders">
... ...
<div class="order-good" data-id="{{id}}">
<div class="thumb-wrap">
{{#if link}}
<a href="{{link}}"><img class="thumb lazy" data-original="{{image thumb 90 120}}"></a>
<a href="{{link}}"><img class="thumb" src="{{image thumb 90 120}}"></a>
{{else}}
<img class="thumb lazy" data-original="{{image thumb 90 120}}">
<img class="thumb" src="{{image thumb 90 120}}">
{{/if}}
<p class="tag{{#if gift}} gift-tag{{/if}}{{#if advanceBuy}} advance-buy-tag{{/if}}"></p>
</div>
... ...