Преглед изворни кода

wesmiler ECY 画画交易平台

APPLE пре 3 година
родитељ
комит
8adedf7ff8
2 измењених фајлова са 11 додато и 5 уклоњено
  1. 10 4
      application/api/controller/Index.php
  2. 1 1
      application/extra/site.php

+ 10 - 4
application/api/controller/Index.php

@@ -136,9 +136,15 @@ class Index extends Api
             // 释放到余额
             Db::startTrans();
             $money = round( + $coinRate * $usdt, 2);
-            $user->bonus = $user->bonus + $money;
-            $user->updatetime = time();
-            if(!$user->save()){
+            $changedata = [
+                'type' => 17,
+                'money' => $money,
+                'userid' => $tradeUserId,
+                'relevant_userid' => $tradeUserId,
+                'remark' => '释放到账',
+            ];
+            $res = caiwu($changedata, 'bonus');
+            if(!$res){
                 $fail++;
                 Db::rollback();
                 continue;
@@ -152,7 +158,7 @@ class Index extends Api
                 'usdt_num'=> $usdt,
                 'speed_usdt'=> $speedUsdt,
                 'speed_total'=> CoinRate::transfer($speedUsdt,'USD','CNY'),
-                'balance'=> $user->bonus,
+                'balance'=> $user->bonus + $money,
                 'orderid'=> $item['id'],
                 'status'=> 1,
                 'create_time'=> time(),

+ 1 - 1
application/extra/site.php

@@ -35,7 +35,7 @@ return array (
   'mail_smtp_pass' => 'password',
   'mail_verify_type' => '2',
   'mail_from' => '10000@qq.com',
-  'web_site_logo' => '/uploads/20220621/8b2587582d3c08412c05069b5cf00e64.jpg',
+  'web_site_logo' => '/uploads/20220916/da31aac1c1e05f69a69009ee1eb17488.png',
   'alipayprc' => '',
   'wxprc' => '',
   'appdowm' => 'http://gxfc.gongxif.xyz/gxfc.apk',