Commit 7600cc16 authored by gengchunlei's avatar gengchunlei

小程序 js实现扫码

parent d38fcbbb
...@@ -83,14 +83,18 @@ export default { ...@@ -83,14 +83,18 @@ export default {
if (code) { if (code) {
console.log(code.data); console.log(code.data);
alert(code.data);
//输出解析后的二维码 //输出解析后的二维码
this.$emit("getQRCode", code.data) getQR(code.data)
} }
} }
requestAnimationFrame(tick); requestAnimationFrame(tick);
} }
} function getQR(val) {
that.$emit("getQRCode", val)
}
},
} }
} }
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
// this.subscanQRCallBack(111) // this.subscanQRCallBack(111)
// 微信环境下 打开js扫码 (暂时关闭) // 微信环境下 打开js扫码 (暂时关闭)
if (isWeiXin()){ if (true){
this.showPop = true this.showPop = true
} else { } else {
callMobile("qrcode", {}); callMobile("qrcode", {});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment