文档
测试

获取图形验证码

GET

接口描述

发送短信验证码前显示图片验证码,不需要调用接口,具体请看示例步骤

响应参数

参数名
类型
描述
必填
captchaVerification
String
图形验证码成功返回参数,用于发送短信验证码 (具体请看示例)
必填

说明 / 示例

**准备** 请引入该两个库 [图片验证码js库下载](http://h5.fp01.net/dzswjh5/static/fujiancaptcha/js/verify.js) [图片验证码css库下载](http://h5.fp01.net/dzswjh5/static/fujiancaptcha/css/verify.css) **使用** html `<view id="captcha"></view>` js const base = http://h5.fp01.net/dzswj const taxno = 当前税号 const getCaptchaUrl = base + "/" + taxno + "/guizhou/sso/captcha/get.do"; const checkCaptchaUrl = base + "/" + taxno + "/guizhou/sso/captcha/check.do"; $("#captcha").pointsVerify({ mode: "pop", //展示模式 containerId: "captcha", //pop模式 必填 被点击之后出现行为验证码的元素id imgSize: { //图片的大小对象 width: "400px", height: "200px", }, getCaptchaUrl, checkCaptchaUrl, beforeCheck: function() { //检验参数合法性的函数 mode ="pop"有效 //表单参数校验 return true; }, ready: function() { //加载完毕的回调 }, success: function(params) { //成功的回调 that.captchaVerification= params.captchaVerification; // 发送短信验证码 that.GetDxyzm(); }, error: function(err) {}, //失败的回调 }); **返回示例** retcode: 1 成功 然后调用发送短信验证码接口