From bcad7bf467e14468d91fc884fbf972b83b80baa8 Mon Sep 17 00:00:00 2001 From: ciaochaos <1272777550@qq.com> Date: Sun, 3 May 2020 17:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E4=B8=AD=E6=97=A0=E6=B3=95=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E7=9A=84=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Qrcode.js | 8 +++++++- src/utils/qrcode.js | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/Qrcode.js b/src/components/Qrcode.js index bba7f5d..df8dcee 100644 --- a/src/components/Qrcode.js +++ b/src/components/Qrcode.js @@ -1,3 +1,5 @@ +/*eslint-disable*/ + import React from "react"; import ReactDOMServer from 'react-dom/server' import {getQrcodeData} from "../utils/qrcodeHandler"; @@ -24,7 +26,11 @@ window.onload = function(){ } function isWeiXin(){ const ua = window.navigator.userAgent.toLowerCase(); - return ua.match(/MicroMessenger/i) === 'micromessenger'; + if(ua.match(/MicroMessenger/i) == 'micromessenger'){ + return true; + }else{ + return false; + } } const styleList = [ diff --git a/src/utils/qrcode.js b/src/utils/qrcode.js index 3e8ba83..ae43719 100644 --- a/src/utils/qrcode.js +++ b/src/utils/qrcode.js @@ -18,6 +18,8 @@ // QR8bitByte //--------------------------------------------------------------------- +/*eslint-disable*/ + function QR8bitByte(data) { this.mode = QRMode.MODE_8BIT_BYTE; this.data = data;