当前位置:网站首页>The applet calls the function of scanning QR code and jumps to the path specified by QR code
The applet calls the function of scanning QR code and jumps to the path specified by QR code
2022-04-23 05:01:00 【Chen junyang】
One 、wxml Code
<button class='tip-text2' style="margin-top:2%;color:#fff" bindtap='scanCode' mode='widthFix'> Sweep code </button>
Two 、js Code
scanCode: function () {
var that = this;
wx.scanCode({ // scanning API
onlyFromCamera: true,
scanType: ['barCode', 'qrCode'],
success(res) { // Scan successful
var scanCodeMsg = res.path; // Get the path information of QR code
console.log(scanCodeMsg) // Output QR code information
wx.redirectTo({ // Transfer to the corresponding page
url: '/' + scanCodeMsg,
});
wx.showToast({
title: ' success ',
duration: 1000
})
}
})
},
3、 ... and 、 Official Overview
版权声明
本文为[Chen junyang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220552495335.html
边栏推荐
- JS determines whether the numeric string contains characters
- [WinUI3]编写一个仿Explorer文件管理器
- List&lt; Map&gt; Replication: light copy and deep copy
- PHP counts the number of files in the specified folder
- Perfect test of coil in wireless charging system with LCR meter
- 2022/4/22
- Raspberry pie + opencv + opencv -- face detection ------- environment construction
- 用LCR表完美测试无线充电系统中的线圈
- Gets all dates between two times
- Progress of innovation training (IV)
猜你喜欢
Use model load_ state_ Attributeerror appears when dict(): 'STR' object has no attribute 'copy‘
AQS源码阅读
Leetcode 1547: minimum cost of cutting sticks
Opencv + clion face recognition + face model training
Details related to fingerprint payment
Perfect test of coil in wireless charging system with LCR meter
How can continuous integration (CI) / continuous delivery (CD) revolutionize automated testing
Pixel mobile phone brick rescue tutorial
Set Chrome browser background to eye protection (eye escort / darkreader plug-in)
Solve valueerror: argument must be a deny tensor: 0 - got shape [198602], but wanted [198602, 16]
随机推荐
leetcode——启发式搜索
Excel protects worksheets and workbooks from damage
JS détermine si la chaîne de nombres contient des caractères
HRegionServer的详解
信息学奥赛一本通 1212:LETTERS | OpenJudge 2.5 156:LETTERS
Deep learning notes - data expansion
TypeError: ‘Collection‘ object is not callable. If you meant to call the ......
Set Chrome browser background to eye protection (eye escort / darkreader plug-in)
View analysis of scenic spots in ArcGIS
Perfect test of coil in wireless charging system with LCR meter
JS determines whether the numeric string contains characters
redis和mysql区别
2022/4/22
List&lt; Map&gt; Replication: light copy and deep copy
Day.js 常用方法
JS engine loop mechanism: synchronous, asynchronous, event loop
Deep learning notes - object detection and dataset + anchor box
Innovation training (XII) reptile
Use AES encryption - reuse the wisdom of predecessors
跨境电商 | Facebook 和 Instagram:哪个社交媒体更适合你?