瀏覽代碼

腾讯验证码

wangxin 5 年之前
父節點
當前提交
7b5abfe35c
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/view/captcha/captcha.vue

+ 6 - 0
src/view/captcha/captcha.vue

@@ -67,6 +67,12 @@
                 function (res) {/* callback */
                     if (res.ret === 0) {
                         // that.countDown();
+                        if (that.isiOS) {
+                            window.webkit.messageHandlers.returnVerificationCode.postMessage(res.ret.toString());
+                        }
+                        if (that.isAndroid) {
+                            window.hap.verificationCode(res.ret.toString());
+                        }
                         postAction(getCaptchaCode, {
                             ticket: res.ticket,
                             randstr: res.randstr,