diff --git a/doc/Shop.py b/doc/Shop.py index ec2c3f7e..2bd85ece 100644 --- a/doc/Shop.py +++ b/doc/Shop.py @@ -102,7 +102,8 @@ class Shop(object): 'group': 'Shop', 'url': 'webapp/index.php?c=Shop&a=buyGoodsDirect', 'params': [ - _common.ReqHead(), + ['account_id', '', '账号id'], + ['order_id', '', '订单id'], ['id', 0, '商品唯一id,参见shopGoods表'], ['token_type', '', "选用币种"], ['goods_num', 0, '商品数量'], diff --git a/webapp/controller/FirstTopupController.class.php b/webapp/controller/FirstTopupController.class.php index 6f4ff4af..a9a0edcc 100644 --- a/webapp/controller/FirstTopupController.class.php +++ b/webapp/controller/FirstTopupController.class.php @@ -113,7 +113,7 @@ class FirstTopupController extends BaseAuthedController if ($complete == 1) { $this->_setV(TN_FIRST_TUPOP_STATUS, 0, 1); } - + $this->_rspData( array( 'group' => $group, @@ -152,14 +152,18 @@ class FirstTopupController extends BaseAuthedController array('account_id' => myself()->_getAccountId()) ); - // 0 未领取 1 可领取 2 已领取 - $status = [(int)$row['status1'], (int)$row['status2'], (int)$row['status3']]; - $time = $row['createtime']; + $status = [0, 0, 0]; - for ($i = 0; $i < 3; $i++) { - if ($status[$i] < 2) { - // 检测是否到了可以领取的时间 - $status[$i] = $this->getStatus($i, $time); + if ($row) { + // 0 未领取 1 可领取 2 已领取 + $status = [(int)$row['status1'], (int)$row['status2'], (int)$row['status3']]; + $time = $row['createtime']; + + for ($i = 0; $i < 3; $i++) { + if ($status[$i] < 2) { + // 检测是否到了可以领取的时间 + $status[$i] = $this->getStatus($i, $time); + } } }