|
@@ -395,6 +395,7 @@ $(document).ready(function () {
|
|
|
console.log('初始化失敗: ' + err.code + ", " + err.message);
|
|
|
});
|
|
|
|
|
|
+ /*
|
|
|
document.getElementById('qrcodeButton').addEventListener('click', function() {
|
|
|
alert('啟動QRCode Scanner'); // test
|
|
|
|
|
@@ -408,10 +409,22 @@ $(document).ready(function () {
|
|
|
console.log(JSON.stringify(err));
|
|
|
});
|
|
|
});
|
|
|
+ */
|
|
|
+
|
|
|
+ $(".qrcode").click(function () {
|
|
|
+ alert('QRCode Scanner Starting V1'); // test
|
|
|
+
|
|
|
+ if (liff.scanCode) {
|
|
|
+ liff.scanCode().then(result => {
|
|
|
+ alert(JSON.stringify(result)); // test
|
|
|
+ $('#address').val(result.value);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
/*
|
|
|
$(".qrcode").click(function () {
|
|
|
- alert('QRCode Scanner Starting'); // test
|
|
|
+ alert('QRCode Scanner Starting V2'); // test
|
|
|
|
|
|
// scanCodeV2 call
|
|
|
liff.scanCodeV2().then(result => {
|