wx.scanCode 弹出 扫码结果页面 这是什么情况 点击左边的X 退出小程序了
presssaoma:function(e){
var that=this;
wx.scanCode({
onlyFromCamera: true,
success: (res) => {
console.log(res)
console.log(‘扫一扫’);
var str = res.result;
console.log(str);
var resData = JSON.parse(str)
console.log(‘扫一扫’);
that.scanResult(resData);
},
fail: function (res) {
console.log(res)
wx.showModal({
title: ‘扫码失败’,
content: ‘请您重新扫码’,
})
// wx.reLaunch({
// url: ‘…/mhMain/mhMain’,
// })
}
})
},
scanResult:function(Data){
var that = this;
console.log(Data);
var resData = {
qr_content: Data.qr_content
}
console.log(Data.type);
console.log(“Data.type”);
}