...
|
...
|
@@ -4,18 +4,18 @@ const _ = require('lodash'); |
|
|
const api = require('../models/new-user-api');
|
|
|
|
|
|
const check = (uid) => {
|
|
|
return api.getUserOrders(uid).then((result) => {
|
|
|
return api.getUserSuccessfulOrders(uid).then((result) => {
|
|
|
if (result.code !== 200) {
|
|
|
return {};
|
|
|
}
|
|
|
|
|
|
if (!_.isEmpty(_.get(result, 'data.order_list', []))) {
|
|
|
if (_.get(result, 'data.total', 0) !== 0) {
|
|
|
return {
|
|
|
isNew: true
|
|
|
isNew: false
|
|
|
};
|
|
|
} else {
|
|
|
return {
|
|
|
isNew: false
|
|
|
isNew: true
|
|
|
};
|
|
|
}
|
|
|
|
...
|
...
|
|