- withLoginInfo 改为接收完整 opts(含 method/headers/params) - 等待 login_window 的 destroy 事件(=登录成功信号) - 登录成功后重试原始请求 - 重试仍401则返回null(避免死循环) - 用户手动关闭登录窗口时也触发重试,401则返回null
39 lines
595 B
XML
39 lines
595 B
XML
{
|
|
"widgettype":"VBox",
|
|
"options":{},
|
|
"subwidgets":[
|
|
{
|
|
"id":"btn1",
|
|
"widgettype":"Button",
|
|
"options":{
|
|
"label":"press me"
|
|
}
|
|
},
|
|
{
|
|
"id":"txt1",
|
|
"widgettype":"Text",
|
|
"options":{
|
|
"otext":"I will dispatch a event when btn1 pressed",
|
|
"i18n":true
|
|
}
|
|
}
|
|
],
|
|
"binds":[
|
|
{
|
|
"wid":"btn1",
|
|
"event":"click",
|
|
"actiontype":"script",
|
|
"target":"txt1",
|
|
"script":"this.set_text('estrdyfguihojkl')",
|
|
"dispatch_event":"gpc"
|
|
},
|
|
{
|
|
"wid":"txt1",
|
|
"event":"gpc",
|
|
"actiontype":"script",
|
|
"target":"self",
|
|
"script":"alert('yield');"
|
|
}
|
|
]
|
|
}
|