Skip to content

luosimao人机验证 data-callback回调 无法触发 | 3part vcode can not callback the method whick data-callback props in div setted #6005

@hh23485

Description

@hh23485

Version

2.3.4

Reproduction link

https://luosimao.com/docs/api/56

Steps to reproduce

我在项目开发里用到luosimao的人机验证组件,认证的基本逻辑如下:

  1. 前台
    <script>向luosimao服务器请求认证的图片等内容
  2. 用户点击认证
  3. luosimao 的js文件发送请求验证并接受结果
  4. 调用div里指定的回调方法,向后台发出二次验证的请求。

前三步都好好的解决了,但是第四步失败了没有办法触发。。


下面是代码

<div class="l-captcha" data-site-key="***********" data-callback="myResponse"></div>
methods: {
    //
    myCallback(resp){
         console.log(resp);
    }
    //
}

当然,我也尝试了在script块内写,也没有触发,只有在index.html中编写才触发,但是这并不能满足我的需求,我希望能够了解怎么处理。

螺丝帽文档的链接;

What is expected?

期望能够输出响应,当然也就是被调用了

What is actually happening?

没有触发调用


我需要一个人机验证的模块,但是没有办法解决这个回调问题

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions