1
0
forked from x/ContextOS

mix branch 'master' of github.com:shylinux/context

This commit is contained in:
shaoying 2019-03-09 13:19:11 +08:00
commit 5554b503a0
2 changed files with 7 additions and 2 deletions

View File

@ -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)
})

View File

@ -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++) {