...
|
...
|
@@ -14,6 +14,8 @@ const returnsAPI = require('./returns-api'); |
|
|
|
|
|
const helpers = global.yoho.helpers;
|
|
|
|
|
|
const pageSize = 10;
|
|
|
|
|
|
const getUserReturn = (uid, page) => {
|
|
|
|
|
|
return api.get('', {
|
...
|
...
|
@@ -33,6 +35,14 @@ const getUserReturn = (uid, page) => { |
|
|
|
|
|
const data = camelCase(result.data);
|
|
|
|
|
|
const paginationOpts = data.total > pageSize ? {
|
|
|
paginationOpts: {
|
|
|
total: data.total,
|
|
|
page: data.page,
|
|
|
limit: pageSize
|
|
|
}
|
|
|
} : false;
|
|
|
|
|
|
data.list.forEach(item => {
|
|
|
item.orderGoods = item.goods;
|
|
|
item.createTime = item.orderCreateTime;
|
...
|
...
|
@@ -46,7 +56,7 @@ const getUserReturn = (uid, page) => { |
|
|
});
|
|
|
|
|
|
return {
|
|
|
returnsList: Object.assign(data, basicData)
|
|
|
returnsList: Object.assign(data, paginationOpts, basicData)
|
|
|
};
|
|
|
});
|
|
|
};
|
...
|
...
|
|