diff --git a/usr/client/mp/app.js b/usr/client/mp/app.js index 990349bf..82f4a3ce 100644 --- a/usr/client/mp/app.js +++ b/usr/client/mp/app.js @@ -77,8 +77,13 @@ App({ command: function(args, cb) { var app = this + var cmd = args["cmd"] + if (cmd[0] == "note") { + cmd = ["context", "ssh", "sh", "node", "note", "context", "mdb"].concat(args["cmd"]) + } + app.login(function(userInfo) { - app.request({cmd: ["context", "ssh", "sh", "node", "note", "context", "mdb"].concat(args["cmd"])}, function(res) { + app.request({cmd: cmd}, function(res) { app.toast("ok") typeof cb == "function" && cb(res) }) diff --git a/usr/client/mp/pages/index/index.js b/usr/client/mp/pages/index/index.js index 5340b703..6a28437f 100644 --- a/usr/client/mp/pages/index/index.js +++ b/usr/client/mp/pages/index/index.js @@ -11,7 +11,7 @@ Page({ onCommand: function(e) { var page = this var cmd = e.detail.value - app.command({"cmd": cmd}, function(res) { + app.command({"cmd": ["source", cmd]}, function(res) { if (res.append) { var table = [] for (var i = 0; i < res[res.append[0]].length; i++) {