Authored by lijing

简写返回promise对象

... ... @@ -19,7 +19,7 @@ const _activity = () => {
const _user = (params) => {
if (!params.uid) {
return {};
return Promise.resolve();
}
return api.get('', {
method: 'app.passport.profile',
... ... @@ -388,9 +388,7 @@ const getOrders = (params) => {
let finalResult = [];
if (!params.uid) {
return new Promise(function(resolve){
resolve();
});
return Promise.resolve();
}
return _getOrderData(params).then(result => {
if (result.data && result.data.page_total && params.page <= result.data.page_total && result.data.order_list) {
... ...