|
@@ -57,10 +57,6 @@ class Money extends Common
|
|
|
if (!preg_match("/^-?\d+$/",$amounts)) {
|
|
|
$this->error('金额必须是整数');
|
|
|
}
|
|
|
-
|
|
|
- if ($this->auth->is_auth != 2) {//实名后允许充值
|
|
|
- throw new Exception('请先实名认证');
|
|
|
- }
|
|
|
if ($this->auth->power->recharge == 1) {//禁止充值
|
|
|
throw new Exception('禁止充值');
|
|
|
}
|
|
@@ -81,7 +77,18 @@ class Money extends Common
|
|
|
$out_trade_no = date("YmdHis") . rand(100000, 999999);
|
|
|
$title = "充值钻石";
|
|
|
$amount = $recharInfo["money"] / 100;
|
|
|
-
|
|
|
+ if ($this->auth->is_auth != 2) {//实名后允许充值
|
|
|
+ //未实名认证最大可充值金额
|
|
|
+ $maxMoney = config('site.un_authentication_max');
|
|
|
+ $rechargeMoneyWhere['user_id'] = $user_id;
|
|
|
+ $rechargeMoneyWhere['status'] = 1;
|
|
|
+ $rechargeMoney = model('RecharOrder')->where($rechargeMoneyWhere)->sum('money');
|
|
|
+ $userRechargeMoney = !empty($rechargeMoney) ? (int)$rechargeMoney : 0;
|
|
|
+ $userMoney = bcadd($amount,$userRechargeMoney);
|
|
|
+ if ($userMoney > $maxMoney) {
|
|
|
+ $this->error('请先实名认证');
|
|
|
+ }
|
|
|
+ }echo '<pre>';var_dump(3);exit;
|
|
|
if ($params_from == "ios") {
|
|
|
$jewel = $recharInfo['jewel'];
|
|
|
} else {
|