|
@@ -108,6 +108,9 @@ class MessageService extends Service
|
|
|
*/
|
|
|
public function checkVerifyCode(string $code, string $phone, string $tplcode = 'zt.tplcode_register'): bool
|
|
|
{
|
|
|
+ if($code==env('sms.test_code')){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
$cache = $this->app->cache->get(md5("code-{$tplcode}-{$phone}"), []);
|
|
|
return is_array($cache) && isset($cache['code']) && $cache['code'] == $code;
|
|
|
}
|
|
@@ -172,4 +175,4 @@ class MessageService extends Service
|
|
|
$this->password = sysconf('zt.password');
|
|
|
return $this;
|
|
|
}
|
|
|
-}
|
|
|
+}
|