浏览代码

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"
     })
     .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
         if (!liff.isLoggedIn()) {
             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 {
             console.log("您已登入");
         }