mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-27 01:28:28 +08:00
fix mp.command
This commit is contained in:
parent
399bfd20bd
commit
341aae3864
@ -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)
|
||||
})
|
||||
|
@ -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++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user