From 9d608fdabf54eab6236312a7a5d899fc273845d7 Mon Sep 17 00:00:00 2001 From: zhaoyz Date: Fri, 2 Feb 2024 09:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/axios/index.ts | 3 +-- src/views/login/login.vue | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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 = () => {