feat(frontend): 优化登陆页面样式
This commit is contained in:
@@ -4,74 +4,103 @@ import {userRegisterDialog} from '../../components/user/dialog-user-register.js'
|
|||||||
useAmis(information => {
|
useAmis(information => {
|
||||||
return {
|
return {
|
||||||
type: 'page',
|
type: 'page',
|
||||||
title: information.title,
|
className: 'h-screen bg-gray-900',
|
||||||
subTitle: '统一登陆入口',
|
bodyClassName: 'h-full flex items-start mt-20',
|
||||||
body: [
|
body: [
|
||||||
{
|
{
|
||||||
type: 'grid',
|
type: 'wrapper',
|
||||||
columns: [
|
className: 'relative w-full max-w-md mx-auto',
|
||||||
|
body: [
|
||||||
{
|
{
|
||||||
xs: 0,
|
type: 'flex',
|
||||||
sm: 0,
|
justify: 'center',
|
||||||
md: 4,
|
className: 'mb-8',
|
||||||
body: [],
|
items: [
|
||||||
|
{
|
||||||
|
type: 'avatar',
|
||||||
|
src: '/logo.svg',
|
||||||
|
shape: 'square',
|
||||||
|
size: 64,
|
||||||
|
fit: 'contain',
|
||||||
|
className: 'mr-4 bg-transparent'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xs: 12,
|
type: 'flex',
|
||||||
sm: 12,
|
direction: 'column',
|
||||||
md: 4,
|
justify: 'center',
|
||||||
body: [
|
items: [
|
||||||
|
{
|
||||||
|
type: 'tpl',
|
||||||
|
tpl: information.title,
|
||||||
|
className: 'text-2xl font-bold text-white'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'tpl',
|
||||||
|
tpl: '统一登录入口',
|
||||||
|
className: 'text-lg ml-1 mt-1 text-gray-100'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'form',
|
type: 'form',
|
||||||
title: '用户登陆',
|
className: 'bg-white rounded-xl p-10 shadow-2xl',
|
||||||
api: '${base}/user/login',
|
api: '${base}/user/login',
|
||||||
redirect: '/pages/index/index.html?token=${token}',
|
redirect: '/pages/index/index.html?token=${token}',
|
||||||
mode: 'horizontal',
|
mode: 'normal',
|
||||||
horizontal: {
|
wrapWithPanel: false,
|
||||||
left: 2,
|
|
||||||
},
|
|
||||||
actions: [
|
|
||||||
{
|
|
||||||
type: 'action',
|
|
||||||
label: '注册',
|
|
||||||
...userRegisterDialog(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'action',
|
|
||||||
actionType: 'submit',
|
|
||||||
label: '登陆',
|
|
||||||
level: 'primary',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
body: [
|
body: [
|
||||||
{
|
{
|
||||||
type: 'input-email',
|
type: 'input-email',
|
||||||
name: 'username',
|
name: 'username',
|
||||||
label: '邮箱',
|
label: false,
|
||||||
placeholder: '请输入邮箱',
|
placeholder: '请输入邮箱',
|
||||||
required: true,
|
required: true,
|
||||||
clearable: true,
|
clearable: true,
|
||||||
clearValueOnEmpty: true,
|
className: 'mb-4',
|
||||||
|
inputClassName: 'rounded-lg',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'input-password',
|
type: 'input-password',
|
||||||
name: 'password',
|
name: 'password',
|
||||||
label: '密码',
|
label: false,
|
||||||
placeholder: '请再次输入密码',
|
placeholder: '请输入密码',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
className: 'mb-4',
|
||||||
],
|
inputClassName: 'rounded-lg',
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xs: 0,
|
type: 'flex',
|
||||||
sm: 0,
|
justify: 'space-between',
|
||||||
md: 4,
|
className: 'mb-4',
|
||||||
body: [],
|
items: [
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
label: '注册账号',
|
||||||
|
className: 'text-blue-600 hover:text-blue-700',
|
||||||
|
level: 'link',
|
||||||
|
...userRegisterDialog(),
|
||||||
},
|
},
|
||||||
],
|
{
|
||||||
|
type: 'button',
|
||||||
|
label: '忘记密码?',
|
||||||
|
level: 'link',
|
||||||
|
className: 'text-gray-600 hover:text-gray-700'
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
],
|
{
|
||||||
|
type: 'submit',
|
||||||
|
label: '登录',
|
||||||
|
level: 'primary',
|
||||||
|
className: 'w-full rounded-lg',
|
||||||
|
size: 'lg'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user