chuweiqiang vor 1 Jahr
Ursprung
Commit
fa59c88d38
1 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen
  1. 8 2
      app/data/controller/user/Balance.php

+ 8 - 2
app/data/controller/user/Balance.php

@@ -95,7 +95,13 @@ class Balance extends Controller
             if (empty(floatval($data['amount']))) {
                 $this->error('金额为零!');
             }
-            userMoneyChange($data['amount'],1,$data['uuid'],'后台余额充值',1,$data['create_by']);
+            if($data['amount'] < 1){
+                $data['amount'] = abs($data['amount']);
+                $pm = 0;
+            }else{
+                $pm = 1;
+            }
+            userMoneyChange($data['amount'],1,$data['uuid'],'后台余额充值',$pm,$data['create_by']);
             $this->success('成功');
         }
     }
@@ -138,4 +144,4 @@ class Balance extends Controller
             }
         }
     }
-}
+}