Mike пре 3 година
родитељ
комит
c953afd65d
1 измењених фајлова са 7 додато и 3 уклоњено
  1. 7 3
      ArkCard-web/collect.html

+ 7 - 3
ArkCard-web/collect.html

@@ -374,10 +374,13 @@ liff.init({
     liffId: "1656494344-JovNdOv0"
     liffId: "1656494344-JovNdOv0"
 })
 })
 .then(() => {
 .then(() => {
-    const context = liff.getContext();
-    console.log(context.contextId);
+    var context = liff.getContext();
+    console.log(context);
 
 
-    liff.login({ redirectUri: "https://ark.cards/collect.html?"+context.contextId });  // test   
+    var profile = liff.getProfile();
+    console.log(profile);
+
+    // liff.login({ redirectUri: "https://ark.cards/collect.html?"+context.contextId });  // test   
 
 
     /*
     /*
     // login
     // login
@@ -409,6 +412,7 @@ $(".qrcode").click(function () {
         // e.g. result = { value: "Hello LIFF app!" }
         // e.g. result = { value: "Hello LIFF app!" }
         alert(result.value); // test
         alert(result.value); // test
     }).catch(err => {
     }).catch(err => {
+        alert(err); // test
         console.log(err);
         console.log(err);
     });
     });
 });
 });