From d0d758667910cb89f31bbc864c74adeea9274542 Mon Sep 17 00:00:00 2001 From: Wayne Date: Sat, 15 Jul 2023 15:55:44 +0800 Subject: [PATCH] login page --- .env.dev | 8 ++++---- .env.development | 8 ++++---- src/pages/login/index.vue | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.env.dev b/.env.dev index 95f598c..a1c77fb 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ -VITE_APP_BASE_URL = 'http://localhost:8080/' +VITE_APP_BASE_URL = 'https://shop.h888.fun/' -VITE_APP_BACKEND_URL = 'http://localhost:8080/adm/' +VITE_APP_BACKEND_URL = 'https://shop.h888.fun/adm/' -VITE_APP_IMG_URL = 'http://localhost:8080/' +VITE_APP_IMG_URL = 'https://shop.h888.fun/' -VITE_APP_API_URL = 'http://localhost:8080/adminapi/v1' +VITE_APP_API_URL = 'https://shop.h888.fun/adminapi/v1' diff --git a/.env.development b/.env.development index 95f598c..a1c77fb 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ -VITE_APP_BASE_URL = 'http://localhost:8080/' +VITE_APP_BASE_URL = 'https://shop.h888.fun/' -VITE_APP_BACKEND_URL = 'http://localhost:8080/adm/' +VITE_APP_BACKEND_URL = 'https://shop.h888.fun/adm/' -VITE_APP_IMG_URL = 'http://localhost:8080/' +VITE_APP_IMG_URL = 'https://shop.h888.fun/' -VITE_APP_API_URL = 'http://localhost:8080/adminapi/v1' +VITE_APP_API_URL = 'https://shop.h888.fun/adminapi/v1' diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 74e6b3b..ec713aa 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -89,12 +89,13 @@ const onSubmit = async () => { let { data: res} = await axios.post(import.meta.env.VITE_APP_BACKEND_URL + "privilege.php?act=signin", form.value); if (res.code !== 200) { captchaImgUrl.value = import.meta.env.VITE_APP_BACKEND_URL + 'index.php?act=captcha&'+Math.random() - + form.value.captcha = "" return ElMessage.error(res.data.msg); } Cookies.set('Authorization', 'Bearer ' + res.token) window.location.href = "index.php"; + return }catch(e){ console.log(e); }