<view style="padding:0rpx 20rpx 0rpx 40rpx;"> <span bindtap='sao_yi_sao' class="scan_btn">扫一扫</span> </view>
sao_yi_sao() { var _this = this; // 允许从相机和相册扫码 wx.scanCode({ success: (res) => { var result = res.result; console.log(result); } }) },
扫出的内容是:
// {errMsg: "scanCode:ok", result: "H_34_df↵", scanType: "QR_CODE", charSet: "ISO8859-1", rawData: "SF8zNF9kZgo="}
站长微信:xiaomao0055
站长QQ:14496453