调整密码校验

This commit is contained in:
luofei 2024-03-22 15:20:28 +08:00
parent d1896638d5
commit 157044ae9f

View File

@ -358,11 +358,11 @@ class StoreOrder extends BaseController
public function verifyPwd()
{
$user = $this->request->userInfo();
$transPwd = $this->request->post('withdrawal_pwd');
if (empty($user['withdrawal_pwd'])) {
return app('json')->success(['msg' => '请设置支付密码', 'code'=> 101]);
}
$transPwd = $this->request->post('withdrawal_pwd');
if (!password_verify((string)$transPwd, $user['withdrawal_pwd'])) {
if (!empty($transPwd) && !password_verify((string)$transPwd, $user['withdrawal_pwd'])) {
return app('json')->success(['msg' => '支付密码错误', 'code'=> 102]);
}
return app('json')->success(['msg' => '验证通过', 'code'=> 100]);