diff --git a/src/contexts/web/web.go b/src/contexts/web/web.go index ab958a60..fab0227c 100644 --- a/src/contexts/web/web.go +++ b/src/contexts/web/web.go @@ -674,7 +674,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心", m.Assert(e) defer f.Close() - p := path.Join(m.Conf("directory"), m.Option("dir"), h.Filename) + p := path.Join(m.Conf("directory"), m.Option("download_dir"), h.Filename) o, e := os.Create(p) m.Assert(e) defer o.Close() diff --git a/src/examples/code/code.go b/src/examples/code/code.go index f38d161c..bf29d454 100644 --- a/src/examples/code/code.go +++ b/src/examples/code/code.go @@ -106,6 +106,16 @@ var Index = &ctx.Context{Name: "code", Help: "代码中心", }, "display_result": "", }, + map[string]interface{}{"componet_name": "contract", "componet_help": "contract", "template": "componet", + "context": "cli.shy", "componet_cmd": "run", "arguments": []interface{}{"python/get_teacher_contract.py", "@fmt", "@begin", "@end", "cmd_env", "IS_PROD_RUNTIME", 1, "cmd_error"}, + "display_result": "", "file_name": "", + "inputs": []interface{}{ + map[string]interface{}{"type": "text", "name": "file_name", "value": "data_2006_0102_1504.txt", "class": "file_name"}, + map[string]interface{}{"type": "text", "name": "fmt", "value": "%Y-%m-%d %H:%M"}, + map[string]interface{}{"type": "text", "name": "begin", "value": "2018-10-26 12:00"}, + map[string]interface{}{"type": "text", "name": "end", "value": "2018-10-29 12:00"}, + }, + }, map[string]interface{}{"componet_name": "download", "componet_help": "download", "template": "componet", "context": "cli.shy", "componet_cmd": "source", "arguments": []interface{}{"@cmd"}, "display_result": "", "file_name": "", diff --git a/usr/librarys/code.js b/usr/librarys/code.js index 08c39243..ca393617 100644 --- a/usr/librarys/code.js +++ b/usr/librarys/code.js @@ -387,7 +387,7 @@ function init_context() { send_command(option) } } -function init_context() { +function init_command() { var append = document.querySelector("table.append.command") var option = document.querySelector("form.option.command") insert_before(append, "input", {