调用 扫描二维码时(真机运行可以)直接退出app了
scanQrCode: function() {
var bcid = document.getElementById("bcid");
bcid.style.display = "block";
var _this = this;
if(_this.userId == null) {
layer.open({
content: '您还没有登录,是否登录',
btn: ['是', '否'],
yes: function(index) {
window.location.href = "login.html";
}
});
} else {
_this.isQRCode = true;
scan = new plus.barcode.Barcode('bcid');
scan.onmarked = function onmarked(type, result) {
window.location.href = "souquan_ok.html?url=" + result;
scan.close();
};
scan.start();
}
},
1 个回复
1***@qq.com (作者)
求解