How to understand WeChat Mini Programs's QR Code Generation tool weapp-qrcode
This article introduces the relevant knowledge of "how to understand WeChat Mini Programs's QR code generation tool weapp-qrcode". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
WeChat Mini Programs-QR Code Generation tool
Download: weapp-qrcode.js fil
Github: https://github.com/Pudon/weapp-qrcode-base64
Introduce weapp-qrcode.js files into the project
Js
Const app = getApp (); const QR = require ('.. /.. / lib/weapp-qrcode.js') / / introduce weapp-qrcodePage (initial data of {/ * page * / data: {QrCodeURL:'', / / QR code image path}, / / QR code drawImg: function () {let that = this, params = "https://www.baidu.com/";" / / QR code parameter var imgData = QR.drawImg (params, {typeNumber: 4, / / density errorCorrectLevel: 'errorCorrectLevel, / / error correction level size: 800, / / white border}) this.setData ({qrcodeURL: imgData})},})
Html
This is the end of the introduction of "how to understand WeChat Mini Programs's QR code generation tool weapp-qrcode". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!