From 46c36a26dfc7fd3ced112c3ee49d85b814fbe569 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Sun, 8 Sep 2024 10:59:27 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=BF=94=E5=86=B2=E5=BC=82=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Billions.php | 6 +++++- app/api/logic/BillionsLogic.php | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/api/controller/Billions.php b/app/api/controller/Billions.php index e7df7545..6ee450a5 100755 --- a/app/api/controller/Billions.php +++ b/app/api/controller/Billions.php @@ -76,6 +76,11 @@ class Billions extends Api { $post = $this->request->post(); $result = BillionsLogic::applyBillionsBalance($this->user_id, $post); + return JsonServer::success("请求成功",$result); + } + public function postBillions(){ + $post = $this->request->post(); + $result = BillionsLogic::asynchronousBillions($this->user_id, $post); if ($result['code'] == -1) { return JsonServer::error($result['msg']); @@ -85,7 +90,6 @@ class Billions extends Api return JsonServer::success($result['msg']); } } - public function billionWithdrawal(){ $user_id = $this->user_id; $price = $this->request->post("money"); diff --git a/app/api/logic/BillionsLogic.php b/app/api/logic/BillionsLogic.php index ad1dc587..4a022576 100755 --- a/app/api/logic/BillionsLogic.php +++ b/app/api/logic/BillionsLogic.php @@ -306,6 +306,14 @@ class BillionsLogic extends Logic 'give_growth' => 0, 'create_time' => time() ]); + $d['id'] = $id; + $d['order_sn'] = $order_sn; + return $d; + } + public static function asynchronousBillions($user_id,$post){ + $money = $post['money']; + $id = $post['id']; + $order_sn = $post['order_sn']; $user_subsidy = 2; // 自我补贴 $all_user_subsidy = 20; //全用户获取的比例 $user_start_num = 1; // 补贴前几位数量