浏览代码

qrcode scanner (liff)

Mike 3 年之前
父节点
当前提交
13c5a198cc
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      ArkCard-web/collect.html

+ 4 - 2
ArkCard-web/collect.html

@@ -378,6 +378,7 @@ $(document).ready(function () {
         var context = liff.getContext();
         console.log(context);
 
+        /*
         var profile = liff.getProfile();
         console.log(profile);
 
@@ -387,6 +388,7 @@ $(document).ready(function () {
         } else {
             console.log("您已登入");
         }
+        */
         
         // liff.login({ redirectUri: "https://liff.line.me/1656404434-gJ0Nzy1Y?"+context.userId });  // test
         console.log('context.userId = ' + context.userId); // test
@@ -426,12 +428,12 @@ $(document).ready(function () {
     */
 
     $(".qrcode").click(function () {
-        alert('掃描QRCode'); // test
+        // alert('掃描QRCode'); // test
         
         // scanCodeV2 call
         liff.scanCodeV2().then(result => {
             // e.g. result = { value: "Hello LIFF app!" }
-            alert(JSON.stringify(result)); // test
+            // alert(JSON.stringify(result)); // test
             $('#address').val(result.value);
         }).catch(err => {
             // alert(JSON.stringify(err)); // test