|
@@ -131,7 +131,6 @@ class Info
|
|
|
if ($config['withdraw_fee']) {
|
|
|
$fee = Dever::per($cash, $config['withdraw_fee']);
|
|
|
$data['cash'] -= $fee;
|
|
|
- $scash += $fee;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -151,7 +150,11 @@ class Info
|
|
|
}
|
|
|
|
|
|
if ($info) {
|
|
|
- $data['yue'] = $info['cash'] + $scash;
|
|
|
+ if ($type['key'] == 'tixian') {
|
|
|
+ $data['yue'] = $info['cash'] - $data['ycash'];
|
|
|
+ } else {
|
|
|
+ $data['yue'] = $info['cash'] + $scash;
|
|
|
+ }
|
|
|
if ($type['type'] == 2 && $config['balance_alert'] && $data['yue'] <= $config['balance_alert']) {
|
|
|
return $this->alert('账户余额不足', $state);
|
|
|
}
|
|
@@ -166,7 +169,7 @@ class Info
|
|
|
$update = array();
|
|
|
$update['where_id'] = $info['id'];
|
|
|
$update['set_cash'] = $scash;
|
|
|
- $update['set_col'] = $data['cash'];
|
|
|
+ $update['set_col'] = $data['ycash'];
|
|
|
$update['clear'] = true;
|
|
|
Dever::db('account/info')->$func($update);
|
|
|
}
|