mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
2a26065a2e
commit
bdf3dbaf13
10
lib/user.js
10
lib/user.js
@ -215,8 +215,8 @@ Volcanos("user", {
|
||||
{type: html.TD, list: [{type: html.INPUT, name: name, data: {type: type||html.TEXT}}]},
|
||||
]} }
|
||||
can.misc.POST(can, can.request(), "http://localhost:9020/code/git/token/get/"+location.host, {}, function(msg) {
|
||||
can.misc.POST(can, can.request(), "/code/git/token/sid/"+msg.Result(0)+"/"+msg.Result(1), {}, function(msg) {
|
||||
if (msg.Result() == ice.OK) { cb() }
|
||||
can.misc.POST(can, can.request(), "/code/git/token/sid/"+msg.result[0]+ice.PS+msg.result[1], {}, function(msg) {
|
||||
if (msg.Result() == ice.OK) { can.page.Remove(can, ui._target), can.base.isFunc(cb) && cb() }
|
||||
})
|
||||
})
|
||||
var ui = can.onappend.tabview(can, {
|
||||
@ -226,14 +226,12 @@ Volcanos("user", {
|
||||
]), can.onmotion.delay(can, function() { layout() }, 10) }
|
||||
if (cmd == ice.MSG_SESSID) { return can.misc.CookieSessid(can, arg[0]), can.page.Remove(can, ui._target), can.base.isFunc(cb) && cb() }
|
||||
}) },
|
||||
"密码登录": function(target) {
|
||||
var _ui = can.page.Append(can, target, [input(aaa.USERNAME), input(aaa.PASSWORD, aaa.PASSWORD), button(kit.Dict(aaa.LOGIN, function(event) {
|
||||
"密码登录": function(target) { var _ui = can.page.Append(can, target, [input(aaa.USERNAME), input(aaa.PASSWORD, aaa.PASSWORD), button(kit.Dict(aaa.LOGIN, function(event) {
|
||||
can.runAction(event, aaa.LOGIN, [_ui.username.value, _ui.password.value], function(msg) {
|
||||
if (!msg.Option(ice.MSG_USERNAME)) { return can.user.toastFailure(can, "用户或密码错误") }
|
||||
can.page.Remove(can, ui._target), can.base.isFunc(cb) && cb()
|
||||
})
|
||||
}))])
|
||||
},
|
||||
}))]) },
|
||||
}, can.base.Obj(method, can.user.isMobile? ["密码登录"]: ["扫码授权"]), can.page.Append(can, document.body, [{view: "input login float"}])._target)
|
||||
can.onmotion.delay(can, function() { layout() })
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user