...
|
...
|
@@ -25,6 +25,13 @@ const addTicket = co(function * (uid, sku, count, yohoCoin) { |
|
|
let ticketInfo = yield api.add(uid, sku, count, yohoCoin);
|
|
|
let result = {};
|
|
|
|
|
|
if (_.isEmpty(ticketInfo)) {
|
|
|
return {
|
|
|
last_order_amount: 0,
|
|
|
error: '人太多啦,稍后再试!'
|
|
|
};
|
|
|
}
|
|
|
|
|
|
if (ticketInfo.code !== 200) {
|
|
|
return {
|
|
|
last_order_amount: 0,
|
...
|
...
|
@@ -43,6 +50,13 @@ const addTicket = co(function * (uid, sku, count, yohoCoin) { |
|
|
const submitTicket = co(function * (uid, sku, count, mobile, yohoCoin) {
|
|
|
let result = yield api.submit(uid, sku, count, mobile, yohoCoin);
|
|
|
|
|
|
if (_.isEmpty(result)) {
|
|
|
return {
|
|
|
code: 500,
|
|
|
message: '人太多啦,稍后再试!'
|
|
|
};
|
|
|
}
|
|
|
|
|
|
if (result.code !== 200) {
|
|
|
return {
|
|
|
code: result.code,
|
...
|
...
|
|