2026-02-24 09:59:22 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="mobile-container">
|
|
|
|
|
|
<div class="auth-container">
|
|
|
|
|
|
<div class="logo-section">
|
|
|
|
|
|
<div class="logo">Yumi</div>
|
|
|
|
|
|
<div class="subtitle">美甲服务平台</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tab-container">
|
|
|
|
|
|
<div
|
|
|
|
|
|
class="tab-item"
|
|
|
|
|
|
:class="{ active: activeTab === 'login' }"
|
|
|
|
|
|
@click="activeTab = 'login'"
|
|
|
|
|
|
>
|
|
|
|
|
|
登录
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
|
|
|
class="tab-item"
|
|
|
|
|
|
:class="{ active: activeTab === 'register' }"
|
|
|
|
|
|
@click="activeTab = 'register'"
|
|
|
|
|
|
>
|
|
|
|
|
|
注册
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-03-03 14:39:02 +08:00
|
|
|
|
<div v-if="activeTab === 'login'" class="login-type-toggle">
|
|
|
|
|
|
<a-radio-group v-model:value="loginType" button-style="solid">
|
|
|
|
|
|
<a-radio-button value="password">账号密码登录</a-radio-button>
|
|
|
|
|
|
<a-radio-button value="phone">手机验证码登录</a-radio-button>
|
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-02-24 09:59:22 +08:00
|
|
|
|
<a-form
|
|
|
|
|
|
:model="formData"
|
|
|
|
|
|
:rules="rules"
|
|
|
|
|
|
@finish="handleSubmit"
|
|
|
|
|
|
layout="vertical"
|
|
|
|
|
|
class="auth-form"
|
|
|
|
|
|
>
|
2026-02-27 15:57:14 +08:00
|
|
|
|
<a-form-item v-if="activeTab === 'register'" name="nickname" label="昵称">
|
2026-02-24 09:59:22 +08:00
|
|
|
|
<a-input
|
2026-02-27 15:57:14 +08:00
|
|
|
|
v-model:value="formData.nickname"
|
|
|
|
|
|
placeholder="请输入昵称"
|
2026-02-24 09:59:22 +08:00
|
|
|
|
size="large"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #prefix>
|
|
|
|
|
|
<UserOutlined style="color: #999" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-input>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
2026-03-03 14:39:02 +08:00
|
|
|
|
<a-form-item name="account" label="账号" v-if="activeTab === 'login' && loginType === 'password'">
|
2026-02-27 15:57:14 +08:00
|
|
|
|
<a-input
|
|
|
|
|
|
v-model:value="formData.account"
|
|
|
|
|
|
placeholder="请输入账号"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
@blur="handleAccountBlur"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #prefix>
|
|
|
|
|
|
<UserOutlined style="color: #999" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-input>
|
|
|
|
|
|
<div v-if="accountStatus" class="account-status">
|
|
|
|
|
|
<span v-if="accountStatus.exists" class="status-success">
|
|
|
|
|
|
账号存在,昵称:{{ accountStatus.nickname }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span v-else class="status-error">
|
|
|
|
|
|
账号不存在
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
2026-03-03 14:39:02 +08:00
|
|
|
|
<a-form-item name="phone" label="手机号" v-if="activeTab === 'login' && loginType === 'phone'">
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
v-model:value="formData.phone"
|
|
|
|
|
|
placeholder="请输入手机号"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #prefix>
|
|
|
|
|
|
<UserOutlined style="color: #999" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-input>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<a-form-item name="verificationCode" label="验证码" v-if="activeTab === 'login' && loginType === 'phone'">
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
v-model:value="formData.verificationCode"
|
|
|
|
|
|
placeholder="请输入验证码"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #prefix>
|
|
|
|
|
|
<LockOutlined style="color: #999" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #suffix>
|
|
|
|
|
|
<a-button
|
|
|
|
|
|
type="link"
|
|
|
|
|
|
:disabled="countdown > 0 || !formData.phone"
|
|
|
|
|
|
@click="handleSendVerificationCode"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ countdown > 0 ? `${countdown}秒后重发` : '发送验证码' }}
|
|
|
|
|
|
</a-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-input>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<a-form-item name="password" label="密码" v-if="activeTab === 'login' && loginType === 'password' || activeTab === 'register'">
|
2026-02-24 09:59:22 +08:00
|
|
|
|
<a-input-password
|
|
|
|
|
|
v-model:value="formData.password"
|
|
|
|
|
|
placeholder="请输入密码"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #prefix>
|
|
|
|
|
|
<LockOutlined style="color: #999" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-input-password>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<a-form-item v-if="activeTab === 'register'" name="confirmPassword" label="确认密码">
|
|
|
|
|
|
<a-input-password
|
|
|
|
|
|
v-model:value="formData.confirmPassword"
|
|
|
|
|
|
placeholder="请再次输入密码"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #prefix>
|
|
|
|
|
|
<LockOutlined style="color: #999" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-input-password>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<a-form-item v-if="activeTab === 'register'" name="shopId" label="选择店铺">
|
|
|
|
|
|
<a-select
|
|
|
|
|
|
v-model:value="formData.shopId"
|
|
|
|
|
|
placeholder="请选择店铺"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
:loading="loadingShops"
|
|
|
|
|
|
>
|
|
|
|
|
|
<a-select-option
|
|
|
|
|
|
v-if="shops.length === 0"
|
|
|
|
|
|
disabled
|
|
|
|
|
|
value=""
|
|
|
|
|
|
>
|
|
|
|
|
|
暂无店铺数据
|
|
|
|
|
|
</a-select-option>
|
|
|
|
|
|
<a-select-option
|
|
|
|
|
|
v-for="shop in shops"
|
|
|
|
|
|
:key="shop.id"
|
|
|
|
|
|
:value="shop.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ shop.shopName }}
|
|
|
|
|
|
</a-select-option>
|
|
|
|
|
|
</a-select>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<a-form-item v-if="activeTab === 'login'" style="margin-bottom: 8px">
|
|
|
|
|
|
<div class="form-actions">
|
|
|
|
|
|
<a-checkbox v-model:checked="formData.rememberMe">记住我</a-checkbox>
|
|
|
|
|
|
<a class="forgot-password" @click="handleForgotPassword">忘记密码?</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<a-form-item>
|
|
|
|
|
|
<a-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
html-type="submit"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
block
|
|
|
|
|
|
:loading="loading"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ activeTab === 'login' ? '登录' : '注册' }}
|
|
|
|
|
|
</a-button>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="social-login">
|
|
|
|
|
|
<div class="divider">
|
|
|
|
|
|
<span>其他登录方式</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="social-buttons">
|
|
|
|
|
|
<a-button shape="circle" size="large" @click="handleWeChatLogin">
|
|
|
|
|
|
<WechatOutlined />
|
|
|
|
|
|
</a-button>
|
|
|
|
|
|
<a-button shape="circle" size="large" @click="handleQQLogin">
|
|
|
|
|
|
<QqOutlined />
|
|
|
|
|
|
</a-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-02-25 19:30:44 +08:00
|
|
|
|
|
|
|
|
|
|
<div class="admin-login">
|
|
|
|
|
|
<span class="admin-login-link" @click="handleAdminLogin">管理后台登录</span>
|
|
|
|
|
|
</div>
|
2026-02-24 09:59:22 +08:00
|
|
|
|
</a-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { ref, reactive, onMounted } from 'vue'
|
|
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
|
import { UserOutlined, LockOutlined, WechatOutlined, QqOutlined } from '@ant-design/icons-vue'
|
|
|
|
|
|
import { message } from 'ant-design-vue'
|
|
|
|
|
|
import { authApi } from '@/api/auth'
|
|
|
|
|
|
import { shopApi } from '@/api/shop'
|
2026-02-27 15:57:14 +08:00
|
|
|
|
import { userApi } from '@/api/user'
|
2026-02-24 09:59:22 +08:00
|
|
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
|
|
const activeTab = ref<'login' | 'register'>('login')
|
2026-03-03 14:39:02 +08:00
|
|
|
|
const loginType = ref<'password' | 'phone'>('password')
|
2026-02-24 09:59:22 +08:00
|
|
|
|
const loading = ref(false)
|
|
|
|
|
|
const loadingShops = ref(false)
|
|
|
|
|
|
const shops = ref<any[]>([])
|
2026-02-27 15:57:14 +08:00
|
|
|
|
const accountStatus = ref<any>(null)
|
2026-03-03 14:39:02 +08:00
|
|
|
|
const countdown = ref(0)
|
2026-02-24 09:59:22 +08:00
|
|
|
|
|
|
|
|
|
|
const formData = reactive({
|
|
|
|
|
|
account: '',
|
|
|
|
|
|
password: '',
|
|
|
|
|
|
confirmPassword: '',
|
|
|
|
|
|
nickname: '',
|
|
|
|
|
|
shopId: undefined as number | undefined,
|
2026-03-03 14:39:02 +08:00
|
|
|
|
phone: '',
|
|
|
|
|
|
verificationCode: '',
|
2026-02-24 09:59:22 +08:00
|
|
|
|
rememberMe: false
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const validatePassword = async (_rule: any, value: string) => {
|
|
|
|
|
|
if (value.length < 6) {
|
|
|
|
|
|
return Promise.reject('密码长度不能少于6位')
|
|
|
|
|
|
}
|
|
|
|
|
|
return Promise.resolve()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const validateConfirmPassword = async (_rule: any, value: string) => {
|
|
|
|
|
|
if (!value) {
|
|
|
|
|
|
return Promise.reject('请确认密码')
|
|
|
|
|
|
}
|
|
|
|
|
|
if (value !== formData.password) {
|
|
|
|
|
|
return Promise.reject('两次输入的密码不一致')
|
|
|
|
|
|
}
|
|
|
|
|
|
return Promise.resolve()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const rules = {
|
|
|
|
|
|
account: [
|
|
|
|
|
|
{ required: true, message: '请输入账号', trigger: 'blur' },
|
2026-02-27 15:57:14 +08:00
|
|
|
|
{ min: 3, max: 50, message: '账号长度在3到50个字符', trigger: 'blur' },
|
|
|
|
|
|
{ pattern: /^[a-zA-Z0-9_\-@.]+$/, message: '账号只能包含数字、字母、下划线、连字符、@和点号', trigger: 'blur' }
|
2026-02-24 09:59:22 +08:00
|
|
|
|
],
|
2026-03-03 14:39:02 +08:00
|
|
|
|
phone: [
|
|
|
|
|
|
{ required: true, message: '请输入手机号', trigger: 'blur' },
|
|
|
|
|
|
{ pattern: /^1[3-9]\d{9}$/, message: '手机号格式不正确', trigger: 'blur' }
|
|
|
|
|
|
],
|
|
|
|
|
|
verificationCode: [
|
|
|
|
|
|
{ required: true, message: '请输入验证码', trigger: 'blur' },
|
|
|
|
|
|
{ pattern: /^\d{6}$/, message: '验证码必须是6位数字', trigger: 'blur' }
|
|
|
|
|
|
],
|
2026-02-24 09:59:22 +08:00
|
|
|
|
password: [
|
|
|
|
|
|
{ required: true, message: '请输入密码', trigger: 'blur' },
|
|
|
|
|
|
{ validator: validatePassword, trigger: 'blur' }
|
|
|
|
|
|
],
|
|
|
|
|
|
confirmPassword: [
|
|
|
|
|
|
{ required: true, message: '请确认密码', trigger: 'blur' },
|
|
|
|
|
|
{ validator: validateConfirmPassword, trigger: 'blur' }
|
|
|
|
|
|
],
|
|
|
|
|
|
nickname: [
|
|
|
|
|
|
{ required: true, message: '请输入昵称', trigger: 'blur' },
|
|
|
|
|
|
{ min: 2, max: 20, message: '昵称长度在2到20个字符', trigger: 'blur' }
|
|
|
|
|
|
],
|
|
|
|
|
|
shopId: [
|
|
|
|
|
|
{ required: true, message: '请选择店铺', trigger: 'change' }
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const fetchShops = async () => {
|
|
|
|
|
|
loadingShops.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
const response = await shopApi.getShopsSimple()
|
2026-02-24 11:17:15 +08:00
|
|
|
|
shops.value = (response as unknown as any[]) || []
|
2026-02-24 09:59:22 +08:00
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.error('获取店铺列表失败:', error)
|
2026-02-24 10:57:00 +08:00
|
|
|
|
message.error('未登录,请先登录')
|
2026-02-24 09:59:22 +08:00
|
|
|
|
} finally {
|
|
|
|
|
|
loadingShops.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleSubmit = async () => {
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
if (activeTab.value === 'login') {
|
2026-02-27 22:20:25 +08:00
|
|
|
|
console.log('开始登录...')
|
2026-03-03 14:39:02 +08:00
|
|
|
|
let response
|
|
|
|
|
|
|
|
|
|
|
|
if (loginType.value === 'phone') {
|
|
|
|
|
|
response = await authApi.phoneLogin({
|
|
|
|
|
|
phone: formData.phone,
|
|
|
|
|
|
verificationCode: formData.verificationCode
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
response = await authApi.login({
|
|
|
|
|
|
account: formData.account,
|
|
|
|
|
|
password: formData.password,
|
|
|
|
|
|
rememberMe: formData.rememberMe
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2026-02-24 09:59:22 +08:00
|
|
|
|
|
2026-02-27 22:20:25 +08:00
|
|
|
|
console.log('登录响应:', response)
|
2026-02-24 09:59:22 +08:00
|
|
|
|
|
2026-02-27 22:20:25 +08:00
|
|
|
|
const loginData = response as any
|
|
|
|
|
|
console.log('登录数据:', loginData)
|
|
|
|
|
|
|
|
|
|
|
|
if (loginData.accessToken && loginData.refreshToken) {
|
|
|
|
|
|
localStorage.setItem('accessToken', loginData.accessToken)
|
|
|
|
|
|
localStorage.setItem('refreshToken', loginData.refreshToken)
|
|
|
|
|
|
localStorage.setItem('userInfo', JSON.stringify(loginData.userInfo))
|
2026-03-03 14:39:02 +08:00
|
|
|
|
// 存储是否需要设置密码的标识
|
|
|
|
|
|
if (loginData.needSetPassword) {
|
|
|
|
|
|
localStorage.setItem('needSetPassword', 'true')
|
|
|
|
|
|
} else {
|
|
|
|
|
|
localStorage.removeItem('needSetPassword')
|
|
|
|
|
|
}
|
2026-02-27 22:20:25 +08:00
|
|
|
|
sessionStorage.setItem('accessToken', loginData.accessToken)
|
|
|
|
|
|
|
|
|
|
|
|
console.log('Token存储成功')
|
|
|
|
|
|
message.success('登录成功')
|
|
|
|
|
|
console.log('准备跳转到首页...')
|
|
|
|
|
|
router.push('/home').catch(err => {
|
|
|
|
|
|
console.error('跳转到首页失败:', err)
|
|
|
|
|
|
window.location.href = '/home'
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
console.error('登录响应缺少token:', loginData)
|
|
|
|
|
|
message.error('登录失败:响应数据异常')
|
|
|
|
|
|
}
|
2026-02-24 09:59:22 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
await authApi.register({
|
|
|
|
|
|
account: formData.account,
|
|
|
|
|
|
password: formData.password,
|
|
|
|
|
|
nickname: formData.nickname,
|
|
|
|
|
|
shopId: formData.shopId!
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
message.success('注册成功,请登录')
|
|
|
|
|
|
activeTab.value = 'login'
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error: any) {
|
2026-02-27 22:20:25 +08:00
|
|
|
|
console.error('登录失败:', error)
|
2026-02-24 09:59:22 +08:00
|
|
|
|
message.error(error.message || (activeTab.value === 'login' ? '登录失败' : '注册失败'))
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleForgotPassword = () => {
|
|
|
|
|
|
message.info('忘记密码功能开发中')
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleWeChatLogin = () => {
|
|
|
|
|
|
message.info('微信登录功能开发中')
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleQQLogin = () => {
|
|
|
|
|
|
message.info('QQ登录功能开发中')
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 15:57:14 +08:00
|
|
|
|
const handleAccountBlur = async () => {
|
|
|
|
|
|
if (activeTab.value === 'login' && formData.account) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await userApi.getUserByAccount(formData.account)
|
|
|
|
|
|
if (res) {
|
|
|
|
|
|
accountStatus.value = {
|
|
|
|
|
|
exists: true,
|
|
|
|
|
|
nickname: res.nickname
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
accountStatus.value = {
|
|
|
|
|
|
exists: false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
accountStatus.value = {
|
|
|
|
|
|
exists: false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-03 14:39:02 +08:00
|
|
|
|
const handleSendVerificationCode = async () => {
|
|
|
|
|
|
if (!formData.phone) {
|
|
|
|
|
|
message.error('请输入手机号')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
await userApi.sendVerificationCode({ phone: formData.phone })
|
|
|
|
|
|
message.success('验证码已发送')
|
|
|
|
|
|
countdown.value = 60
|
|
|
|
|
|
const timer = setInterval(() => {
|
|
|
|
|
|
countdown.value--
|
|
|
|
|
|
if (countdown.value <= 0) {
|
|
|
|
|
|
clearInterval(timer)
|
|
|
|
|
|
}
|
|
|
|
|
|
}, 1000)
|
|
|
|
|
|
} catch (error: any) {
|
|
|
|
|
|
message.error(error.message || '发送验证码失败')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-25 19:30:44 +08:00
|
|
|
|
const handleAdminLogin = () => {
|
|
|
|
|
|
console.log('跳转到管理后台登录')
|
|
|
|
|
|
localStorage.removeItem('accessToken')
|
|
|
|
|
|
localStorage.removeItem('refreshToken')
|
|
|
|
|
|
localStorage.removeItem('userInfo')
|
|
|
|
|
|
localStorage.removeItem('adminAccessToken')
|
|
|
|
|
|
localStorage.removeItem('adminRefreshToken')
|
|
|
|
|
|
localStorage.removeItem('adminUserInfo')
|
|
|
|
|
|
sessionStorage.removeItem('accessToken')
|
|
|
|
|
|
sessionStorage.removeItem('adminAccessToken')
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
window.location.href = '/admin/login'
|
|
|
|
|
|
}, 100)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 09:59:22 +08:00
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
fetchShops()
|
|
|
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.mobile-container {
|
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.auth-container {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
max-width: 400px;
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
padding: 30px;
|
|
|
|
|
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.logo-section {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
|
|
font-size: 48px;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: #667eea;
|
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.subtitle {
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tab-container {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
|
border-bottom: 2px solid #f0f0f0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tab-item {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
padding: 15px;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tab-item.active {
|
|
|
|
|
|
color: #667eea;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tab-item.active::after {
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: -2px;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
height: 2px;
|
|
|
|
|
|
background: #667eea;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-03 14:39:02 +08:00
|
|
|
|
.login-type-toggle {
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 09:59:22 +08:00
|
|
|
|
.auth-form {
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.form-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.forgot-password {
|
|
|
|
|
|
color: #667eea;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.social-login {
|
|
|
|
|
|
margin-top: 30px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.divider {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.divider::before {
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 1px;
|
|
|
|
|
|
background: #f0f0f0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.divider span {
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
padding: 0 15px;
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.social-buttons {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
gap: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.social-buttons .ant-btn {
|
|
|
|
|
|
border-color: #f0f0f0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.social-buttons .ant-btn:hover {
|
|
|
|
|
|
border-color: #667eea;
|
|
|
|
|
|
color: #667eea;
|
|
|
|
|
|
}
|
2026-02-25 19:30:44 +08:00
|
|
|
|
|
|
|
|
|
|
.admin-login {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
padding-top: 20px;
|
|
|
|
|
|
border-top: 1px solid #f0f0f0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.admin-login-link {
|
|
|
|
|
|
color: #667eea;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.admin-login-link:hover {
|
|
|
|
|
|
color: #764ba2;
|
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
|
}
|
2026-02-27 15:57:14 +08:00
|
|
|
|
|
|
|
|
|
|
.account-status {
|
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-success {
|
|
|
|
|
|
color: #52c41a;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-error {
|
|
|
|
|
|
color: #f5222d;
|
|
|
|
|
|
}
|
2026-02-24 09:59:22 +08:00
|
|
|
|
</style>
|