fix: 更新API和基础URL至h.hifastapp.com
All checks were successful
site-dist-deploy / build-and-deploy (push) Successful in 59s

修复登录表单的HTML结构和类型定义
将API目标服务器和基础URL从h.hifastvpn.com更新为h.hifastapp.com
优化登录表单的HTML结构,添加表单提交处理和自动完成属性
This commit is contained in:
shanshanzhong 2026-01-04 22:22:00 -08:00
parent 3fddc11b17
commit 1cae216052
3 changed files with 15 additions and 10 deletions

View File

@ -12,7 +12,7 @@ on:
env:
VITE_APP_BASE_URL: https://h.hifastvpn.com
VITE_APP_BASE_URL: https://h.hifastapp.com
SSH_HOST: ${{ vars.PRO_SSH_HOST }}
SSH_PORT: ${{ vars.PRO_SSH_PORT }}
SSH_USER: ${{ vars.PRO_SSH_USER }}
@ -42,7 +42,7 @@ jobs:
- name: Build dist with Unified Script
env:
VITE_APP_BASE_URL: "https://h.hifastvpn.com"
VITE_APP_BASE_URL: "https://h.hifastapp.com"
run: |
chmod +x scripts/ci-build.sh
./scripts/ci-build.sh

View File

@ -1,10 +1,12 @@
<template>
<div class="flex flex-col gap-6 text-base text-black md:text-2xl">
<form @submit.prevent="handleLogin" class="flex flex-col gap-6 text-base text-black md:text-2xl">
<div class="overflow-hidden rounded-[20px] bg-[#78788029] px-4">
<div class="relative">
<Input
v-model="email"
type="email"
name="email"
autocomplete="email"
placeholder="Email"
class="h-[50px] border-none bg-transparent text-base focus-visible:ring-0 md:text-2xl"
/>
@ -16,6 +18,8 @@
<Input
v-model="code"
type="text"
name="code"
autocomplete="one-time-code"
placeholder="验证码"
class="h-[50px] border-none bg-transparent text-base focus-visible:ring-0 md:text-2xl"
/>
@ -33,6 +37,7 @@
<div class="flex gap-4 pt-2">
<Button
type="button"
variant="secondary"
@click="emit('close')"
class="h-[48px] flex-1 cursor-pointer rounded-[25px] bg-[#D1D1D1] text-lg font-medium text-[#757575] hover:bg-[#C1C1C1]"
@ -40,14 +45,14 @@
取消
</Button>
<Button
@click="handleLogin"
type="submit"
class="h-[48px] flex-1 cursor-pointer rounded-[25px] bg-[#A8FF53] text-lg font-medium text-black hover:bg-[#96E64A]"
>
登录/注册
</Button>
</div>
<CodeSentTip ref="CodeSentTipRef" />
</div>
</form>
</template>
<script setup lang="ts">
@ -59,7 +64,7 @@ import CodeSentTip from '@/pages/Home/components/CodeSentTip.vue'
import request from '@/utils/request'
import { useRouter } from 'vue-router'
const CodeSentTipRef = ref(null)
const CodeSentTipRef = ref<InstanceType<typeof CodeSentTip> | null>(null)
const email = ref('')
const code = ref('')
const countdown = ref(0)
@ -70,10 +75,10 @@ const handleGetCode = () => {
toast('请输入邮箱')
return
}
CodeSentTipRef.value.show()
CodeSentTipRef.value?.show()
request
.get('/api/v1/auth/check', {
.get<{ exist: boolean }>('/api/v1/auth/check', {
email: email.value,
})
.then(({ exist }) => {
@ -96,7 +101,7 @@ const handleGetCode = () => {
const router = useRouter()
const handleLogin = () => {
request
.post('/api/v1/auth/login/email', {
.post<any, { token: string }>('/api/v1/auth/login/email', {
email: email.value,
code: code.value,
})

View File

@ -19,7 +19,7 @@ export default defineConfig({
// 将所有以 /api 开头的请求转发到目标服务器
// 1. 匹配所有以 /public 开头的请求
'/api/v1': {
target: 'https://h.hifastvpn.com',
target: 'https://h.hifastapp.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
autoRewrite: true,