|
@@ -102,6 +102,9 @@ class Info
|
|
|
|
|
|
$func = 'inc';
|
|
|
if ($type['type'] == 2) {
|
|
|
+ if ($info['cash'] < $cash) {
|
|
|
+ return $this->alert('账户余额不足', $state);
|
|
|
+ }
|
|
|
$cash = -1*$cash;
|
|
|
$func = 'dec';
|
|
|
}
|
|
@@ -123,13 +126,13 @@ class Info
|
|
|
|
|
|
if ($info) {
|
|
|
$data['yue'] = $info['cash'] + $data['cash'];
|
|
|
+ if ($type['type'] == 2 && $config['balance_alert'] && $data['yue'] <= $config['balance_alert']) {
|
|
|
+ return $this->alert('账户余额不足', $state);
|
|
|
+ }
|
|
|
} else {
|
|
|
$data['yue'] = 0;
|
|
|
}
|
|
|
|
|
|
- if ($data['yue'] < 0) {
|
|
|
- $data['yue'] = 0;
|
|
|
- }
|
|
|
$yue = $data['yue'];
|
|
|
$data['method'] = $method;
|
|
|
$admin = Dever::load('manage/auth.data');
|