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
Excel is the most commonly used tool for data ana...
Intro Previously, our docker images were stored i...
This article summarizes the knowledge points of M...
Table of contents Container Hierarchy The process...
Check the Python version python -V If it is below...
Table of contents 1. Location Object 1. URL 2. Pr...
Often when we open foreign websites, garbled char...
Table of contents 1.Linux login interface 2. Writ...
Table of contents Component Communication Introdu...
Among classic color combinations, probably no one...
This article mainly explains tables, which are no...
Regarding the nginx panic problem, we first need ...
public function json_product_list($where, $order)...
Example: tip: This component is based on vue-crop...
Table of contents 1. Add packaging command 2. Run...