Authored by htoooth

fix api

1 'use strict'; 1 'use strict';
2 2
  3 +const _ = require('lodash');
3 const api = require('../models/new-user-api'); 4 const api = require('../models/new-user-api');
4 5
5 const check = (uid) => { 6 const check = (uid) => {
@@ -8,7 +9,16 @@ const check = (uid) => { @@ -8,7 +9,16 @@ const check = (uid) => {
8 return {}; 9 return {};
9 } 10 }
10 11
11 - 12 + if (!_.isEmpty(_.get(result, 'data.order_list', []))) {
  13 + return {
  14 + isNew: true
  15 + };
  16 + } else {
  17 + return {
  18 + isNew: false
  19 + };
  20 + }
  21 +
12 }); 22 });
13 }; 23 };
14 24