feat(all): 搭建基本框架和模块
This commit is contained in:
194
gringotts-web/src/main/resources/static/login.html
Normal file
194
gringotts-web/src/main/resources/static/login.html
Normal file
@@ -0,0 +1,194 @@
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>可信供给平台</title>
|
||||
<link href="assets/sdk/antd.css" rel="stylesheet"/>
|
||||
<link href="assets/sdk/helper.css" rel="stylesheet"/>
|
||||
<link href="assets/sdk/iconfont.css" rel="stylesheet"/>
|
||||
<style>
|
||||
html, body, #root {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
<script src="assets/sdk/sdk.js"></script>
|
||||
<script src="assets/component/constants.js"></script>
|
||||
<script src="assets/component/common.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
let amis = amisRequire('amis/embed')
|
||||
let amisJSON = {
|
||||
type: 'page',
|
||||
title: information.title,
|
||||
subTitle: '统一登陆入口',
|
||||
body: [
|
||||
{
|
||||
type: 'grid',
|
||||
columns: [
|
||||
{
|
||||
xs: 0,
|
||||
sm: 0,
|
||||
md: 4,
|
||||
body: []
|
||||
},
|
||||
{
|
||||
xs: 12,
|
||||
sm: 12,
|
||||
md: 4,
|
||||
body: [
|
||||
{
|
||||
type: 'form',
|
||||
title: '用户登陆',
|
||||
api: '${base}/user/login',
|
||||
redirect: '/index.html?token=${token}',
|
||||
mode: 'horizontal',
|
||||
actions: [
|
||||
{
|
||||
type: 'action',
|
||||
actionType: 'dialog',
|
||||
label: '注册',
|
||||
dialog: {
|
||||
title: '新用户注册',
|
||||
actions: [
|
||||
{
|
||||
type: 'reset',
|
||||
label: '清空',
|
||||
},
|
||||
{
|
||||
type: 'submit',
|
||||
label: '注册',
|
||||
level: 'primary',
|
||||
}
|
||||
],
|
||||
body: {
|
||||
type: 'form',
|
||||
api: '${base}/user/register',
|
||||
mode: 'horizontal',
|
||||
canAccessSuperData: false,
|
||||
horizontal: {
|
||||
left: 2,
|
||||
},
|
||||
body: [
|
||||
{
|
||||
type: 'input-email',
|
||||
name: 'username',
|
||||
label: '邮箱',
|
||||
placeholder: '请输入邮箱',
|
||||
required: true,
|
||||
clearable: true,
|
||||
clearValueOnEmpty: true,
|
||||
validateApi: '${base}/user/exists_username/${username}'
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
name: 'password',
|
||||
label: '密码',
|
||||
placeholder: '请输入密码',
|
||||
required: true,
|
||||
clearable: true,
|
||||
clearValueOnEmpty: true,
|
||||
validations: {
|
||||
matchRegexp: /^(?=.*\d)(?!.*(\d)\1{2})(?!.*(012|123|234|345|456|567|678|789|987|876|765|654|543|432|321|210))(?=.*[a-zA-Z])(?=.*[^\da-zA-Z\s]).{8,16}$/
|
||||
},
|
||||
validationErrors: {
|
||||
matchRegexp: '密码至少包含字母、数字、特殊字符,8-16位,并且不能连续出现3个大小连续或相同的数字',
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
name: 'confirm-password',
|
||||
label: '确认密码',
|
||||
placeholder: '请再次输入密码',
|
||||
required: true,
|
||||
clearable: true,
|
||||
validations: {
|
||||
equalsField: 'password'
|
||||
},
|
||||
validationErrors: {
|
||||
equalsField: '两次输入密码不一致',
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'radios',
|
||||
name: 'role',
|
||||
label: '角色',
|
||||
required: true,
|
||||
selectFirst: true,
|
||||
options: [
|
||||
{label: '数据提供方', value: 'PROVIDER'},
|
||||
{label: '数据使用方', value: 'CUSTOMER'},
|
||||
{label: '审查监管方', value: 'CHECKER'},
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
actionType: 'submit',
|
||||
label: '登陆',
|
||||
level: 'primary',
|
||||
}
|
||||
],
|
||||
body: [
|
||||
{
|
||||
type: 'input-email',
|
||||
name: 'username',
|
||||
label: '邮箱',
|
||||
placeholder: '请输入邮箱',
|
||||
required: true,
|
||||
clearable: true,
|
||||
clearValueOnEmpty: true,
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
name: 'password',
|
||||
label: '密码',
|
||||
placeholder: '请再次输入密码',
|
||||
required: true,
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
xs: 0,
|
||||
sm: 0,
|
||||
md: 4,
|
||||
body: []
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
amis.embed(
|
||||
'#root',
|
||||
amisJSON,
|
||||
{
|
||||
data: {
|
||||
base: information.baseUrl
|
||||
},
|
||||
},
|
||||
{
|
||||
theme: 'antd',
|
||||
enableAMISDebug: information.debug,
|
||||
},
|
||||
);
|
||||
if (information.debug) {
|
||||
console.log('Source', amisJSON)
|
||||
}
|
||||
})()
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user