|
@@ -375,8 +375,8 @@ $(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);
|
|
@@ -386,7 +386,9 @@ $(document).ready(function () {
|
|
|
// login
|
|
|
if (!liff.isLoggedIn()) {
|
|
|
console.log("您未登入");
|
|
|
- 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("您已登入");
|
|
|
}
|
|
@@ -425,15 +427,15 @@ $(document).ready(function () {
|
|
|
*/
|
|
|
|
|
|
$(".qrcode").click(function () {
|
|
|
- alert('QRCode Scanner Starting V2'); // test
|
|
|
+ // alert('QRCode Scanner Starting V2'); // test
|
|
|
|
|
|
// scanCodeV2 call
|
|
|
liff.scanCodeV2().then(result => {
|
|
|
// e.g. result = { value: "Hello LIFF app!" }
|
|
|
- alert(JSON.stringify(result)); // test
|
|
|
+ // alert(JSON.stringify(result)); // test
|
|
|
$('#address').val(result.value);
|
|
|
}).catch(err => {
|
|
|
- alert(JSON.stringify(err)); // test
|
|
|
+ // alert(JSON.stringify(err)); // test
|
|
|
console.log(JSON.stringify(err));
|
|
|
});
|
|
|
});
|