- Flatten nested style objects directly into options (bricks doesn't recognize 'style')
- Remove invalid 'formsubmit' actiontype from login.ui binds
- Text/Title use 'text', Button uses 'label'
- All paths use {{entire_url()}}
82 lines
2.9 KiB
XML
82 lines
2.9 KiB
XML
{
|
|
"id": "login_page",
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100vh",
|
|
"background": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
"alignItems": "center",
|
|
"justifyContent": "center"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "400px",
|
|
"background": "white",
|
|
"borderRadius": "12px",
|
|
"boxShadow": "0 8px 32px rgba(0,0,0,0.15)",
|
|
"padding": "40px 32px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "CRM系统登录",
|
|
"fontSize": "24px",
|
|
"fontWeight": "bold",
|
|
"textAlign": "center",
|
|
"marginBottom": "24px",
|
|
"color": "#333"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Form",
|
|
"id": "login_form",
|
|
"options": {
|
|
"url": "{{entire_url('api/login.dspy')}}",
|
|
"method": "POST",
|
|
"fields": [
|
|
{
|
|
"name": "username",
|
|
"label": "用户名",
|
|
"uitype": "str",
|
|
"required": true,
|
|
"placeholder": "请输入用户名"
|
|
},
|
|
{
|
|
"name": "password",
|
|
"label": "密码",
|
|
"uitype": "password",
|
|
"required": true,
|
|
"placeholder": "请输入密码"
|
|
}
|
|
],
|
|
"submitLabel": "登录",
|
|
"submitVariant": "primary",
|
|
"submitFullWidth": true
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"justifyContent": "center",
|
|
"marginTop": "16px",
|
|
"gap": "16px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "btn_register",
|
|
"options": {
|
|
"label": "注册账号",
|
|
"variant": "text",
|
|
"url": "{{entire_url('/rbac/user/register.ui')}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |