登录和注册功能
parent
17e07e3a31
commit
c6543282d1
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<body>
|
||||
<svg
|
||||
width="200"
|
||||
height="200"
|
||||
viewBox="0 0 200 200"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<defs>
|
||||
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#0D47A1;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<circle cx="50" cy="100" r="30" fill="url(#grad1)" />
|
||||
<rect x="100" y="70" width="60" height="60" fill="url(#grad1)" />
|
||||
<circle cx="170" cy="100" r="30" fill="url(#grad1)" />
|
||||
<line x1="80" y1="100" x2="100" y2="100" stroke="#000" stroke-width="2" />
|
||||
<line x1="160" y1="100" x2="170" y2="100" stroke="#000" stroke-width="2" />
|
||||
<text x="50" y="100" text-anchor="middle" fill="#fff" font-size="12" dy=".3em">开始</text>
|
||||
<text x="130" y="100" text-anchor="middle" fill="#fff" font-size="12" dy=".3em">过程</text>
|
||||
<text x="170" y="100" text-anchor="middle" fill="#fff" font-size="12" dy=".3em">结束</text>
|
||||
</svg>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface UserVO {
|
||||
id: number
|
||||
id?: number
|
||||
username: string
|
||||
nickname: string
|
||||
deptId: number
|
||||
postIds: string[]
|
||||
email: string
|
||||
mobile: string
|
||||
password: string
|
||||
sex: number
|
||||
avatar: string
|
||||
loginIp: string
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@ export default [
|
|||
path: 'contact',
|
||||
name: 'contact',
|
||||
component: () => import('@/views/flow/Contact.vue')
|
||||
},
|
||||
{
|
||||
path: 'features',
|
||||
name: 'features',
|
||||
component: () => import('@/views/flow/Features.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -59,5 +64,10 @@ export default [
|
|||
path: '/register',
|
||||
name: 'Register',
|
||||
component: () => import('@/views/flow/Register.vue')
|
||||
},
|
||||
{
|
||||
path: '/login2',
|
||||
name: 'Login2',
|
||||
component: () => import('@/views/flow/Login.vue')
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
<img src="@/assets/logo.svg" alt="Flow Design"/>
|
||||
</div>
|
||||
<div class="nav-links">
|
||||
<router-link to="/home">首页</router-link>
|
||||
<router-link to="/home/features">功能</router-link>
|
||||
<router-link to="/home/pricing">价格</router-link>
|
||||
<router-link to="/home/contact">联系我们</router-link>
|
||||
<router-link to="/flow">首页</router-link>
|
||||
<router-link to="/flow/features">功能</router-link>
|
||||
<router-link to="/flow/pricing">价格</router-link>
|
||||
<router-link to="/flow/contact">联系我们</router-link>
|
||||
</div>
|
||||
<div class="auth-buttons">
|
||||
<router-link to="/login" class="login-btn">登录</router-link>
|
||||
<router-link to="/login2" class="login-btn">登录</router-link>
|
||||
<router-link to="/register" class="register-btn">注册</router-link>
|
||||
<router-link to="/files" class="register-btn">设计</router-link>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -104,8 +104,7 @@ import { ElMessage } from 'element-plus'
|
|||
import 'element-plus/es/components/message/style/css'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { User, Message, Lock } from '@element-plus/icons-vue'
|
||||
import { register } from '@/api/flow'
|
||||
|
||||
import * as UserApi from '@/api/system/user'
|
||||
const router = useRouter()
|
||||
const formRef = ref<FormInstance>()
|
||||
const loading = ref(false)
|
||||
|
|
@ -171,11 +170,24 @@ const submitForm = (formEl: FormInstance | undefined): Promise<void> => {
|
|||
}
|
||||
|
||||
loading.value = true
|
||||
register({
|
||||
const data ={
|
||||
username: form.username,
|
||||
email: form.email,
|
||||
password: form.password
|
||||
})
|
||||
sex: 1,
|
||||
nickname: form.username,
|
||||
deptId: 115,
|
||||
postIds: [],
|
||||
password: form.password,
|
||||
status: 1,
|
||||
remark: '',
|
||||
loginDate: new Date(),
|
||||
createTime: new Date(),
|
||||
id: undefined,
|
||||
mobile: '',
|
||||
avatar: '',
|
||||
loginIp: '',
|
||||
} as UserApi.UserVO
|
||||
UserApi.createUser(data)
|
||||
.then(() => {
|
||||
ElMessage({
|
||||
message: '注册成功!正在跳转到登录页面...',
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@
|
|||
v-if="refreshTable"
|
||||
>
|
||||
<el-table-column prop="name" label="部门名称" />
|
||||
<el-table-column prop="id" label="部门编号" />
|
||||
<el-table-column prop="leader" label="负责人">
|
||||
<template #default="scope">
|
||||
{{ userList.find((user) => user.id === scope.row.leaderUserId)?.nickname }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue