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
> Deploy MySQL 5.7 cluster master & slave ...
This article shares the installation tutorial of ...
Table of contents Listener watch Format Set up th...
This article uses the gearman+mysql method to imp...
Introduction When writing SQL today, I encountere...
background Sometimes we need to get the creation ...
1. There are two ways to modify global variables ...
Problem description: The user has a requirement t...
Designers need to understand psychology reading n...
Div basic layout <div class="main"&g...
1. Build the basic image of jmeter The Dockerfile...
This article shares the specific code of the vue3...
The company's service uses docker, and the di...
When configuring the interface domain name, each ...
Later, I also added how to use Jupyter Notebook i...