Browse Source

腾讯验证码

wangxin 5 years ago
parent
commit
7b5abfe35c
1 changed files with 6 additions and 0 deletions
  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,