微信小程序调用扫一扫,将所得的信息展示到页面中
wxml文件:< view bindtap= 'scancode '>< text class = 'texts'> (点击扫一扫) </ text ></ view >< view >{{result}} </ view >js文件:Page({
data: {result: "",},scancode: function () {let that = this ;let result;wx.scanCode({success: (res) => {this.result = res.result;that.setData({result: this.result})}})},})
微信小程序扫一扫
最新推荐文章于 2024-09-19 04:38:06 发布