1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 01:04:06 +08:00
This commit is contained in:
shaoying 2021-02-26 00:33:44 +08:00
parent 4afa19296d
commit c937cf4ef1

View File

@ -104,14 +104,13 @@ Volcanos("user", {help: "用户模块", agent: {
})
},
login: function(can, cb) {
var ui = can.user.input({clientX: 200, clientY: 100}, can, [
var ui = can.user.input({clientX: 100, clientY: 100}, can, [
{username: "username", name: "用户"},
{password: "password", name: "密码"},
{button: ["登录", "扫码"]},
], function(event, button, data, list) {
switch (button) {
case "登录":
can.user.Cookie(can, "sessid", "")
case "登录": can.user.Cookie(can, "sessid", "")
can.run({}, ["login", ui["用户"].value, ui["密码"].value], function(msg) {
if (can.user.Cookie(can, "sessid")||msg.Option("user.name")||msg.Result()) {
can.page.Remove(can, ui.first); return typeof cb == "function" && cb()