系统完善
This commit is contained in:
parent
98ba531305
commit
628e0d9461
2
.gitignore
vendored
2
.gitignore
vendored
@ -36,7 +36,7 @@ reading-platform-backend/prisma/migrations
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
*/package-lock.json
|
||||
# 日志
|
||||
logs/
|
||||
*.log
|
||||
|
||||
Binary file not shown.
1034
reading-platform-frontend/package-lock.json
generated
1034
reading-platform-frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,8 +11,10 @@ declare module 'vue' {
|
||||
AAvatar: typeof import('ant-design-vue/es')['Avatar']
|
||||
ABadge: typeof import('ant-design-vue/es')['Badge']
|
||||
AButton: typeof import('ant-design-vue/es')['Button']
|
||||
AButtonGroup: typeof import('ant-design-vue/es')['ButtonGroup']
|
||||
ACard: typeof import('ant-design-vue/es')['Card']
|
||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
||||
ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup']
|
||||
ACol: typeof import('ant-design-vue/es')['Col']
|
||||
ACollapse: typeof import('ant-design-vue/es')['Collapse']
|
||||
ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel']
|
||||
@ -47,16 +49,21 @@ declare module 'vue' {
|
||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||
AProgress: typeof import('ant-design-vue/es')['Progress']
|
||||
ARadio: typeof import('ant-design-vue/es')['Radio']
|
||||
ARadioButton: typeof import('ant-design-vue/es')['RadioButton']
|
||||
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
|
||||
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
|
||||
ARate: typeof import('ant-design-vue/es')['Rate']
|
||||
AResult: typeof import('ant-design-vue/es')['Result']
|
||||
ARow: typeof import('ant-design-vue/es')['Row']
|
||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||
ASelectOptGroup: typeof import('ant-design-vue/es')['SelectOptGroup']
|
||||
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
||||
ASkeleton: typeof import('ant-design-vue/es')['Skeleton']
|
||||
ASpace: typeof import('ant-design-vue/es')['Space']
|
||||
ASpin: typeof import('ant-design-vue/es')['Spin']
|
||||
AStatistic: typeof import('ant-design-vue/es')['Statistic']
|
||||
AStep: typeof import('ant-design-vue/es')['Step']
|
||||
ASteps: typeof import('ant-design-vue/es')['Steps']
|
||||
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||
ATable: typeof import('ant-design-vue/es')['Table']
|
||||
|
||||
@ -20,54 +20,33 @@
|
||||
|
||||
<!-- 角色选择 -->
|
||||
<div class="role-section">
|
||||
<div
|
||||
v-for="role in roles"
|
||||
:key="role.value"
|
||||
:class="['role-btn', { active: formState.role === role.value }]"
|
||||
@click="selectRole(role.value)"
|
||||
>
|
||||
<div v-for="role in roles" :key="role.value" :class="['role-btn', { active: formState.role === role.value }]"
|
||||
@click="selectRole(role.value)">
|
||||
<component :is="role.icon" />
|
||||
<span>{{ role.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 登录表单 -->
|
||||
<a-form
|
||||
:model="formState"
|
||||
@finish="handleLogin"
|
||||
layout="vertical"
|
||||
class="login-form"
|
||||
>
|
||||
<a-form :model="formState" @finish="handleLogin" layout="vertical" class="login-form">
|
||||
<a-form-item name="account" :rules="[{ required: true, message: '请输入账号' }]">
|
||||
<a-input
|
||||
v-model:value="formState.account"
|
||||
placeholder="请输入账号"
|
||||
size="large"
|
||||
allow-clear
|
||||
>
|
||||
<template #prefix><UserOutlined /></template>
|
||||
<a-input v-model:value="formState.account" placeholder="请输入账号" size="large" allow-clear>
|
||||
<template #prefix>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item name="password" :rules="[{ required: true, message: '请输入密码' }]">
|
||||
<a-input-password
|
||||
v-model:value="formState.password"
|
||||
placeholder="请输入密码"
|
||||
size="large"
|
||||
>
|
||||
<template #prefix><LockOutlined /></template>
|
||||
<a-input-password v-model:value="formState.password" placeholder="请输入密码" size="large">
|
||||
<template #prefix>
|
||||
<LockOutlined />
|
||||
</template>
|
||||
</a-input-password>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<a-button
|
||||
type="primary"
|
||||
html-type="submit"
|
||||
size="large"
|
||||
block
|
||||
:loading="loading"
|
||||
class="login-btn"
|
||||
>
|
||||
<a-button type="primary" html-type="submit" size="large" block :loading="loading" class="login-btn">
|
||||
登录
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
@ -77,12 +56,7 @@
|
||||
<div class="test-section">
|
||||
<div class="test-title">快速体验</div>
|
||||
<div class="test-list">
|
||||
<span
|
||||
v-for="acc in testAccounts"
|
||||
:key="acc.role"
|
||||
class="test-item"
|
||||
@click="fillAccount(acc)"
|
||||
>
|
||||
<span v-for="acc in testAccounts" :key="acc.role" class="test-item" @click="fillAccount(acc)">
|
||||
{{ acc.label }}: {{ acc.account }}
|
||||
</span>
|
||||
</div>
|
||||
@ -162,12 +136,12 @@ const handleLogin = async () => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
// 温暖明快的配色
|
||||
$primary: #FF8C42; // 温暖橙
|
||||
$primary: #FF8C42; // 温暖橙
|
||||
$primary-light: #FFF4EB;
|
||||
$secondary: #6C5CE7; // 梦幻紫
|
||||
$accent: #00D9A5; // 薄荷绿
|
||||
$coral: #FF7675; // 珊瑚粉
|
||||
$sky: #74B9FF; // 天空蓝
|
||||
$secondary: #6C5CE7; // 梦幻紫
|
||||
$accent: #00D9A5; // 薄荷绿
|
||||
$coral: #FF7675; // 珊瑚粉
|
||||
$sky: #74B9FF; // 天空蓝
|
||||
$text-dark: #2D3436;
|
||||
$text-gray: #636E72;
|
||||
$text-light: #B2BEC3;
|
||||
@ -382,9 +356,8 @@ $bg-cream: #FEFEFE;
|
||||
}
|
||||
}
|
||||
|
||||
// 测试账号 - 暂时隐藏
|
||||
// 测试账号
|
||||
.test-section {
|
||||
display: none;
|
||||
margin-top: 24px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #F5F5F5;
|
||||
|
||||
2
reading-platform-frontend/src/vite-env.d.ts
vendored
2
reading-platform-frontend/src/vite-env.d.ts
vendored
@ -1,5 +1,7 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module 'virtual:uno.css' {}
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string
|
||||
readonly VITE_SERVER_BASE_URL: string
|
||||
|
||||
Loading…
Reference in New Issue
Block a user