微信小程序调用扫一扫-小程序获取扫一扫功能-微信小程序扫一扫功能
//获取应用实例varappgetApp()Page({data:{show:"",},onLoad:function(){console.log('onLoad')},click:function(){varthatthis;varshow;wx.scanCode({success:(res){this.show"--result:"+res.result+"--scanType:"+res.scanType+"--charSet:"+res.charSet+"--path:"+res.path;that.setData({show:this.show})wx.showToast({title:'成功',icon:'success',duration:2000})},fail:(res){wx.showToast({title:'失败',icon:'success',duration:2000})},complete:(res){}})}})viewclass"container"viewclass"saoma"bindtap"click"点我扫一扫/viewviewclass"show"{{show}}/view/view
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

