- 更新 IDCardClient 门面注释,使用 @mixin 替代具体方法声明 - 将 RuntimeException 替换为 throw_logic_exception 函数处理错误 - 提高代码可维护性和一致性
@@ -5,7 +5,7 @@ namespace SixShop\AliyunIDCard\Facade;
use think\Facade;
/**
- * @method static array idcard(string $cardno, string $name) 身份证验证
+ * @mixin \SixShop\AliyunIDCard\IDCardClient
*/
class IDCardClient extends Facade
{
@@ -42,7 +42,7 @@ class IDCardClient
if ($result['resp']['code'] == 0) {
return $result['data'];
} else {
- throw new \RuntimeException($this->errorMesageMap[$result['resp']['code']] ?? $result['resp']['desc']);
+ throw_logic_exception($this->errorMesageMap[$result['resp']['code']] ?? $result['resp']['desc']);
}