diff --git a/src/liff/App.svelte b/src/liff/App.svelte index 416e62c8..9d81cd0a 100644 --- a/src/liff/App.svelte +++ b/src/liff/App.svelte @@ -5,6 +5,7 @@ import Comment from './pages/Comment.svelte'; import UserSetting from './pages/UserSetting.svelte'; import Feedback from './pages/Feedback.svelte'; + import Mgp from './pages/Mgp.svelte'; const routes = { article: Article, @@ -12,6 +13,7 @@ setting: UserSetting, comment: Comment, feedback: Feedback, + mgp: Mgp, }; // Send pageview with correct path on each page change. diff --git a/src/liff/index.js b/src/liff/index.js index e1a33e8c..e7077a47 100644 --- a/src/liff/index.js +++ b/src/liff/index.js @@ -18,15 +18,7 @@ liff.init({ liffId: LIFF_ID }).then(() => { redirectUri: location.href, }); } else { - const userId = liff.getDecodedIDToken().sub; - dataLayer.push({ userId }); - - const params = new URLSearchParams(location.search); - if (params.get('p') === 'mgp') { - // Replace login with survey - window.location.href = `https://www.surveycake.com/s/eqNpB?ssn0=${userId}&ssn58=cofacts&openExternalBrowser=1`; - return; - } + dataLayer.push({ userId: liff.getDecodedIDToken().sub }); // Kickstart app loading; fire assertions new App({ target: document.body }); diff --git a/src/liff/pages/Mgp.svelte b/src/liff/pages/Mgp.svelte new file mode 100644 index 00000000..a99d9ab1 --- /dev/null +++ b/src/liff/pages/Mgp.svelte @@ -0,0 +1,18 @@ + + + + + + Cofacts x 第四屆 MyGoPen 謠言惑眾獎 + + +