login頁面修正

main
Wayne Hsu 3 years ago
parent 30ce1ccd8e
commit a84c5fd8b5

@ -77,7 +77,7 @@ export default {
toClipboard(share_url) toClipboard(share_url)
Toast('已放入剪貼簿') Toast('已放入剪貼簿')
} else if (option.key === 'line') { } 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') { } else if (option.key === 'fb') {
window.open('https://www.facebook.com/share.php?u='+ encodeURI(share_url),'_blank') window.open('https://www.facebook.com/share.php?u='+ encodeURI(share_url),'_blank')
} }

@ -869,6 +869,7 @@ export default defineComponent({
show_cus: state.form.showNfc, show_cus: state.form.showNfc,
cus_card: JSON.stringify(state.form), cus_card: JSON.stringify(state.form),
}); });
if (res.code === 200) { if (res.code === 200) {
store.commit("user/setCusCard", JSON.stringify(state.form)); store.commit("user/setCusCard", JSON.stringify(state.form));
Toast.success("建立成功"); Toast.success("建立成功");

@ -124,7 +124,7 @@ const changeActive = async (type)=>{
} }
const goCard = (url) => { const goCard = (url) => {
window.open(url + '&nouc=1', '_blank') window.open(url + '&nouc=1&nolog=1', '_blank')
} }
const handleAddFavorite = async (userid) => { const handleAddFavorite = async (userid) => {

@ -201,7 +201,7 @@ onBeforeMount(async () => {
} }
} catch (err) { } catch (err) {
console.log(`liff.state init error ${err}`); console.log(`liff.state init error ${err}`);
Toast('登入失敗。請聯絡管理員') Toast('登入失敗。請聯絡管理員,(1001)')
router.push('/login') router.push('/login')
} }
@ -274,7 +274,7 @@ onBeforeMount(async () => {
} else { } else {
Toast('登入失敗。請聯絡管理員') Toast('登入失敗。請聯絡管理員,(1002)')
router.push('/login') router.push('/login')
} }
} }
@ -347,6 +347,7 @@ const bindTggo = () => {
} }
const handleLogout = () => { const handleLogout = () => {
console.log({ domain: process.env.VUE_APP_DOMAIN})
Cookies.remove('token',{ domain: process.env.VUE_APP_DOMAIN}) Cookies.remove('token',{ domain: process.env.VUE_APP_DOMAIN})
Cookies.remove('uid',{ domain: process.env.VUE_APP_DOMAIN}) Cookies.remove('uid',{ domain: process.env.VUE_APP_DOMAIN})
router.push('/login') router.push('/login')

@ -72,15 +72,16 @@ const handleLogin = async ()=>{
} }
const handleLineLogin = async () => { const handleLineLogin = async () => {
const client_id = '1657876696' router.push('/')
const redirect_uri = '' // const client_id = '1657876696'
let link = 'https://access.line.me/oauth2/v2.1/authorize?' // const redirect_uri = ''
link = link + 'response_type=code' // let link = 'https://access.line.me/oauth2/v2.1/authorize?'
link += '&client_id=' + client_id // link = link + 'response_type=code'
link += '&redirect_uri=' + redirect_uri // link += '&client_id=' + client_id
link += '&state=login' // link += '&redirect_uri=' + redirect_uri
link += '&scope=openid%20profile' // link += '&state=login'
window.location.href = link // link += '&scope=openid%20profile'
// window.location.href = link
} }
</script> </script>

@ -14,7 +14,7 @@ module.exports = {
short_name: "Slash", short_name: "Slash",
background_color: "#3367D6", background_color: "#3367D6",
manifestOptions: { manifestOptions: {
display: "standalone", display: "browser",
icons: [ icons: [
{ {
src: "./img/icons/logo.png", src: "./img/icons/logo.png",

Loading…
Cancel
Save