From e4fb65d9a000e6e78fe134c547468eeb56a96a0c Mon Sep 17 00:00:00 2001 From: shylinux Date: Sat, 7 Aug 2021 08:43:12 +0800 Subject: [PATCH] opt some --- lib/user.js | 6 ++++-- page/index.js | 1 + panel/header.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/user.js b/lib/user.js index b79991d3..0fa284c7 100644 --- a/lib/user.js +++ b/lib/user.js @@ -274,8 +274,10 @@ Volcanos("user", {help: "用户操作", agent: { return can.base.MergeURL(location.origin+path+(clear?"":location.search), objs) }), Search: shy("请求参数", function(can, key, value) { var args = {} - var ls = location.pathname.split("/") - if (ls[1] == "chat" && ls[2] == "pod") { args["pod"] = ls[3] } + if (value == undefined && typeof key == "string") { + var ls = location.pathname.split("/") + if (ls[1] == "chat" && ls[2] == "pod") { args["pod"] = ls[3] } + } location.search && location.search.slice(1).split("&").forEach(function(item) { var x = item.split("=") x[1] != "" && (args[x[0]] = decodeURIComponent(x[1])) diff --git a/page/index.js b/page/index.js index 5e465396..f8bb9f79 100644 --- a/page/index.js +++ b/page/index.js @@ -98,6 +98,7 @@ Volcanos({name: "chat", iceberg: "/chat/", volcano: "/frame.js", ]}, "mysql": {name: "数据 mysql", action: [ {name: "mysql", help: "数据存储", index: "web.wiki.word", args: ["usr/mysql-story/src/main.shy"]}, + {name: "clickhouse", help: "数据存储", index: "web.wiki.word", args: ["usr/mysql-story/src/clickhouse/clickhouse.shy"]}, ]}, }}, "profile": {name: "测试群", storm: { diff --git a/panel/header.js b/panel/header.js index 3e4f364a..cfee1898 100644 --- a/panel/header.js +++ b/panel/header.js @@ -190,7 +190,7 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, meta, }, title: function(event, can) { - var args = {}; can.core.List([cli.POD, chat.TITLE, "topic", "layout"], function(key) { + var args = {}; can.core.List([chat.TITLE, "topic", "layout"], function(key) { var value = can.user.Search(can, key); value && (args[key] = value) }) can.user.jumps(can.user.MergeURL(can, args, true))