Authored by 郭成尧

Merge branch 'feature/usercenter' of git.yoho.cn:fe/yohobuywap-node into feature/usercenter

... ... @@ -26,7 +26,45 @@ exports.orderDetail = (req, res, next) => {
page: 'index',
title: 'Yoho!Buy 有货',
pageHeader: headerData,
pageFooter: true
pageFooter: true,
orderDetail: [
{
'orderNum': '1111',
'pay_expire': '2016-07-28 17:26:28',
'user_confirm_paid': 'N',
'payment_type_str': '在线支付',
'use_limit_code': 'Y',
'is_cancel': 'N',
'uid': '20000266',
'update_time': '0',
'name': '张三',
'phoneNum': '15999999999',
'isVirtual': false,
'mobile': '15999999999',
'orderNum': '1606688700',
'address': '测试地址测试地址测试地址测试地址',
'orderStatus': '已取消',
'orderTime': '2016-08-17 11:24:28',
'logisticsUrl': '#',
'logisticsCompany': '顺丰',
'logisticsNum': '111111',
'yohoCoin': '999',
'invoice': {
'title': '有货',
'contentValue': '有货',
'pdfUrl': '#'
},
'qrcode': '#',
'orderBalance': [{
'promotion': '商品总金额',
'account': '100.00'
}, {
'promotion': '运费',
'account': '10.00'
}],
'price': '999.99'
}
]
}));
}
}).catch(next);
... ...
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/8/10
* Time: 13:43
*/
'use strict';
const api = global.yoho.API;
const singleAPI = global.yoho.SingleAPI;
const helpers = global.yoho.helpers;
const camelCase = global.yoho.camelCase;
/**
* 个人详情数据
*/
const _viewOrderData = (orderCode, uid, sessionKey) => {
return api.get('', {
method: 'app.SpaceOrders.detail',
orderCode: orderCode,
uid: uid,
sessionKey: sessionKey
}, {code: 200});
};
const orderDetail = (orderCode, uid, sessionKey) => {
let result = {
};
return api.all([
_viewOrderData(1, 10851797, 1)
]).then(result => {
console.log(result[0].data);
return result;
});
};
module.exports = {
orderDetail
};
test
<div class="order-detail-page yoho-page">
{{# orderDetail}}
<div id="order-detail" data-id="{{orderNum}}">
... ...