1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
shaoying 2020-06-28 13:42:45 +08:00
parent 9de40f85ee
commit d57330e2a7
2 changed files with 9 additions and 2 deletions

View File

@ -18,8 +18,11 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, msg,
{username: "username", name: "用户"}, {username: "username", name: "用户"},
{password: "password", name: "密码"}, {password: "password", name: "密码"},
{button: [["登录", function(event) { {button: [["登录", function(event) {
can.user.Cookie(can, "sessid", "")
can.run({}, ["login", ui["用户"].value, ui["密码"].value], function(msg) { can.run({}, ["login", ui["用户"].value, ui["密码"].value], function(msg) {
if (msg.Result()) { can.page.Remove(can, ui.first); return init() } if (can.user.Cookie(can, "sessid")||msg.Option("user.name")||msg.Result()) {
can.page.Remove(can, ui.first); return init()
}
can.user.alert("用户或密码错误") can.user.alert("用户或密码错误")
}) })
}], ["扫码", function(event) { }], ["扫码", function(event) {
@ -95,7 +98,8 @@ Volcanos("onexport", {help: "导出数据", list: [], _init: function(can, msg,
if (location.protocol == "chrome-extension:") { if (location.protocol == "chrome-extension:") {
ui.River.click() ui.River.click()
} else { } else {
ui.River.click(), ui.Footer.click(), ui.Storm.click() // ui.River.click(), ui.Footer.click(), ui.Storm.click()
ui.River.click(), ui.Footer.click()
} }
typeof cb == "function" && cb() typeof cb == "function" && cb()

View File

@ -51,6 +51,7 @@ fieldset.editor>div.output div.content>pre.item {
height:20px; border:solid 1px black; height:20px; border:solid 1px black;
padding:0; margin:0; padding:0; margin:0;
padding-left:10px; padding-left:10px;
min-width:120px;
} }
fieldset.editor>div.output div.content>pre.item span.comment { fieldset.editor>div.output div.content>pre.item span.comment {
color:cyan; background-color:blue; color:cyan; background-color:blue;
@ -103,6 +104,8 @@ fieldset.editor>div.output textarea.command {
caret-color:red; caret-color:red;
border:solid 1px red; border:solid 1px red;
border-left:solid 3px green;
z-index:200; z-index:200;
min-width:240px;
} }