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;