Commit 55871ccf by 王召彬

修改短信验证码校验类

parent c846c15d
......@@ -21,11 +21,15 @@ use Hdll\Services\Common\Entity\User;
class Smscode
{
protected $sellerId;
protected $number;
public function __construct()
public function __construct($number = null)
{
$this->sellerId = App::getBean(User::class)->getId();
if($number !== null) {
$this->number = $number;
} else {
$this->number = App::getBean(User::class)->getId();
}
}
/**
......@@ -93,7 +97,7 @@ class Smscode
private function getKey($mobile)
{
return 'smscode:' . md5($this->sellerId . '|' . $mobile);
return 'smscode:' . md5($this->number . '|' . $mobile);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment