WIN-2308041133\Administrator 6 月之前
父节点
当前提交
ff0dda93c0
共有 2 个文件被更改,包括 6 次插入9 次删除
  1. 6 6
      application/api/controller/Sms.php
  2. 0 3
      vendor/fenguoz/tron-php/src/TRC20.php

+ 6 - 6
application/api/controller/Sms.php

@@ -73,7 +73,7 @@ class Sms extends Api
         $mobile = $this->request->request("mobile");
         $event = $this->request->request("event");
         $event = $event ? $event : 'register';
-//        $captcha = $this->request->request("captcha");
+        $captcha = $this->request->request("captcha");
 
         if (!$mobile || !\think\Validate::regex($mobile, "^1\d{10}$")) {
             $this->error(__('手机号不正确'));
@@ -91,11 +91,11 @@ class Sms extends Api
                 $this->error(__('未注册'));
             }
         }
-//        $ret = Smslib::check($mobile, $captcha, $event);
-//        if ($ret) {
+        $ret = Smslib::check($mobile, $captcha, $event);
+        if ($ret) {
             $this->success(__('成功'));
-//        } else {
-//            $this->error(__('验证码不正确'));
-//        }
+        } else {
+            $this->error(__('验证码不正确'));
+        }
     }
 }

+ 0 - 3
vendor/fenguoz/tron-php/src/TRC20.php

@@ -71,15 +71,12 @@ class TRC20 extends TRX
         if (isset($body['result']['code'])) {
             throw new TransactionException(hex2bin($body['result']['message']));
         }
-        var_dump($body['transaction']);
-//        var_dump($tradeobj);
         try {
             $tradeobj = $this->tron->signTransaction($body['transaction']);
             $response = $this->tron->sendRawTransaction($tradeobj);
         } catch (TronException $e) {
             throw new TransactionException($e->getMessage(), $e->getCode());
         }
-        var_dump($response);
         if (isset($response['result']) && $response['result'] == true) {
             return new Transaction(
                 $body['transaction']['txID'],