Mike 3 роки тому
батько
коміт
ecbaa1ff8c
1 змінених файлів з 3 додано та 13 видалено
  1. 3 13
      ArkCard-web/collect.html

+ 3 - 13
ArkCard-web/collect.html

@@ -382,26 +382,16 @@ liff.init({
 
     // liff.login({ redirectUri: "https://ark.cards/collect.html?"+context.contextId });  // test   
 
-    /*
     // login
     if (!liff.isLoggedIn()) {
         console.log("您未登入");
-        liff.login({ redirectUri: "https://ark.cards/collect.html?U171a225ef8a06a3491f1d94310b7b265" });  // test
-
-        // // scanCodeV2 call
-        // liff.scanCodeV2().then(result => {
-        //     // e.g. result = { value: "Hello LIFF app!" }
-        //     console.log('scanCodeV2()'); // test
-        // }).catch(err => {
-        //     console.log(err);
-        // });
+        liff.login({ redirectUri: "https://ark.cards/collect.html?"+profile.userId });  // test
     } else {
         console.log("您已登入");
     }
-    */
 })
 .catch((err) => {
-    console.log("初始化失敗");
+    console.log(err.code, err.message);
 });
 
 $(".qrcode").click(function () {
@@ -413,7 +403,7 @@ $(".qrcode").click(function () {
         alert(result.value); // test
     }).catch(err => {
         alert(err); // test
-        console.log(err);
+        console.log(err.code, err.message);
     });
 });
 </script>