修改判断

This commit is contained in:
liu 2024-03-15 16:45:11 +08:00
parent 4a13a9e8b8
commit a6a7086df0

View File

@ -144,13 +144,12 @@ class Merchant extends BaseController
public function apply($merId)
{
$withdrawal_pwd = $this->request->param('withdrawal_pwd');
if(empty($withdrawal_pwd)) return \app('json')->fail('请输入提现密码');
//找到商户的密码
$userInfo = \app\common\model\system\merchant\Merchant::getDB()->with('user')->where('mer_id',$merId)->find()->toArray();
if (!password_verify($pwd = (string)$withdrawal_pwd, $userInfo['user']['withdrawal_pwd']))
return app('json')->fail('提现密码错误');
// $withdrawal_pwd = $this->request->param('withdrawal_pwd');
// if(empty($withdrawal_pwd)) return \app('json')->fail('请输入提现密码');
// //找到商户的密码
// $userInfo = \app\common\model\system\merchant\Merchant::getDB()->with('user')->where('mer_id',$merId)->find()->toArray();
// if (!password_verify($pwd = (string)$withdrawal_pwd, $userInfo['user']['withdrawal_pwd']))
// return app('json')->fail('提现密码错误');
$merchant = app()->make(MerchantRepository::class)->search(['mer_id' => $merId])->field('uid,mer_id,mer_name,mer_money,financial_bank,financial_wechat,financial_alipay,financial_type,ot_margin')->find();
if (($msg = $this->checkAuth($merchant)) !== true) {