-
- 其他開卡方式
-
-
-
+
+
diff --git a/src/views/Login/index.vue b/src/views/Login/index.vue
index a13fd63..537cf9c 100644
--- a/src/views/Login/index.vue
+++ b/src/views/Login/index.vue
@@ -14,16 +14,18 @@ const router = useRouter();
const store = useStore();
+const loginMethod = ref('line')
+
const form = ref({
username: "",
password: "",
});
-const domain = computed(()=>{
+const domain = computed(() => {
return store.state.domain
});
-const sso_domain = computed(()=>{
+const sso_domain = computed(() => {
return store.state.sso_domain
});
@@ -32,7 +34,7 @@ const showGetVerifyBtn = ref(false);
const countdown = ref(0);
const handleGetVerify = async () => {
- if(!showGetVerifyBtn.value){
+ if (!showGetVerifyBtn.value) {
return
}
if (!form.value.username) {
@@ -106,10 +108,10 @@ const handleLogin = async () => {
domain: sso_domain.value,
});
router.push("/");
- }else if(res.code === 201){
+ } else if (res.code === 201) {
sessionStorage.setItem("reg", form.value.username);
router.push({ name: "Register", query: { type: "mobile" } });
- }else{
+ } else {
Toast(res.message);
}
};
@@ -117,13 +119,13 @@ const handleLogin = async () => {
const handleLineLogin = async () => {
// router.push('/')
const client_id = process.env.VUE_APP_LINE_CLINE_ID;
-
+
//判斷domain是否包含localhost
let redirect_uri = '';
- if(domain.value.includes('localhost')){
+ if (domain.value.includes('localhost')) {
redirect_uri = 'http://' + domain.value + ":8080/home/linelogin";
- }else{
- redirect_uri = 'https://' + domain.value + "/home/linelogin";
+ } else {
+ redirect_uri = 'https://' + domain.value + "/home/linelogin";
}
let link = "https://access.line.me/oauth2/v2.1/authorize?";
@@ -146,65 +148,53 @@ onUnmounted(() => {