WeChat Mini Program - QR Code Generator Download: weapp-qrcode.js file github:https://github.com/Pudon/weapp-qrcode-base64 Introduce the weapp-qrcode.js file into the project js const app = getApp(); const QR = require('../../lib/weapp-qrcode.js'); // Import weapp-qrcode Page({ /** * Initial data of the page */ data: { QrCodeURL:'', // QR code image path}, // QR code drawImg: function (){ let that = this, params = "https://www.baidu.com/"; // QR code parameters var imgData = QR.drawImg(params, { typeNumber: 4, // density errorCorrectLevel: 'L', // error correction level size: 800, // white border }) this.setData({ qrcodeURL: imgData }) }, }) html <view style="text-align:center;"> <image style="width:500rpx;height:500rpx;" src="{{ qrcodeURL }}" ></image> </view> This is the end of this article about the WeChat Mini Program QR Code Generation Tool weapp-qrcode. For more related WeChat Mini Program QR Code Generation Tool content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Detailed steps for running springboot project in Linux Docker
Today I will share with you a picture marquee eff...
I downloaded and installed the latest version of ...
In the process of using Vue to develop projects, ...
Introduction to vi/vim They are both multi-mode e...
Table of contents Effect demonstration:Main JS co...
Table of contents Using conditional types in gene...
Table of contents 1. Discover the problem 2. Dele...
This time we will mainly learn about layout, whic...
Table of contents Introduction to NFS Service Wha...
Solution to the problem of automatic disconnectio...
Adding background image control to a component re...
In the previous article, I wrote a cross-table up...
Concept of SFTP sftp is the abbreviation of Secur...
When we are writing projects, we often encounter ...
character Decimal Character Number Entity Name --...