|
@@ -339,7 +339,7 @@
|
|
|
<input id="address" style="border-radius: 10px; border:none;" class="p-2 w-100 mb-3" type="text" name="address" placeholder="請輸入您要發送的地址" required>
|
|
|
<div class="text-end px-2">
|
|
|
<p class="text-start text-white mb-2">※一次只能發送一則NFT收藏品</p>
|
|
|
- <button type="button" style="border:1px solid #fff; border-radius: 30px;" class="qrcode btn text-white px-3">掃描QRCode</button>
|
|
|
+ <button id="qrcodeButton"type="button" style="border:1px solid #fff; border-radius: 30px;" class="qrcode btn text-white px-3">掃描QRCode</button>
|
|
|
<button type="button" style="border:1px solid #fff; border-radius: 30px;" class="close btn text-white px-3">取消</button>
|
|
|
<input style="border-radius: 30px; background:#fff; border: none;" class="send-btn p-2 ms-1" type="submit" value="確定發送">
|
|
|
<!-- <button sty type="button" style="border-radius: 30px; background:#fff;" class="btn ms-2">確定發送</button> -->
|
|
@@ -395,9 +395,11 @@ $(document).ready(function () {
|
|
|
console.log('初始化失敗: ' + err.code + ", " + err.message);
|
|
|
});
|
|
|
|
|
|
- $(".qrcode").click(function () {
|
|
|
- /*
|
|
|
- liff.scanCode().then(result => {
|
|
|
+ document.getElementById('qrcodeButton').addEventListener('click', function() {
|
|
|
+ alert('QRCode Scanner Starting'); // test
|
|
|
+
|
|
|
+ // scanCodeV2 call
|
|
|
+ liff.scanCodeV2().then(result => {
|
|
|
// e.g. result = { value: "Hello LIFF app!" }
|
|
|
alert(JSON.stringify(result)); // test
|
|
|
$('#address').val(result.value);
|
|
@@ -405,7 +407,10 @@ $(document).ready(function () {
|
|
|
alert(JSON.stringify(err)); // test
|
|
|
console.log(JSON.stringify(err));
|
|
|
});
|
|
|
- */
|
|
|
+ });
|
|
|
+
|
|
|
+ /*
|
|
|
+ $(".qrcode").click(function () {
|
|
|
alert('QRCode Scanner Starting'); // test
|
|
|
|
|
|
// scanCodeV2 call
|
|
@@ -418,6 +423,7 @@ $(document).ready(function () {
|
|
|
console.log(JSON.stringify(err));
|
|
|
});
|
|
|
});
|
|
|
+ */
|
|
|
});
|
|
|
</script>
|
|
|
</body>
|