mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
opt some
This commit is contained in:
parent
787fc01510
commit
cfc47ab273
72
proto.js
72
proto.js
@ -13,8 +13,8 @@ var ice = {
|
|||||||
SHOW: "show", HIDE: "hide", HELP: "help", COPY: "copy",
|
SHOW: "show", HIDE: "hide", HELP: "help", COPY: "copy",
|
||||||
VIEW: "view", MODE: "mode", SHIP: "ship", EXEC: "exec",
|
VIEW: "view", MODE: "mode", SHIP: "ship", EXEC: "exec",
|
||||||
|
|
||||||
POD: "pod", CTX: "ctx", CMD: "cmd", ARG: "arg", OPT: "opt",
|
|
||||||
DEV: "dev",
|
DEV: "dev",
|
||||||
|
POD: "pod", CTX: "ctx", CMD: "cmd", ARG: "arg", OPT: "opt",
|
||||||
CAN: "can", RUN: "run", RES: "res", ERR: "err",
|
CAN: "can", RUN: "run", RES: "res", ERR: "err",
|
||||||
CAN_PLUGIN: "can.plugin",
|
CAN_PLUGIN: "can.plugin",
|
||||||
|
|
||||||
@ -34,9 +34,9 @@ var ice = {
|
|||||||
MSG_STATUS: "_status",
|
MSG_STATUS: "_status",
|
||||||
MSG_PREFIX: "_prefix",
|
MSG_PREFIX: "_prefix",
|
||||||
|
|
||||||
MSG_PROCESS: "_process",
|
|
||||||
MSG_DISPLAY: "_display",
|
MSG_DISPLAY: "_display",
|
||||||
MSG_TOOLKIT: "_toolkit",
|
MSG_TOOLKIT: "_toolkit",
|
||||||
|
MSG_PROCESS: "_process",
|
||||||
PROCESS_AGAIN: "_again",
|
PROCESS_AGAIN: "_again",
|
||||||
|
|
||||||
MSG_TITLE: "sess.title",
|
MSG_TITLE: "sess.title",
|
||||||
@ -63,33 +63,6 @@ var ctx = {
|
|||||||
INDEX: "index", ARGS: "args", STYLE: "style", DISPLAY: "display", ACTION: "action",
|
INDEX: "index", ARGS: "args", STYLE: "style", DISPLAY: "display", ACTION: "action",
|
||||||
EXTRA_INDEX: "extra.index", EXTRA_ARGS: "extra.args",
|
EXTRA_INDEX: "extra.index", EXTRA_ARGS: "extra.args",
|
||||||
}
|
}
|
||||||
var cli = {
|
|
||||||
SYSTEM: "system", DAEMON: "daemon",
|
|
||||||
BEGIN: "begin", START: "start", OPEN: "open", CLOSE: "close", STOP: "stop", END: "end", RESTART: "restart",
|
|
||||||
COLOR: "color", WHITE: "white", BLACK: "black", RED: "red", GREEN: "green", BLUE: "blue",
|
|
||||||
YELLOW: "yellow", CYAN: "cyan", PURPLE: "purple", MAGENTA: "magenta", GLASS: "#0000",
|
|
||||||
MAKE: "make", MAIN: "main", EXEC: "exec", DONE: "done", COST: "cost", FROM: "from", CLEAR: "clear",
|
|
||||||
PWD: "pwd",
|
|
||||||
ORDER: "order", BUILD: "build",
|
|
||||||
}
|
|
||||||
var aaa = {
|
|
||||||
LOGIN: "login", LOGOUT: "logout", INVITE: "invite", TOKEN: "token",
|
|
||||||
PASSWORD: "password", USERNAME: "username", USERNICK: "usernick", BACKGROUND: "background", AVATAR: "avatar",
|
|
||||||
LANGUAGE: "language", ENGLISH: "english", CHINESE: "chinese",
|
|
||||||
VOID: "void", TECH: "tech",
|
|
||||||
}
|
|
||||||
var web = {
|
|
||||||
SPACE: "space", DREAM: "dream", SHARE: "share",
|
|
||||||
WEBSITE: "website", DRAW: "draw", CLEAR: "clear", REFRESH: "refresh", RESIZE: "resize", FILTER: "filter", SUBMIT: "submit", CANCEL: "cancel", UPLOAD: "upload", DOWNLOAD: "download", TOIMAGE: "toimage",
|
|
||||||
SHARE_CACHE: "/share/cache/", SHARE_LOCAL: "/share/local/",
|
|
||||||
|
|
||||||
GET: "GET", PUT: "PUT", POST: "POST", DELETE: "DELETE",
|
|
||||||
Accept: "Accept", ContentType: "Content-Type",
|
|
||||||
ContentJSON: "application/json", ContentFORM: "application/x-www-form-urlencoded",
|
|
||||||
|
|
||||||
CODE_INNER: "web.code.inner", WIKI_WORD: "web.wiki.word",
|
|
||||||
VIDEO_WEBM: "video/webm",
|
|
||||||
}
|
|
||||||
var mdb = {
|
var mdb = {
|
||||||
DICT: "dict", META: "meta", HASH: "hash", LIST: "list",
|
DICT: "dict", META: "meta", HASH: "hash", LIST: "list",
|
||||||
|
|
||||||
@ -105,8 +78,35 @@ var mdb = {
|
|||||||
MAIN: "main", PAGE: "page", NEXT: "next", PREV: "prev", LIMIT: "limit", OFFEND: "offend",
|
MAIN: "main", PAGE: "page", NEXT: "next", PREV: "prev", LIMIT: "limit", OFFEND: "offend",
|
||||||
FOREACH: "*", RANDOMS: "%",
|
FOREACH: "*", RANDOMS: "%",
|
||||||
}
|
}
|
||||||
|
var web = {
|
||||||
|
SPACE: "space", DREAM: "dream", SHARE: "share",
|
||||||
|
WEBSITE: "website", DRAW: "draw", CLEAR: "clear", REFRESH: "refresh", RESIZE: "resize", FILTER: "filter", SUBMIT: "submit", CANCEL: "cancel", UPLOAD: "upload", DOWNLOAD: "download", TOIMAGE: "toimage",
|
||||||
|
SHARE_CACHE: "/share/cache/", SHARE_LOCAL: "/share/local/",
|
||||||
|
|
||||||
|
GET: "GET", PUT: "PUT", POST: "POST", DELETE: "DELETE",
|
||||||
|
Accept: "Accept", ContentType: "Content-Type",
|
||||||
|
ContentJSON: "application/json", ContentFORM: "application/x-www-form-urlencoded",
|
||||||
|
|
||||||
|
CODE_INNER: "web.code.inner", WIKI_WORD: "web.wiki.word",
|
||||||
|
VIDEO_WEBM: "video/webm",
|
||||||
|
}
|
||||||
|
var aaa = {
|
||||||
|
LOGIN: "login", LOGOUT: "logout", INVITE: "invite", TOKEN: "token",
|
||||||
|
PASSWORD: "password", USERNAME: "username", USERNICK: "usernick", BACKGROUND: "background", AVATAR: "avatar",
|
||||||
|
LANGUAGE: "language", ENGLISH: "english", CHINESE: "chinese",
|
||||||
|
VOID: "void", TECH: "tech",
|
||||||
|
}
|
||||||
|
var lex = {
|
||||||
|
SPLIT: "split", PREFIX: "prefix", SUFFIX: "suffix",
|
||||||
|
}
|
||||||
|
var gdb = {
|
||||||
|
SIGNAL: "signal",
|
||||||
|
}
|
||||||
var ssh = {
|
var ssh = {
|
||||||
}
|
}
|
||||||
|
var tcp = {
|
||||||
|
HOST: "host", PORT: "port",
|
||||||
|
}
|
||||||
var nfs = {
|
var nfs = {
|
||||||
PATH: "path", FILE: "file", LINE: "line", SIZE: "size", ROOT: "root",
|
PATH: "path", FILE: "file", LINE: "line", SIZE: "size", ROOT: "root",
|
||||||
COPY: "copy", EDIT: "edit", SAVE: "save", LOAD: "load", FIND: "find", GREP: "grep", TAGS: "tags",
|
COPY: "copy", EDIT: "edit", SAVE: "save", LOAD: "load", FIND: "find", GREP: "grep", TAGS: "tags",
|
||||||
@ -116,14 +116,12 @@ var nfs = {
|
|||||||
ZML: "zml", IML: "iml", TXT: "txt", PNG: "png", WEBM: "webm",
|
ZML: "zml", IML: "iml", TXT: "txt", PNG: "png", WEBM: "webm",
|
||||||
_CSS: ".css", _JS: ".js",
|
_CSS: ".css", _JS: ".js",
|
||||||
}
|
}
|
||||||
var tcp = {
|
var cli = {
|
||||||
HOST: "host", PORT: "port",
|
PWD: "pwd", SYSTEM: "system", DAEMON: "daemon", ORDER: "order", BUILD: "build",
|
||||||
}
|
BEGIN: "begin", START: "start", OPEN: "open", CLOSE: "close", STOP: "stop", END: "end", RESTART: "restart",
|
||||||
var lex = {
|
COLOR: "color", WHITE: "white", BLACK: "black", RED: "red", GREEN: "green", BLUE: "blue",
|
||||||
SPLIT: "split", PREFIX: "prefix", SUFFIX: "suffix",
|
YELLOW: "yellow", CYAN: "cyan", PURPLE: "purple", MAGENTA: "magenta", GLASS: "#0000",
|
||||||
}
|
MAKE: "make", MAIN: "main", EXEC: "exec", DONE: "done", COST: "cost", FROM: "from", CLEAR: "clear",
|
||||||
var gdb = {
|
|
||||||
SIGNAL: "signal",
|
|
||||||
}
|
}
|
||||||
var log = {
|
var log = {
|
||||||
INFO: "info", WARN: "warn", ERROR: "error", DEBUG: "debug", TRACE: "trace",
|
INFO: "info", WARN: "warn", ERROR: "error", DEBUG: "debug", TRACE: "trace",
|
||||||
|
@ -5,7 +5,7 @@ App({
|
|||||||
requests: function(cmd, data, cb) { wx.showLoading()
|
requests: function(cmd, data, cb) { wx.showLoading()
|
||||||
this.request(cmd, data, function(msg) { wx.hideLoading(), typeof cb == "function" && cb(msg) })
|
this.request(cmd, data, function(msg) { wx.hideLoading(), typeof cb == "function" && cb(msg) })
|
||||||
},
|
},
|
||||||
request: function(cmd, data, cb) { var app = this; data.sessid = app.conf.sessid, data.pod = app.conf.space
|
request: function(cmd, data, cb) { var app = this; data.sessid_443 = app.conf.sessid, data.pod = app.conf.space
|
||||||
wx.request({method: "POST", url: app.conf.serve+"/"+cmd, data: data, success: function(res) { var msg = res.data
|
wx.request({method: "POST", url: app.conf.serve+"/"+cmd, data: data, success: function(res) { var msg = res.data
|
||||||
if (res.statusCode == 401) { return app.usercode(function() { app.request(cmd, data, cb) }) }
|
if (res.statusCode == 401) { return app.usercode(function() { app.request(cmd, data, cb) }) }
|
||||||
console.log("POST", cmd, msg)
|
console.log("POST", cmd, msg)
|
||||||
@ -69,13 +69,13 @@ App({
|
|||||||
},
|
},
|
||||||
|
|
||||||
usercode: function(cb) { var app = this
|
usercode: function(cb) { var app = this
|
||||||
wx.login({success: function(res) { app.request("mp/login/sess", {code: res.code}, function(msg) {
|
wx.login({success: function(res) { app.request("mp/login/action/sess", {code: res.code}, function(msg) {
|
||||||
wx.setStorage({key: "sessid", data: app.conf.sessid = msg.Result()})
|
wx.setStorage({key: "sessid", data: app.conf.sessid = msg.Result()})
|
||||||
typeof cb == "function" && cb()
|
typeof cb == "function" && cb()
|
||||||
})}})
|
})}})
|
||||||
},
|
},
|
||||||
userinfo: function(cb) { var app = this
|
userinfo: function(cb) { var app = this
|
||||||
app.conf.userInfo? app.request("mp/login/user", app.conf.userInfo, function(msg) {
|
app.conf.userInfo? app.request("mp/login/action/user", app.conf.userInfo, function(msg) {
|
||||||
typeof cb == "function" && cb(app.conf.userInfo)
|
typeof cb == "function" && cb(app.conf.userInfo)
|
||||||
}): app.usercode(function() { wx.getSetting({success: function(res) {
|
}): app.usercode(function() { wx.getSetting({success: function(res) {
|
||||||
res.authSetting['scope.userInfo'] && wx.getUserInfo({success: function(res) {
|
res.authSetting['scope.userInfo'] && wx.getUserInfo({success: function(res) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user