소스 검색

腾讯验证码

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,