diff --git a/app/controller/api/WithdrawController.php b/app/controller/api/WithdrawController.php index 26f30ae..e79b015 100644 --- a/app/controller/api/WithdrawController.php +++ b/app/controller/api/WithdrawController.php @@ -85,7 +85,7 @@ class WithdrawController $user=User::find($user_id); //提现金额 $rate = ExchangeRate::where('type','BDT')->get(); - $money = $money_no/100*$rate[0]['points']; + $money = $money_no/100*$rate[0]['points']+500; //用户积分减少$money UserRewardDao::base($user_id, 1, -$money_no, '提现'); //大于1000等待管理员审核 @@ -158,7 +158,7 @@ class WithdrawController $userbank->save(); $rate = ExchangeRate::where('type','BDT')->get(); //计算积分 - $money = $amount*100/$rate[0]['points']; + $money = $amount*100/$rate[0]['points']+500; //用户id $user_id=$request->data['id']; //用户积分增加$money diff --git a/config/database.php b/config/database.php index e02edcc..d0ef7fa 100644 --- a/config/database.php +++ b/config/database.php @@ -33,10 +33,10 @@ return [ 'host' => '127.0.0.1', 'port' => '3306', 'database' => 'app_hd', - 'username' => 'app_hd', - 'password' => 'fmW4NwwXMxN8ShSM', - // 'username' => 'root', - // 'password' => '123456', + // 'username' => 'app_hd', + // 'password' => 'fmW4NwwXMxN8ShSM', + 'username' => 'root', + 'password' => '123456', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_general_ci', 'prefix' => '',