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
1. Create a user: Order: CREATE USER 'usernam...
MySQL Create Database After logging into the MySQ...
When doing database statistics, you often need to...
Preface MySQL 8.0.13 began to support index skip ...
Preface There are two types of nginx modules, off...
Configure Tomcat First install Tomcat Installing ...
Table of contents Basic database operations 2) Vi...
This article uses examples to explain the concept...
How to use iframe: Copy code The code is as follo...
Back in the Kernel 2.6 era, a new security system...
Vertical Split Vertical splitting refers to the s...
When making forms, we often encounter the situati...
Table of contents What is MVCC Mysql lock and tra...
Table of contents 1. Modify by binding the style ...
Preface I recently learned Linux, and then change...