From 83afe169d34071bc00ab84ab4c3ba75bda38ae14 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 24 May 2025 10:18:45 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E5=85=85=E4=BD=99=E9=A2=9D=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/Index.php | 25 ++++++++++++++++++++++++- public/admin/console.html | 36 +++++++++++++++++++++++++++++------- 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/app/controller/Index.php b/app/controller/Index.php index 2007f96..229fbf6 100755 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -40,7 +40,30 @@ class Index extends BaseController $ptzbotmoney=Db::name("admin_bot")->sum('money'); //平台总利润 $ptlirun=Db::name("order")->sum('slirun'); + //查询代充余额 + $getbalance=$this->getbalance(); + + + return $this->success('返回成功', ['uplist'=>$uplist,'ptzuser'=>$ptzuser,'ptzbot'=>$ptzbot,'ptzbotmoney'=>$ptzbotmoney,'ptlirun'=>$ptlirun,'getbalance'=>$getbalance]); + } + public function getbalance(){ + $tmuid = Db::name("conf")->where("key", 'tmuid')->value('value'); + $tmkey = Db::name("conf")->where("key", 'tmkey')->value('value'); + $apiurl = "https://open.wfa.pw/api/sms/balance"; + $sign = md5($tmuid .$tmkey); + $submit = array("uid" =>$tmuid, "sign" => $sign); + $hui =posturl($apiurl, $submit); + + if ($hui['code'] == 1) { + // 提交出海平台成功 + // $this->telegram->sendMessage($this->bots['botad'], "您的余额 还剩:" . $hui['data']['umoney'] . "U"); + $umoney=isset($hui['data']['umoney'])?$hui['data']['umoney']:0; + + return $umoney; + } else { + return 0; + } + - return $this->success('返回成功', ['uplist'=>$uplist,'ptzuser'=>$ptzuser,'ptzbot'=>$ptzbot,'ptzbotmoney'=>$ptzbotmoney,'ptlirun'=>$ptlirun]); } } diff --git a/public/admin/console.html b/public/admin/console.html index 4204bc3..b1f6d1c 100755 --- a/public/admin/console.html +++ b/public/admin/console.html @@ -21,7 +21,7 @@
-
+
平台总用户
@@ -52,7 +52,7 @@
-
+
平台机器人
@@ -90,12 +90,27 @@
-
+
+
+
代充余额
+
+
+
+ 0 +
+
+ +
+
+
+
+
+
总余额
-
+
0
@@ -120,12 +135,12 @@
-
+
总利润
-
+
0
@@ -324,12 +339,19 @@ count.up("value3", { time: 4000, - num:response.data.ptzbotmoney, + num:response.data.getbalance, bit: 2, regulator: 50 }) count.up("value4", { + time: 4000, + bit: 2, + num: response.data.ptzbotmoney, + regulator: 50 + }) + + count.up("value5", { time: 4000, bit: 2, num: response.data.ptlirun,