1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00

opt login

This commit is contained in:
shylinux 2021-04-29 12:57:03 +08:00
parent 48cf389106
commit 3306657b40
2 changed files with 6 additions and 4 deletions

View File

@ -121,7 +121,8 @@ Volcanos("user", {help: "用户模块", agent: {
case "扫码":
can.misc.WSS(can, {type: "chrome"}, function(event, msg, cmd, arg) { if (!msg) { return }
if (cmd == "pwd") {
can.user.share(can, can.request(event, {name: arg[0]}), ["action", "apply"])
can.user.toast(can, arg[2], arg[1], 1000000)
// can.user.share(can, can.request(event, {name: arg[0]}), ["action", "apply"])
msg.Reply()
return
}

View File

@ -174,10 +174,11 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, msg,
can.onlayout.topic(can)
can.user.isLocalFile? init(): can.run({}, ["check"], function(msg) {
if (msg.Option("type") == "apply" && msg.Option("username") == "") {
if (can.user.confirm("auth "+msg.Option("name"))) {
can.run(event, ["action", "auth", "share", can.user.Search(can, "share")])
if (can.user.Search(can, "auth")) {
if (can.user.confirm("auth "+can.user.Search(can, "auth"))) {
can.run(event, ["action", "auth", "space", can.user.Search(can, "auth")])
}
debugger
}
msg.Result()? init(): msg.Option("sso")? can.user.jumps(msg.Option("sso")): can.user.login(can, init)
})