Kaynağa Gözat

feat(blockchain): 添加区块链相关功能和测试命令

- 新增 Test 命令类,实现 TRON 和 BSC/ETH网络的区块链操作示例- 添加 get_token_info 和 do_request 辅助函数,用于获取代币信息和发起 CURL 请求
- 在 command.php 中注册 Test命令
- 新增 .idea 目录下的 IDE 配置文件,优化开发环境
kirin 6 ay önce
ebeveyn
işleme
e071f5fc4b

+ 2 - 2
application/api/controller/Ems.php

@@ -21,8 +21,8 @@ class Ems extends Api
             $obj = \app\common\library\Email::instance();
             $result = $obj
                 ->to($params->email)
-                ->subject('验证码')
-                ->message("你的验证码是:" . $params->code)
+                ->subject('【腾视】验证码')
+                ->message("您的验证码是:" . $params->code . '请勿告诉别人!')
                 ->send();
             return $result;
         });

+ 1 - 1
application/api/controller/User.php

@@ -250,7 +250,7 @@ class User extends Api
         if (!$email && !$mobile) {
             $this->error(__('手机号或邮箱至少任选其一'));
         }
-        if ($mobile || !Validate::regex($mobile, "^1\d{10}$")) {
+        if ($mobile && !Validate::regex($mobile, "^1\d{10}$")) {
             $this->error(__('Mobile is incorrect'));
         }
         if (!$email) {