1. Public platform mini program settings
Development Management -> Development Settings -> Scan the QR code of the common link to open the applet
agreement type
Choose case
QR code rules (address)
https://www.elephdev.com/qrcode/
Prefix occupation rule
Verification file
Download the file and put it under /qrcode
above, the WeChat server will automatically verify it
Test Range
Default: trial version (select the online version after the post-test is released)
Test link (optional)
The trial version and the development version can only be accessed through the test link. TIPS: the published applet, the trial version and the development version are invalid
2. Front-end code
Take
uniapp
as an example
onLoad(options) {
if (options.q) {
var scene = decodeURIComponent(options.q);
if (scene.indexOf('dwqrcode') !== -1) {
var dwId = scene.split('=');
dwId = dwId[1];
this.dw_id = dwId;
//TODO performs logical processing based on the parameters attached to the QR code
}
}
}
Post comment 取消回复