From 2ea45cd38065e5991d68d715f8e5973ff578b373 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Thu, 18 Jun 2026 11:09:46 +0800 Subject: [PATCH] =?UTF-8?q?rbac:=20=E5=AE=8C=E5=96=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E4=BF=AE=E5=A4=8D=E5=8F=8C=E7=AA=97=E5=8F=A3?= =?UTF-8?q?+=E6=B7=BB=E5=8A=A0=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/user/edit_profile.dspy | 121 +++++++++++++++------------------ wwwroot/usermenu.ui | 7 +- 2 files changed, 61 insertions(+), 67 deletions(-) diff --git a/wwwroot/user/edit_profile.dspy b/wwwroot/user/edit_profile.dspy index 550f304..e8c7acf 100644 --- a/wwwroot/user/edit_profile.dspy +++ b/wwwroot/user/edit_profile.dspy @@ -17,74 +17,63 @@ async with db.sqlorContext(dbname) as sor: address = user.address or '' return { - "widgettype": "PopupWindow", + "widgettype": "Form", "options": { - "cwidth": 22, - "height": "75%", - "archor": "cc", - "auto_open": True - }, - "subwidgets": [ - { - "widgettype": "Form", - "options": { - "title": "完善个人信息", - "description": "请填写或更新您的个人信息", - "fields": [ - { - "name": "nick_name", - "type": "str", - "length": 255, - "uitype": "str", - "datatype": "str", - "required": False, - "label": "显示名", - "value": nick_name - }, - { - "name": "email", - "type": "str", - "length": 255, - "uitype": "email", - "datatype": "str", - "required": False, - "label": "邮件地址", - "value": email - }, - { - "name": "mobile", - "type": "str", - "length": 255, - "uitype": "tel", - "datatype": "str", - "required": False, - "label": "手机号", - "value": mobile - }, - { - "name": "address", - "type": "str", - "length": 255, - "uitype": "str", - "datatype": "str", - "required": False, - "label": "地址", - "value": address - } - ] + "title": "完善个人信息", + "description": "请填写或更新您的个人信息", + "fields": [ + { + "name": "nick_name", + "type": "str", + "length": 255, + "uitype": "str", + "datatype": "str", + "required": False, + "label": "显示名", + "value": nick_name }, - "binds": [ - { - "wid": "self", - "event": "submit", - "actiontype": "urlwidget", - "target": "self", - "options": { - "method": "POST", - "url": entire_url('save_profile.dspy') - } - } - ] + { + "name": "email", + "type": "str", + "length": 255, + "uitype": "email", + "datatype": "str", + "required": False, + "label": "邮件地址", + "value": email + }, + { + "name": "mobile", + "type": "str", + "length": 255, + "uitype": "tel", + "datatype": "str", + "required": False, + "label": "手机号", + "value": mobile + }, + { + "name": "address", + "type": "str", + "length": 255, + "uitype": "str", + "datatype": "str", + "required": False, + "label": "地址", + "value": address + } + ] + }, + "binds": [ + { + "wid": "self", + "event": "submit", + "actiontype": "urlwidget", + "target": "self", + "options": { + "method": "POST", + "url": entire_url('save_profile.dspy') + } } ] } diff --git a/wwwroot/usermenu.ui b/wwwroot/usermenu.ui index 5dbdd2e..acb7b70 100644 --- a/wwwroot/usermenu.ui +++ b/wwwroot/usermenu.ui @@ -35,7 +35,12 @@ { "name":"editprofile", "label":"完善信息", - "url":"{{entire_url('user/edit_profile.dspy')}}" + "url":"{{entire_url('user/edit_profile.dspy')}}", + "popup_options":{ + "title":"完善个人信息", + "cwidth":22, + "height":"75%" + } }, { "name":"logout",