Quellcode durchsuchen

「風」通行證

Mike vor 3 Jahren
Ursprung
Commit
df80c378f5
1 geänderte Dateien mit 2 neuen und 5 gelöschten Zeilen
  1. 2 5
      ArkCard-web/event.html

+ 2 - 5
ArkCard-web/event.html

@@ -140,8 +140,6 @@ $(".nft-event").submit(function (e) {
 });
 
 $(document).ready(function () {
-    var userId = "";
-
     // 取得liff_id
     liff.init({
         liffId: "1656404434-DoEqYOad"
@@ -153,16 +151,15 @@ $(document).ready(function () {
         var profile = liff.getProfile();
         console.log(profile);
 
-        userId = context.userId;
-
         // login
         if (!liff.isLoggedIn()) {
             console.log("您未登入");
             console.log('context.userId = ' + context.userId); // test
-            liff.login({ redirectUri: "https://ark.cards/event.html" });  // test
         } else {
             console.log("您已登入");
         }
+
+        $('#userId').text(context.userId);
     })
     .catch((err) => {
         console.log('初始化失敗: ' + err.code + ", " + err.message);