Authored by biao

update for return list banner

@@ -16,15 +16,18 @@ const index = (req, res, next) => { @@ -16,15 +16,18 @@ const index = (req, res, next) => {
16 const uid = req.user.uid; 16 const uid = req.user.uid;
17 const page = req.query.page; 17 const page = req.query.page;
18 18
19 - returns.getUserReturn(uid, page).then(result => { 19 + Promise.all([returns.getUserReturn(uid, page), mcHandler.getMeThumb()]).then(result => {
  20 + const pageData = result[0];
  21 + const thumb = result[1];
  22 +
20 res.display('index', { 23 res.display('index', {
21 page: 'return-list', 24 page: 'return-list',
22 isMe: true, 25 isMe: true,
23 content: Object.assign({ 26 content: Object.assign({
24 nav: mcHandler.getMeCrumb('我的退/换货'), 27 nav: mcHandler.getMeCrumb('我的退/换货'),
25 navigation: mcHandler.getSideMenu('我的退/换货'), 28 navigation: mcHandler.getSideMenu('我的退/换货'),
26 - banner: 'http://placehold.it/{width}x{height}'  
27 - }, result) 29 + banner: thumb
  30 + }, pageData)
28 }); 31 });
29 }).catch(next); 32 }).catch(next);
30 }; 33 };
1 var _alert = require('../plugins/dialog').Alert; 1 var _alert = require('../plugins/dialog').Alert;
  2 +var lazyLoad = require('yoho-jquery-lazyload');
  3 +
  4 +lazyLoad($('img.banner-img'));
2 5
3 $('.cancel-apply').on('click', function() { 6 $('.cancel-apply').on('click', function() {
4 var id = $(this).data('applyId'); 7 var id = $(this).data('applyId');