From a84c5fd8b51ee4003756b85b9189ffa430760ba0 Mon Sep 17 00:00:00 2001 From: Wayne Hsu Date: Mon, 20 Feb 2023 08:06:33 +0800 Subject: [PATCH] =?UTF-8?q?login=E9=A0=81=E9=9D=A2=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Footer.vue | 2 +- src/views/Card/Edit.vue | 1 + src/views/Connections/index.vue | 2 +- src/views/Home/index.vue | 5 +++-- src/views/Login/index.vue | 19 ++++++++++--------- vue.config.js | 2 +- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/components/Footer.vue b/src/components/Footer.vue index 1db6b21..0b76285 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -77,7 +77,7 @@ export default { toClipboard(share_url) Toast('已放入剪貼簿') } else if (option.key === 'line') { - window.open('https://social-plugins.line.me/lineit/share?url=' + encodeURI(share_url),'_blank') + window.location.href = 'https://social-plugins.line.me/lineit/share?url=' + encodeURI(share_url) } else if (option.key === 'fb') { window.open('https://www.facebook.com/share.php?u='+ encodeURI(share_url),'_blank') } diff --git a/src/views/Card/Edit.vue b/src/views/Card/Edit.vue index 8c04dd0..86709d2 100644 --- a/src/views/Card/Edit.vue +++ b/src/views/Card/Edit.vue @@ -869,6 +869,7 @@ export default defineComponent({ show_cus: state.form.showNfc, cus_card: JSON.stringify(state.form), }); + if (res.code === 200) { store.commit("user/setCusCard", JSON.stringify(state.form)); Toast.success("建立成功"); diff --git a/src/views/Connections/index.vue b/src/views/Connections/index.vue index 62e0cd1..117aa6f 100644 --- a/src/views/Connections/index.vue +++ b/src/views/Connections/index.vue @@ -124,7 +124,7 @@ const changeActive = async (type)=>{ } const goCard = (url) => { - window.open(url + '&nouc=1', '_blank') + window.open(url + '&nouc=1&nolog=1', '_blank') } const handleAddFavorite = async (userid) => { diff --git a/src/views/Home/index.vue b/src/views/Home/index.vue index 3533bcc..2ad4726 100644 --- a/src/views/Home/index.vue +++ b/src/views/Home/index.vue @@ -201,7 +201,7 @@ onBeforeMount(async () => { } } catch (err) { console.log(`liff.state init error ${err}`); - Toast('登入失敗。請聯絡管理員') + Toast('登入失敗。請聯絡管理員,(1001)') router.push('/login') } @@ -274,7 +274,7 @@ onBeforeMount(async () => { } else { - Toast('登入失敗。請聯絡管理員') + Toast('登入失敗。請聯絡管理員,(1002)') router.push('/login') } } @@ -347,6 +347,7 @@ const bindTggo = () => { } const handleLogout = () => { + console.log({ domain: process.env.VUE_APP_DOMAIN}) Cookies.remove('token',{ domain: process.env.VUE_APP_DOMAIN}) Cookies.remove('uid',{ domain: process.env.VUE_APP_DOMAIN}) router.push('/login') diff --git a/src/views/Login/index.vue b/src/views/Login/index.vue index 02419d2..09142a8 100644 --- a/src/views/Login/index.vue +++ b/src/views/Login/index.vue @@ -72,15 +72,16 @@ const handleLogin = async ()=>{ } const handleLineLogin = async () => { - const client_id = '1657876696' - const redirect_uri = '' - let link = 'https://access.line.me/oauth2/v2.1/authorize?' - link = link + 'response_type=code' - link += '&client_id=' + client_id - link += '&redirect_uri=' + redirect_uri - link += '&state=login' - link += '&scope=openid%20profile' - window.location.href = link + router.push('/') + // const client_id = '1657876696' + // const redirect_uri = '' + // let link = 'https://access.line.me/oauth2/v2.1/authorize?' + // link = link + 'response_type=code' + // link += '&client_id=' + client_id + // link += '&redirect_uri=' + redirect_uri + // link += '&state=login' + // link += '&scope=openid%20profile' + // window.location.href = link } diff --git a/vue.config.js b/vue.config.js index 11ef3d6..2b6c564 100644 --- a/vue.config.js +++ b/vue.config.js @@ -14,7 +14,7 @@ module.exports = { short_name: "Slash", background_color: "#3367D6", manifestOptions: { - display: "standalone", + display: "browser", icons: [ { src: "./img/icons/logo.png",