checkVerify()) { $this->message('提现验证失败或验证已过期', yzWebUrl("withdraw.records", ['id' => $resultData['id']]), 'error'); } $this->withdrawModel->status = 1; $result = (new PayedService($this->withdrawModel))->withdrawPay(); return $result == true ? $this->successJson('打款成功') : $this->errorJson('打款失败,请刷新重试'); } public function validatorWithdrawModel($withdrawModel) { if ($withdrawModel->status != Withdraw::STATUS_PAYING) { throw new ShopException('状态错误,不符合打款规则!'); } } /** * 打款验证 * @return bool */ private function checkVerify() { $set = Setting::getByGroup('pay_password')['withdraw_verify'] ?: []; if (empty($set) || empty($set['is_phone_verify'])) { return true; } $verify = Session::get('withdraw_verify'); //没获取到 if ($verify && $verify >= time()) { return true; } return false; } }