amis icon indicating copy to clipboard operation
amis copied to clipboard

使用Action行为按钮的时候用到了”倒计时行为按钮“,我想在触发倒计时之前弹出一个拖动验证码,改如何做

Open hooli67 opened this issue 1 year ago • 0 comments

实现场景:

使用Action行为按钮的时候用到了”倒计时行为按钮“,我想在触发倒计时之前弹出一个拖动验证码,需要在拖动验证后才触发发送短信,并且开始倒计时

存在的问题:

目前弹出拖动验证码组件已经开发好,就是弹出了无法让 倒计时和发送短信的请求等候拖动验证码返回后继续执行

当前方案:

暂无方案,目前行为按钮的配置如下:

{
  "type": "button",
  "id": "u:a282be006d51",
  "name": "countdown1",
  "label": "发送验证码",
  "onEvent": {
    "click": {
      "weight": 0,
      "actions": [
        { // 打开行为验证码弹窗
          "groupType": "component",
          "actionType": "alertCaptcha",
          "componentId": "u:850d528ec661"
        },
        {  // 发送短信验证码
          "api": {
            "url": "/send?phone=${phone}",
            "method": "get"
          },
          "options": {
          },
          "outputVar": "responseResult",
          "actionType": "ajax",
          "ignoreError": false
        }
      ]
    }
  },
  "countDown": 60,
  "countDownTpl": "${timeLeft} 秒后重发"
}

hooli67 avatar Jan 14 '24 14:01 hooli67