/**
  * 验证码
  */
 public function captcha2(Request $request)
 {
     if (!($clientToken = $request->get('ctoken'))) {
         PazxException::occur('SESSION_INVALID');
     }
     $bllPbccrc = new Pbccrc($clientToken);
     $response = $bllPbccrc->captcha($request);
     return response($response, 200)->header('Content-Type', 'image/jpeg');
 }
    /**
     * 注册第一步表单
     * @param Request $request
     *
     * @return string
     */
    public function regStep1Form(Request $request)
    {
        $bllPbccrc = new Pbccrc();
        $formToken = $bllPbccrc->regInit($request);
        $clientToken = $bllPbccrc->getClientToken();
        $regUrl = Url::getCrmUrl('/system/pazx/pbccrc/reg1');
        $captchaUrl = Url::getCrmUrl('/system/pazx/pbccrc/regCaptcha', ['ctoken' => $clientToken]);
        return <<<REG1HTML
<html>
<head></head>
<body>
<form action="{$regUrl}" method="post" target="_blank">
<input type="hidden" name="ftoken" value="{$formToken}">
<input type="hidden" name="ctoken" value="{$clientToken}">
<input type="hidden" name="method" value="checkIdentity">
    用户名 <input type="text" maxlength="16" name="userInfoVO.name" id="name" autocomplete="on" />
    <br /><br />
    证件类型 <input type="text" maxlength="20" name="userInfoVO.certType" id="ct" value=0 autocomplete="on" />
    <br /><br />
    证件号码 <input type="text" maxlength="20" name="userInfoVO.certNo" id="certNo" autocomplete="on" />
    <br /><br />
    验证码 <input maxlength="6" type="text" id="_@IMGRC@_" name="_@IMGRC@_" autocomplete="off">
    <img src="{$captchaUrl}" />
    <br /><br />
    同意协议 <input type="checkbox" name="1" id="servearticle" id="servearticle" checked="checked" value="on"/>
    <br /><br />
    <br /><br />
    <input type="submit" />
</form>
</body>
</html>
REG1HTML;
    }