|
|
|
|
@ -94,6 +94,10 @@ const domain = computed(()=>{
|
|
|
|
|
return store.state.domain
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const sso_domain = computed(()=>{
|
|
|
|
|
return store.state.sso_domain
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const getVerifyMsg = ref("獲取驗證碼");
|
|
|
|
|
const showGetVerifyBtn = ref(false);
|
|
|
|
|
const countdown = ref(0);
|
|
|
|
|
@ -164,14 +168,13 @@ const handleLogin = async () => {
|
|
|
|
|
|
|
|
|
|
let res = await login(form.value);
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
console.log('login',domain.value)
|
|
|
|
|
Cookies.set("token", res.data.token, {
|
|
|
|
|
expires: 365,
|
|
|
|
|
domain: domain.value,
|
|
|
|
|
domain: sso_domain.value,
|
|
|
|
|
});
|
|
|
|
|
Cookies.set("uid", res.data.uid, {
|
|
|
|
|
expires: 365,
|
|
|
|
|
domain: domain.value,
|
|
|
|
|
domain: sso_domain.value,
|
|
|
|
|
});
|
|
|
|
|
router.push("/");
|
|
|
|
|
}else{
|
|
|
|
|
@ -182,7 +185,7 @@ const handleLogin = async () => {
|
|
|
|
|
const handleLineLogin = async () => {
|
|
|
|
|
// router.push('/')
|
|
|
|
|
const client_id = process.env.VUE_APP_LINE_CLINE_ID;
|
|
|
|
|
const redirect_uri = 'https://card.' + domain.value + "/home/linelogin";
|
|
|
|
|
const redirect_uri = 'https://' + domain.value + "/home/linelogin";
|
|
|
|
|
|
|
|
|
|
let link = "https://access.line.me/oauth2/v2.1/authorize?";
|
|
|
|
|
link = link + "response_type=code";
|
|
|
|
|
|