feat: 页面修改
This commit is contained in:
parent
9aea9eb294
commit
919f29699e
|
@ -8,6 +8,7 @@ use App\Utils\ApiResponseApp;
|
||||||
|
|
||||||
|
|
||||||
use App\model\Dictionary;
|
use App\model\Dictionary;
|
||||||
|
use App\model\ExchangeRate;
|
||||||
use hg\apidoc\annotation as Apidoc;
|
use hg\apidoc\annotation as Apidoc;
|
||||||
use support\Db;
|
use support\Db;
|
||||||
|
|
||||||
|
@ -30,21 +31,25 @@ class CommonController
|
||||||
|
|
||||||
$Dictionary=Dictionary::all();
|
$Dictionary=Dictionary::all();
|
||||||
$res=[];
|
$res=[];
|
||||||
|
$ExchangeRate = ExchangeRate::all();
|
||||||
$res = [
|
$res = [
|
||||||
"account_notice" => "Log in to link account and get 300 to 3,000 random points a day",
|
"account_notice" => "Log in to link account and get 300 to 3,000 random points a day",
|
||||||
"vi_rate" => "2.49",
|
// "vi_rate" => "2.49",
|
||||||
"trx_rate" => "0.00",
|
// "trx_rate" => "0.00",
|
||||||
"nrly_rate" => "30",
|
// "nrly_rate" => "30",
|
||||||
"trx_rate1" => "",
|
// "trx_rate1" => "",
|
||||||
"inr_rate" => "1.62",
|
// "inr_rate" => "1.62",
|
||||||
"php_rate" => null,
|
// "php_rate" => null,
|
||||||
"brl_rate" => "0.10",
|
// "brl_rate" => "0.10",
|
||||||
"brl_fee" => "300",
|
"brl_fee" => "300",
|
||||||
"pkr_fee" => "300",
|
"pkr_fee" => "300",
|
||||||
"pkr_rate" => "5",
|
// "pkr_rate" => "5",
|
||||||
"pkr_min" => "2000",
|
"pkr_min" => "2000",
|
||||||
"brl_min" => "5000"
|
"brl_min" => "5000"
|
||||||
];
|
];
|
||||||
|
foreach ($ExchangeRate as $item) {
|
||||||
|
$res[strtolower($item['type']) . '_rate'] = $item['points'];
|
||||||
|
}
|
||||||
$col=['service_1','service_2','service_3','service_url','service_user_url','points'];
|
$col=['service_1','service_2','service_3','service_url','service_user_url','points'];
|
||||||
foreach($Dictionary as $key=>$value){
|
foreach($Dictionary as $key=>$value){
|
||||||
$res[$value->key]=$value->value;
|
$res[$value->key]=$value->value;
|
||||||
|
|
|
@ -88,7 +88,7 @@ class WithdrawController
|
||||||
$money = $money_no/100*$rate[0]['points'];
|
$money = $money_no/100*$rate[0]['points'];
|
||||||
var_dump($money);
|
var_dump($money);
|
||||||
//用户积分减少$money
|
//用户积分减少$money
|
||||||
UserRewardDao::base($user_id, 1, -($money_no+500), '提现');
|
UserRewardDao::base($user_id, 1, -($money_no+300), '提现');
|
||||||
//大于1000等待管理员审核
|
//大于1000等待管理员审核
|
||||||
if($money>=1000){
|
if($money>=1000){
|
||||||
Withdraw::create([
|
Withdraw::create([
|
||||||
|
@ -159,7 +159,7 @@ class WithdrawController
|
||||||
$userbank->save();
|
$userbank->save();
|
||||||
$rate = ExchangeRate::where('type','BDT')->get();
|
$rate = ExchangeRate::where('type','BDT')->get();
|
||||||
//计算积分
|
//计算积分
|
||||||
$money = $amount*100/$rate[0]['points']+500;
|
$money = $amount*100/$rate[0]['points']+300;
|
||||||
//用户id
|
//用户id
|
||||||
$user_id=$request->data['id'];
|
$user_id=$request->data['id'];
|
||||||
//用户积分增加$money
|
//用户积分增加$money
|
||||||
|
|
Loading…
Reference in New Issue