From af628a14bd8583a6c567f96b59c36dfa212f2b57 Mon Sep 17 00:00:00 2001 From: JianMiau Date: Wed, 15 Nov 2023 17:22:44 +0800 Subject: [PATCH] =?UTF-8?q?[mod]=20aspectMode=20=E5=BE=9Ecover=E6=94=B9?= =?UTF-8?q?=E7=82=BAfit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liff-starter.js | 62 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/liff-starter.js b/liff-starter.js index 7853416..f368890 100644 --- a/liff-starter.js +++ b/liff-starter.js @@ -7,11 +7,11 @@ window.onload = function (_0xe315c8) { if (!liff.isLoggedIn()) { liff.login({ redirectUri: location.href }); } else { - getP(); + getParameter(); } }); }; -function getP() { +function getParameter() { var type = getParameterByName("type"); if (!type) { document.getElementById("textx").addEventListener("click", function () { @@ -62,7 +62,7 @@ function getP() { makeAudio(); makeSticker(); meProfile(); - // makeTest(); + makeTest(); // makeDouDou(); makeBW(); } @@ -167,7 +167,7 @@ function makeSticker() { "type": "image", "url": "https://stickershop.line-scdn.net/stickershop/v1/sticker/85913166/IOS/sticker_animation@2x.png", "size": "full", - "aspectMode": "cover", + "aspectMode": "fit", "animated": true, "backgroundColor": "#FFFFFF00" } @@ -199,7 +199,7 @@ function makeSticker() { "type": "image", "url": "https://stickershop.line-scdn.net/stickershop/v1/sticker/" + sid + pngtype, "size": "full", - "aspectMode": "cover", + "aspectMode": "fit", "animated": true, "backgroundColor": "#FFFFFF00" } @@ -277,26 +277,52 @@ function makeTest() { { "type": "bubble", "size": "mega", + "hero": { + "type": "image", + "url": "https://i.imgur.com/BNF0CiC.png", + "size": "full", + "aspectRatio": "20:13", + "aspectMode": "cover", + "action": { + "type": "uri", + "uri": "https://liff.line.me/1656796140-BaDWXE29?GameId=147&Promotion=36tNMgn&RefAccount=BeH7585" + } + }, "body": { "type": "box", "layout": "vertical", "contents": [ { - "type": "image", - "url": "https://i.imgur.com/BNF0CiC.png", - "size": "full", - "aspectRatio": "20:13", - "aspectMode": "cover", - "animated": false, - "backgroundColor": "#FFFFFF00" + "type": "text", + "text": "剛剛不小心在金爸爸尻到100倍大獎", + "weight": "bold", + "size": "md" + }, + { + "type": "text", + "text": "實力不允許我低調", + "align": "center", + "weight": "bold" + } + ] + }, + "footer": { + "type": "box", + "layout": "vertical", + "spacing": "sm", + "contents": [ + { + "type": "button", + "style": "link", + "height": "sm", + "action": { + "type": "uri", + "label": "點進來一起領獎金", + "uri": "https://liff.line.me/1656796140-BaDWXE29?GameId=147&Promotion=36tNMgn&RefAccount=BeH7585" + } } ], - "paddingAll": "none" - }, - "action": { - "type": "uri", - "label": "action", - "uri": "https://i.imgur.com/BNF0CiC.png" + "flex": 0 } } }];