代充余额的显示
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user