diff --git a/docs/README.md b/docs/README.md index a47fd2f..106420d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4210,10 +4210,12 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` `composedSongs`: 包含歌曲(歌曲id),多个用逗号隔开 ### 验证接口-二维码生成 -说明: 进行某些操作,如关注用户,可能会触发验证,可调用这个接口生成二维码,使用app扫码后可解除验证 +说明: 进行某些操作,如关注用户,可能会触发验证,可调用这个接口生成二维码,使用app扫码后可解除验证 + **接口地址:** `/verify/getQr` -**必选参数:** +**必选参数:** + `vid`: 触发验证后,接口返回的verifyId `type`:触发验证后,接口返回的verifyType @@ -4229,7 +4231,8 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **接口地址:** `/verify/qrcodestatus` -**必选参数:** +**必选参数:** + `qr`: `/verify/getQr`接口返回的`qr`字符串 ## 离线访问此文档 diff --git a/util/request.js b/util/request.js index ef86605..cd0e240 100644 --- a/util/request.js +++ b/util/request.js @@ -198,6 +198,9 @@ const createRequest = (method, url, data = {}, options) => { } else { answer.body = body } + if (answer.body.code) { + answer.body.code = Number(answer.body.code) + } answer.status = Number(answer.body.code || res.status) if (