Browse Source

默认变更列表

kirin 2 days ago
parent
commit
73cbd68bac
2 changed files with 4 additions and 4 deletions
  1. 3 3
      app/api/controller/AuthController.php
  2. 1 1
      crmeb/services/NewSmsServer.php

+ 3 - 3
app/api/controller/AuthController.php

@@ -176,9 +176,9 @@ class AuthController
 //        $data['code'] = $code;
 //        $res = ShortLetterRepositories::send(true, $phone, $data, 'VERIFICATION_CODE');
         $res = NewSmsServer::send($phone, $code, 'VERIFICATION_CODE');
-        var_dump($res);
-        if ($res !== true)
-            return app('json')->fail('短信平台验证码发送失败' . $res);
+//        var_dump($res);
+        if ($res['code'] !== 200)
+            return app('json')->fail('短信平台验证码发送失败' . $res['msg']);
         CacheService::set('code_' . $phone, $code, $time);
 //        Cache::set($keyName, $num + 1, 300);
         Cache::set($nowKey, $total, 61);

+ 1 - 1
crmeb/services/NewSmsServer.php

@@ -18,7 +18,7 @@ class NewSmsServer
         $rs = do_request(self::url,$data,[
             'Content-Type: application/json'
         ],true,true,0);
-        var_dump($data);
+//        var_dump($data);
         $rs = json_decode($rs,true);
 
 //        var_dump($rs);