|
|
const api = global.yoho.API;
|
|
|
const camelCase = global.yoho.camelCase;
|
|
|
|
|
|
const _getUserOrder = () => {
|
|
|
return api.get('', {
|
|
|
method: 'app.SpaceOrders.get',
|
|
|
uid: '10931021',
|
|
|
type: 1,
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
}).then(result => {
|
|
|
const orderList = result && result.data && result.data.order_list || [];
|
|
|
|
|
|
return camelCase(orderList);
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const getOrderData = () => {
|
|
|
return {
|
|
|
order: {
|
|
|
return _getUserOrder().then(result => {
|
|
|
const fakeData = {
|
|
|
title: '我的订单',
|
|
|
tabs: [
|
|
|
{
|
...
|
...
|
@@ -17,85 +34,17 @@ const getOrderData = () => { |
|
|
type: 'delivering'
|
|
|
}
|
|
|
],
|
|
|
showSearch: true,
|
|
|
orders: [
|
|
|
{
|
|
|
orderTime: '2016-07-10 12:30:11',
|
|
|
validLeftTime: '1时35分',
|
|
|
serialNumber: '887625272',
|
|
|
showMobile: true,
|
|
|
cost: '1200.00',
|
|
|
status: '待付款',
|
|
|
showPayButton: true,
|
|
|
showEditOption: true,
|
|
|
payVia: '在线支付',
|
|
|
goods: [
|
|
|
{
|
|
|
img: '//placehold.it/{width}x{height}',
|
|
|
name: '一件非常非常潮的衣服,因为刚从洗衣机里拿出来',
|
|
|
price: '32000.00',
|
|
|
color: '雪白',
|
|
|
size: '39码',
|
|
|
quantity: 5
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
orderTime: '2016-07-10 12:30:11',
|
|
|
serialNumber: '887625272',
|
|
|
showMobile: true,
|
|
|
cost: '1200.00',
|
|
|
status: '交易完成',
|
|
|
payVia: '在线支付',
|
|
|
goods: [
|
|
|
{
|
|
|
img: '//placehold.it/{width}x{height}',
|
|
|
name: '一件非常非常潮的衣服,因为刚从洗衣机里拿出来',
|
|
|
price: '32000.00',
|
|
|
color: '雪白',
|
|
|
size: '39码',
|
|
|
quantity: 5
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
showEditOption: true,
|
|
|
orderTime: '2016-07-10 12:30:11',
|
|
|
serialNumber: '887625272',
|
|
|
showMobile: true,
|
|
|
cost: '1200.00',
|
|
|
status: '备货中',
|
|
|
payVia: '在线支付',
|
|
|
goods: [
|
|
|
{
|
|
|
img: '//placehold.it/{width}x{height}',
|
|
|
name: '一件非常非常潮的衣服,因为刚从洗衣机里拿出来',
|
|
|
price: '32000.00',
|
|
|
color: '雪白',
|
|
|
size: '39码',
|
|
|
quantity: 5
|
|
|
},
|
|
|
{
|
|
|
img: '//placehold.it/{width}x{height}',
|
|
|
name: '一件非常非常潮的衣服,因为刚从洗衣机里拿出来',
|
|
|
price: '32000.00',
|
|
|
color: '雪白',
|
|
|
size: '39码',
|
|
|
quantity: 5
|
|
|
},
|
|
|
{
|
|
|
img: '//placehold.it/{width}x{height}',
|
|
|
name: '一件非常非常潮的衣服,因为刚从洗衣机里拿出来',
|
|
|
price: '32000.00',
|
|
|
color: '雪白',
|
|
|
size: '39码',
|
|
|
quantity: 5
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
showSearch: true
|
|
|
};
|
|
|
|
|
|
const order = Object.assign(fakeData, {
|
|
|
orderList: result
|
|
|
});
|
|
|
|
|
|
return {
|
|
|
order: order
|
|
|
};
|
|
|
});
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
...
|
...
|
|