diff --git a/src/axios/index.ts b/src/axios/index.ts index 1ac726e..fd0aa81 100644 --- a/src/axios/index.ts +++ b/src/axios/index.ts @@ -1,7 +1,6 @@ import axios from "axios"; -// const HOST = 'http://127.0.0.1:3001'; -const HOST = 'http://123.57.147.184:3001'; +export const HOST = 'http://localhost:9999'; const BASE_URL = import.meta.env.BASE_URL export const get = (url: any, params: any, success: any) => { diff --git a/src/views/login/login.vue b/src/views/login/login.vue index 953906b..f41e6d7 100644 --- a/src/views/login/login.vue +++ b/src/views/login/login.vue @@ -101,7 +101,7 @@ - + @@ -124,6 +124,7 @@ import {ElMessage, ElMessageBox} from 'element-plus' import {useLoginStore} from '@/stores/user-info-store' import {getHospitalsData, getPhoneAreasData} from '@/static-data/core' import {v4} from "uuid"; +import {HOST} from "@/axios"; const router = useRouter() @@ -266,8 +267,12 @@ const login = async (type: string) => { function getCaptchaCode() { isShowRegister.value = true + refreshImg() +} + +function refreshImg() { const randomStr = v4() - captchaImgUrl.value = 'http://localhost:9999/admin/code/textImage?randomStr=' + randomStr + captchaImgUrl.value = HOST + '/admin/code/textImage?randomStr=' + randomStr } const toHome = () => {