From b5696096ae9d287310d1656e3a28e6133aa49d0e Mon Sep 17 00:00:00 2001 From: zhaoxiaoqiang <287285524@qq.com> Date: Thu, 04 Aug 2022 14:14:33 +0800 Subject: [PATCH] 微信code --- src/views/homeIndex/home-index.vue | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/homeIndex/home-index.vue b/src/views/homeIndex/home-index.vue index cbf5e9b..0b45f9b 100644 --- a/src/views/homeIndex/home-index.vue +++ b/src/views/homeIndex/home-index.vue @@ -2,7 +2,7 @@ * @Author: 小明丶 * @Date: 2020-05-20 20:29:47 * @LastEditors: zxq - * @LastEditTime: 2022-07-08 14:55:26 + * @LastEditTime: 2022-08-04 14:14:14 * @Description: --> <template> @@ -49,7 +49,6 @@ }, created() { this.getWXToken(); - // 判断微信接口是否支持 wx.checkJsApi({ jsApiList: ["checkJsApi", "scanQRCode"], // 需要检测的JS接口列表 @@ -152,8 +151,10 @@ let _this = this; this.checkIsReady().then(() => { if (window.android && window.android.fetchQrCode) { + console.log(111111) window.android.fetchQrCode(); } else { + console.log(wx) wx.scanQRCode({ needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有 -- Gitblit v1.8.0