4***@qq.com
4***@qq.com
  • 发布:2022-07-29 15:40
  • 更新:2022-08-01 17:05
  • 阅读:365

【报Bug】官方验证码代码拷贝过来以后安卓APP报错。

分类:uniCloud

产品分类: uniCloud/App

示例代码:
async verify({  
    scene,  
    captcha  
}) {  
    // scene 注意:在正式项目中,场景值(scene)应当在服务端设定,不由客户端自己传递。否则这是一个安全隐患  
    let res = await uniCaptcha.verify({  
        scene: scene  
        captcha: captcha  
    })  
    if (res.code == 0) {  
        //...这里写你的业务逻辑  
        return true  
    } else {  
        return false  
    }  
},

操作步骤:

官方代码拷贝过来以后,能验证验证码,但是会报这个错。

预期结果:

官方代码拷贝过来以后,能验证验证码,但是会报这个错。

实际结果:

不希望报错

bug描述:

15:36:30.949 [云函数:uni-captcha-co] 运行日志:
15:36:30.967 Method[toJSON] not found
15:36:30.998 Error: Method[toJSON] not found
15:36:31.011 at functionPath (/tmp/function/index.js:1:2340)
15:36:31.030 at exports.main (/tmp/function/
index.js:1:2585)
15:36:31.049 at u (/tmp/function/index.js:1:3164)
15:36:31.069 at I (/tmp/function/index.js:1:3762)
15:36:31.090 at runUserFunction (/code/index.js:118:207833)
15:36:31.110 at (<anonymous>)
15:36:31.131 at _tickCallback (internal/process/next_tick.js:189:7)

2022-07-29 15:40 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

看下有没有console.log(uniCaptcha)或者console.log(JSON.stringify(uniCaptcha))

该问题目前已经被锁定, 无法添加新回复