captcha-api.js 703 Bytes
/**
 * Created by TaoHuang on 2016/12/12.
 */

'use strict';

let api = global.yoho.API;

/**
 *  获取图形旋转验证码
 *  @return Promise
 *     {
 *    "alg": "SALT_MD5",
 *    "code": 200,
 *    "data":
 *    {
 *        "degrees":
 *        [
 *            90,
 *            270,
 *            90,
 *            0
 *        ],
 *        "verifiedGraphicCode": "http://img11.static.yhbimg.com/yhb-img01/2016/12/09/09/011c1ef761ab6f0cdb9fbd116f409a6e52.png"
 *    },
 *    "md5": "25d3e6b030a142c32d246322e6884080",
 *    "message": "操作成功"
 *}
 */
exports.gen = () => {
    let params = {
        method: 'web.register.getVerifiedGraphicCode'
    };

    return api.get('', params);
};