瀏覽代碼

QRCode Scanner (LIFF)

Mike 3 年之前
父節點
當前提交
18964ab9da
共有 1 個文件被更改,包括 6 次插入8 次删除
  1. 6 8
      ArkCard-web/collect.html

+ 6 - 8
ArkCard-web/collect.html

@@ -375,20 +375,18 @@ $(document).ready(function () {
         liffId: "1656404434-gJ0Nzy1Y"
         liffId: "1656404434-gJ0Nzy1Y"
     })
     })
     .then(() => {
     .then(() => {
-        // var context = liff.getContext();
-        // console.log(context);
+        var context = liff.getContext();
+        console.log(context);
 
 
-        var profile = liff.getProfile();
-        console.log(profile);
-
-        // liff.login({ redirectUri: "https://ark.cards/collect.html?"+context.contextId });  // test   
+        // var profile = liff.getProfile();
+        // console.log(profile);
 
 
         // login
         // login
         if (!liff.isLoggedIn()) {
         if (!liff.isLoggedIn()) {
             console.log("您未登入");
             console.log("您未登入");
             
             
-            liff.login({ redirectUri: "https://liff.line.me/1656404434-gJ0Nzy1Y?"+context.userId });  // test
-            // liff.login({ redirectUri: "https://ark.cards/collect.html?"+context.userId });  // test
+            // liff.login({ redirectUri: "https://liff.line.me/1656404434-gJ0Nzy1Y?"+context.userId });  // test
+            liff.login({ redirectUri: "https://ark.cards/collect.html?"+context.userId });  // test
         } else {
         } else {
             console.log("您已登入");
             console.log("您已登入");
         }
         }