diff --git a/frame.js b/frame.js
index aa47cc8a..d98584ca 100644
--- a/frame.js
+++ b/frame.js
@@ -26,6 +26,7 @@ Volcanos(chat.ONENGINE, {_init: function(can, meta, list, cb, target) {
if (sub._daemon) { msg.Option(ice.MSG_DAEMON, can.core.Keys(can.ondaemon._list[0], sub._daemon)) }
} can.base.isIn(sub.ConfIndex(), "qrcode", "cli.qrcode") && can.page.exportValue(sub, msg)
if (!can.misc.CookieSessid(can) && can.user.info.sessid) { msg.Option(ice.MSG_SESSID, can.user.info.sessid) }
+ msg.OptionDefault(ice.MSG_THEME, can.getHeaderTheme())
var names = msg.Option(chat._NAMES)||panel._names||((can.Conf("iceberg")||Volcanos.meta.iceberg)+"/chat/"+panel._name+"/")
names = can.base.MergeURL(names, ice.MSG_INDEX, sub.ConfIndex(), ice.MSG_LANGUAGE, can.user.info.language, ice.MSG_THEME, can.getHeader(chat.THEME))
can.onengine.signal(panel, chat.ONREMOTE, can.request({}, {_follow: panel._follow, _msg: msg, _cmds: cmds, names: names}))
diff --git a/publish/client/mp/app.wxml b/publish/client/mp/app.wxml
index 1f43ba0b..ab6ed609 100644
--- a/publish/client/mp/app.wxml
+++ b/publish/client/mp/app.wxml
@@ -12,47 +12,6 @@
-
-
-
- {{item.name}}
-
- {{item.name}}
-
-
-
-
-
-
-
-
- {{field.name}}({{field.help}})
-
-
-
-
-
-
-
- {{item.value||item.values[item.index||0]}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/publish/client/mp/app.wxss b/publish/client/mp/app.wxss
index 3c04daca..64223f3e 100644
--- a/publish/client/mp/app.wxss
+++ b/publish/client/mp/app.wxss
@@ -10,19 +10,24 @@ page {
page { padding:10px; }
page, view { box-sizing: border-box; }
view.debug { font-family:monospace; font-style:italic; padding:10px; clear:both; }
-view.action view.item { float:left; }
-view.action view.item.button { margin-right:5px; }
view.output { width:100%; overflow:auto; clear:both; }
+view.output textarea { width:100%; }
view.output view.item { font-size:18px; text-align:center; padding:10px; border:var(--box-border); }
view.output view.list view.item { margin-left:20px; }
+
view.legend { font-size:18px; font-weight:bold; margin:10px 0; }
+view.action view.item { padding:0; border:0; margin-right:5px; float:left; }
view.option view.item { padding:0; border:0; margin-right:5px; float:left; }
view.option view.item.textarea { border:var(--box-border); width:calc(100% - 2px); clear:both; }
view.option view.item.select { border:var(--box-border); }
-view.option view.item picker { border:var(--box-border); height:30px; min-width:80px; }
-view.option view.item input { border:var(--box-border); height:30px; min-width:80px; }
+view.option view.item picker { border:var(--box-border); height:30px; width:80px; }
+view.option view.item input { border:var(--box-border); height:30px; width:80px; }
view.option view.item button { height:32px; }
view.output view.code { white-space:pre; padding:10px; border-left:cyan solid 2px; }
+view.status view.item { font-size:12px; font-style:italic; padding:5px; border:none; margin:0; float:left; }
+view.status view.item text.name { font-size:10px; }
+view.action.submit view.item { margin-right:0; }
+
table { display:table; border-collapse:collapse; }
tr { display:table-row; }
th { display:table-cell; padding:5px; border:var(--box-border); vertical-align:middle; text-align:center; }
@@ -30,4 +35,3 @@ td { display:table-cell; padding:5px; border:var(--box-border); vertical-align:m
td view.which { padding:0; order:0; }
table.content.action th:last-child { position:sticky; right:2px; text-align:center; min-width:60px; }
table.content.action td:last-child { position:sticky; right:2px; text-align:center; min-width:60px; }
-picker { min-width:80px; }
diff --git a/publish/client/mp/pages/action/action.js b/publish/client/mp/pages/action/action.js
index cb7d0639..67d852ba 100644
--- a/publish/client/mp/pages/action/action.js
+++ b/publish/client/mp/pages/action/action.js
@@ -1,16 +1,18 @@
-const {ice, ctx, mdb, chat, html} = require("../../utils/const.js")
+const {ice, ctx, mdb, code, chat, html} = require("../../utils/const.js")
const {shy, Volcanos} = require("../../utils/proto.js")
Volcanos._page = {}
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) { can.ui.data.list = []
- msg.Table(function(value, index) { can.ui.data.list.push(value)
- value.feature = can.base.Obj(value.meta, {})
- value.inputs = can.base.Obj(value.list, [])
- value.name = can.core.Split(value.name)[0]
- if (!value.inputs || value.inputs.length === 0) {
- value.inputs = [{type: html.TEXT}, {type: html.BUTTON, name: ctx.RUN}]
+ msg.Table(function(field, order) { can.ui.data.list.push(field)
+ field.feature = can.base.Obj(field.meta, {})
+ field.inputs = can.base.Obj(field.list, [])
+ field.name = can.core.Split(field.name)[0]
+ if (!field.inputs || field.inputs.length === 0) {
+ return can.core.Timer(30, function() {
+ can.onaction._refresh({}, can, order)
+ })
}
- can.core.List(value.inputs, function(input) {
+ can.core.List(field.inputs, function(input) {
input.action = input.action || input.value
input.value == ice.AUTO && (input.value = "")
if (input.value && input.value.indexOf("@") == 0) {
@@ -20,13 +22,15 @@ Volcanos(chat.ONIMPORT, {
input.values = input.values || can.core.Split(input.value)
}
if (input.type == html.TEXT) {
- input.placeholder = can.user.trans(can, input.placeholder||input.name, can.core.Value(value, "feature._trans"), html.INPUT)
+ input.placeholder = can.user.trans(can, input.placeholder||input.name, can.core.Value(field, "feature._trans"), html.INPUT)
}
if (input.type == html.BUTTON) {
- input.value = can.user.trans(can, input.value||input.name, can.core.Value(value, "feature._trans"))
+ input.value = can.user.trans(can, input.value||input.name, can.core.Value(field, "feature._trans"))
+ } else {
+ if (can.db.cmd||can.db.index) { input.value = input.value||can.db[input.name] }
}
- input.type == html.BUTTON && input.action == ice.AUTO && can.core.Timer(100, function() {
- can.onaction.onAction({}, can, ice.LIST, {order: index, name: ice.LIST})
+ input.type == html.BUTTON && input.action == ice.AUTO && can.core.Timer(30, function() {
+ can.onaction._refresh({}, can, order)
})
})
}), can.page.setData(can), can.user.toast(can, "加载成功")
@@ -36,13 +40,19 @@ Volcanos(chat.ONACTION, {list: ["刷新", "扫码", "清屏"],
"刷新": function(event, can) { can.onaction.refresh(event, can) },
"扫码": function(event, can) { can.user.agent.scanQRCode(can) },
"清屏": function(event, can) { can.core.List(can.ui.data.list, function(item) { delete(item.msg) }), can.page.setData(can) },
- refresh: function(event, can) {
- if (can.db.cmd||can.db.index) { can.onaction._cmds = []
+ _refresh: function(event, can, order) { can.page.setData(can)
+ can.onaction.onAction({}, can, ice.LIST, {order: order, name: ice.LIST})
+ },
+ refresh: function(event, can) { can.onaction._apis = "", can.onaction._cmds = []
+ if (can.db.share) { can.onaction._apis = "/share/"+can.db.share
+ can.run(event, [ctx.ACTION, ctx.COMMAND], function(msg) {
+ can.onaction._cmds = [ctx.ACTION, ctx.RUN], can.onimport._init(can, msg)
+ })
+ } else if (can.db.cmd||can.db.index) {
can.run(event, [ctx.ACTION, ctx.COMMAND, can.db.cmd||can.db.index], function(msg) {
can.onaction._cmds = [ctx.ACTION, ctx.RUN], can.onimport._init(can, msg)
})
- } else {
- can.onaction._cmds = [can.db.river, can.db.storm]
+ } else { can.onaction._cmds = [can.db.river, can.db.storm]
can.run(event, [], function(msg) { can.onimport._init(can, msg) })
}
},
@@ -56,68 +66,62 @@ Volcanos(chat.ONACTION, {list: ["刷新", "扫码", "清屏"],
onChange: function(event, can, button, data) { var order = data.order, index = data.index
var input = can.ui.data.list[order||0].inputs[index||0]
input.value = input.values[parseInt(event.detail.value)]
- can.onaction.onAction({}, can, ice.LIST, {order: index, name: ice.LIST})
+ can.onaction._refresh(event, can, order)
},
onAction: function(event, can, button, data) { var order = data.order, name = data.name
var field = can.ui.data.list[order||0]
if (field.feature[name]) {
- can.data.insert = {field: field, name: name, list: field.feature[name], cb: function(res) {
+ return can.data.insert = {field: field, name: name, list: field.feature[name], cb: function(res) {
can.run(event, can.base.Simple([field.id||field.index, ctx.ACTION, name], res), function(msg) {
- can.onaction.onAction(event, can, ice.LIST, {order: order, name: ice.LIST})
+ can.onaction._refresh(event, can, order)
})
- }}
- can.user.jumps(chat.PAGES_INSERT, {river: can.db.river, storm: can.db.storm, index: field.id||field.index, serve: can.db.serve, space: can.db.space})
- return
+ }}, can.user.jumps(chat.PAGES_INSERT)
}
field._history = field._history||[]
switch (name) {
case ice.BACK: field._history.pop()
var ls = field._history.pop()||[], i = 0
- can.core.List(field.inputs, function(input, index) { if (input.type != html.BUTTON) { input.value = ls[i++]||"" } })
- can.page.setData(can), can.onaction.onAction(event, can, ice.LIST, {order: order, name: ice.LIST})
+ can.core.List(field.inputs, function(input) { if (input.type != html.BUTTON) { input.value = ls[i++]||"" } })
+ can.onaction._refresh(event, can, order)
break
case ctx.RUN:
case ice.LIST:
case "refresh": break
- default: return
+ default: m.Option(ctx.ACTION, name)
}
var cmd = can.core.List(field.inputs, function(input) { if (input.type != html.BUTTON) { return input.value } })
for (var i = cmd.length-1; i > 0; i--) { if (cmd[i] === "") { cmd.pop() } else { break } }
- function eq(to, from) { if (!to) { return false }
- if (to.length != from.length) { return false }
- for (var i = 0; i < to.length; i++) { if (to[i] != from[i]) { return false } }
- return true
+ function eq(to, from) { if (!to) { return false } if (to.length != from.length) { return false }
+ for (var i = 0; i < to.length; i++) { if (to[i] != from[i]) { return false } } return true
} eq(field._history[field._history.length-1], cmd) || field._history.push(cmd)
can.run(event, [field.id||field.index].concat(cmd), function(msg) {
- msg._head = can.core.List(msg.append, function(item) {
- return can.user.trans(can, item, can.core.Value(field, "feature._trans"), html.INPUT)
- })
- can.core.Item(msg._view, function(key, value) { can.core.List(value, function(value, index) { can.core.List(value, function(input, i) {
- if (input.type == html.BUTTON) {
- input.value = can.user.trans(can, input.value||input.name, can.core.Value(field, "feature._trans"))
- }
- if (input._type == html.TEXT) {
- input._text = can.user.trans(can, input._text, can.core.Value(field, "feature._trans"), html.VALUE)
- }
+ msg._head = can.core.List(msg.append, function(item) { return can.user.trans(can, item, can.core.Value(field, "feature._trans"), html.INPUT) })
+ can.core.Item(msg._view, function(key, value) { can.core.List(value, function(value) { can.core.List(value, function(input, i) {
+ if (input.type == html.BUTTON) { input.value = can.user.trans(can, input.value||input.name, can.core.Value(field, "feature._trans")) }
+ if (input._type == html.TEXT) { input._text = can.user.trans(can, input._text, can.core.Value(field, "feature._trans"), html.VALUE) }
}) }) })
+ msg._status = can.core.List(can.base.Obj(msg.Option(ice.MSG_STATUS)), function(item) { return item.name = can.user.trans(can, item.name), can.user.trans(can, item, html.INPUT) })
+ msg._action = can.core.List(can.base.Obj(msg.Option(ice.MSG_ACTION)), function(item) {
+ if (typeof item == code.STRING) { return {type: html.BUTTON, name: item, value: can.user.trans(can, item)} }
+ return item.value = can.user.trans(can, item.value||item.name), item
+ })
field.msg = msg, can.page.setData(can)
})
},
onDetail: function(event, can, button, data) { var order = data.order, name = data.name, value = data.value, input = data.input
var field = can.ui.data.list[order||0]
if (input && input.type == html.BUTTON) { can.request(event, field.msg.Table()[data.index])
+ var _input = {}; can.core.List(field.inputs, function(input) { if (input.type != html.BUTTON) { _input[input.name] = input.value } }), can.request(event, _input)
if (field.feature[input.name]) {
can.onAction(event, can, input.name, {order: order, name: input.name})
} else {
can.run(event, [field.id||field.index, ctx.ACTION, input.name], function(msg) {
- // value.msg = msg, can.page.setData(can)
+ can.onaction._refresh(event, can, order)
})
} return
}
can.core.List(field.inputs, function(input) {
- if (input.name == name) { input.value = value, can.page.setData(can)
- can.onaction.onAction(event, can, ice.LIST, {order: order, name: ice.LIST})
- }
+ if (input.name == name) { input.value = value, can.onaction._refresh(event, can, order) }
})
},
})
diff --git a/publish/client/mp/pages/action/action.wxml b/publish/client/mp/pages/action/action.wxml
index dffd98bf..5581030e 100644
--- a/publish/client/mp/pages/action/action.wxml
+++ b/publish/client/mp/pages/action/action.wxml
@@ -1,5 +1,44 @@
-
-
-
-
+
+
+
+
+
+ {{field.name}}({{field.help}})
+
+
+
+
+
+
+
+ {{item.value||item.values[item.index||0]}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}: {{item.value}}
+
+
+
+
+
diff --git a/publish/client/mp/pages/insert/insert.wxml b/publish/client/mp/pages/insert/insert.wxml
index 75ef14cc..74026046 100644
--- a/publish/client/mp/pages/insert/insert.wxml
+++ b/publish/client/mp/pages/insert/insert.wxml
@@ -1,20 +1,21 @@
-
-
-
-
-
-
-
-
-
-
- {{item.values[item.index||0]}}
-
+
+
+
+
+
+
+
+
+
+
+
+ {{item.values[item.index||0]}}
+
+
+
+
+
+
-
-
-
-
-
diff --git a/publish/client/mp/pages/river/river.js b/publish/client/mp/pages/river/river.js
index 2c407296..0bc31afd 100644
--- a/publish/client/mp/pages/river/river.js
+++ b/publish/client/mp/pages/river/river.js
@@ -28,6 +28,6 @@ Volcanos("onaction", {list: ["刷新", "扫码", "登录"],
var river = can.ui.data.list[index], storm = river.list[i]
can.user.jumps(can.base.MergeURL(chat.PAGES_ACTION, {river: river.hash, storm: storm.hash, serve: can.db.serve, space: can.db.space}))
},
- _name: nfs.CHAT_RIVER,
+ _apis: nfs.CHAT_RIVER,
})
Volcanos._init()
diff --git a/publish/client/mp/pages/river/river.wxml b/publish/client/mp/pages/river/river.wxml
index eb92bb6b..2f6043bb 100644
--- a/publish/client/mp/pages/river/river.wxml
+++ b/publish/client/mp/pages/river/river.wxml
@@ -1,4 +1,13 @@
-
-
-
+
+
+
+
+
+ {{item.name}}
+
+ {{item.name}}
+
+
+
+
diff --git a/publish/client/mp/project.private.config.json b/publish/client/mp/project.private.config.json
index 70b67c9b..6df9e13c 100644
--- a/publish/client/mp/project.private.config.json
+++ b/publish/client/mp/project.private.config.json
@@ -1,6 +1,25 @@
{
"projectname": "%E7%BB%88%E7%AB%AF%E5%B7%A5%E5%85%B7%E9%93%BE",
"setting": {
- "compileHotReLoad": false
+ "compileHotReLoad": true
+ },
+ "condition": {
+ "miniprogram": {
+ "list": [
+ {
+ "name": "",
+ "pathName": "pages/action/action",
+ "query": "cmd=web.code.h2.h2",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "pages/action/action",
+ "pathName": "pages/action/action",
+ "query": "river= e0a1eb&storm=c23ae3&title=hi.scan",
+ "scene": 1001
+ }
+ ]
+ }
}
}
\ No newline at end of file
diff --git a/publish/client/mp/utils/const.js b/publish/client/mp/utils/const.js
index 5862acb3..352c53a1 100644
--- a/publish/client/mp/utils/const.js
+++ b/publish/client/mp/utils/const.js
@@ -19,6 +19,7 @@ var ice = {
MSG_FIELDS: "fields", MSG_SESSID: "sessid",
MSG_DETAIL: "detail", MSG_OPTION: "option", MSG_APPEND: "append", MSG_RESULT: "result",
+ MSG_ACTION: "_action", MSG_STATUS: "_status",
}
var ctx = {
CONTEXT: "context", COMMAND: "command", CONFIG: "config", INPUTS: "inputs", FEATURE: "feature",
@@ -64,11 +65,12 @@ var chat = {
ONIMPORT: "onimport", ONACTION: "onaction", ONDETAIL: "ondetail", ONEXPORT: "onexport",
ONSYNTAX: "onsyntax", ONFIGURE: "onfigure", ONPLUGIN: "onplugin",
+ PAGES_RIVER: "/pages/river/river",
+ PAGES_ACTION: "/pages/action/action",
+ PAGES_INSERT: "/pages/insert/insert",
WX_LOGIN_SESS: "/chat/wx/login/action/sess",
WX_LOGIN_USER: "/chat/wx/login/action/user",
WX_LOGIN_SCAN: "/chat/wx/login/action/scan",
- PAGES_ACTION: "/pages/action/action",
- PAGES_INSERT: "/pages/insert/insert",
}
var team = {
}
diff --git a/publish/client/mp/utils/lib/base.js b/publish/client/mp/utils/lib/base.js
index fbef4276..2526583c 100644
--- a/publish/client/mp/utils/lib/base.js
+++ b/publish/client/mp/utils/lib/base.js
@@ -55,4 +55,14 @@ Volcanos("base", {
list[list.length-1] = value
} }
},
+ trimPrefix: function(str, pre) { if (typeof str != code.STRING) { return str } var arg = arguments, callee = arg.callee
+ if (arg.length > 2) { for (var i = 1; i < arg.length; i++) { str = callee(str, arg[i]) } return str }
+ if (str.indexOf(pre) == -1) { return str } return str.slice(pre.length)
+ },
+ trimSuffix: function(str, end) { while (str) { var index = str.lastIndexOf(end)
+ if (index == -1 || index+end.length != str.length) { break } str = str.slice(0, index)
+ } return str },
+ trim: function(arg) { if (this.isString(arg)) { return arg.trim() }
+ if (this.isArray(arg)) { for (var i = arg.length-1; i >= 0; i--) { if (!arg[i]) { arg.pop() } else { break } } } return arg
+ },
})
diff --git a/publish/client/mp/utils/lib/misc.js b/publish/client/mp/utils/lib/misc.js
index d6fab5e6..12e468df 100644
--- a/publish/client/mp/utils/lib/misc.js
+++ b/publish/client/mp/utils/lib/misc.js
@@ -67,7 +67,6 @@ Volcanos("misc", {
can.user.info = {}, can.misc.localStorage(can, ice.MSG_SESSID, can.conf.sessid = "")
return can.user.login(can, function() { can.misc.request(can, msg, cmd, data, cb) })
}
- wx.hideLoading()
msg.Copy(res.data), console.log("request", cmd, data.cmds||data, msg)
can.base.toLast(msg.append, mdb.TIME), can.base.toLast(msg.append, web.LINK), can.base.toLast(msg.append, ctx.ACTION)
if (msg.append && msg.append.indexOf(ctx.ACTION) > 0) {
diff --git a/publish/client/mp/utils/lib/page.js b/publish/client/mp/utils/lib/page.js
index 4e4c5808..204bffc1 100644
--- a/publish/client/mp/utils/lib/page.js
+++ b/publish/client/mp/utils/lib/page.js
@@ -3,6 +3,5 @@ module.exports =
Volcanos("page", {
setData: function(can, list) {
can.ui.setData({list: list||can.ui.data.list})
- wx.hideLoading()
}
})
diff --git a/publish/client/mp/utils/lib/user.js b/publish/client/mp/utils/lib/user.js
index 1bfa6055..d37bffd3 100644
--- a/publish/client/mp/utils/lib/user.js
+++ b/publish/client/mp/utils/lib/user.js
@@ -21,19 +21,14 @@ Volcanos("user", {
wx.scanCode({success: function(res) { var data = can.base.ParseJSON(res.result)
if (data.type == web.LINK && data._origin) { can.base.Copy(data, can.misc.ParseURL(can, res.result)) }
if (cb && cb(data)) { return }
- if (data.cmd||data.index) {
- if (data.type == web.LINK && data._origin) {
- var serve = /(https?:\/\/[^/]+)([^?#])*/.exec(data._origin)[1]; data.serve = serve, delete(data._origin)
- delete(data.type), delete(data.name), delete(data.text)
- }
- can.user.jumps(can.base.MergeURL("/pages/action/action", data))
+ if (data.type == web.LINK && data._origin) { delete(data.type), delete(data.name), delete(data.text)
+ var serve = /(https?:\/\/[^/]+)([^?#])*/.exec(data._origin)[1]; data.serve = serve, delete(data._origin)
+ }
+ if (data.cmd||data.index||data.share) {
+ can.user.jumps(can.base.MergeURL(chat.PAGES_ACTION, data))
+ } else if (data.pod||data.space||data.serve) {
+ can.user.jumps(can.base.MergeURL(chat.PAGES_RIVER, data))
} else {
- if (data.type == web.LINK && data._origin) {
- var serve = /(https?:\/\/[^/]+)([^?#])*/.exec(data._origin)[1]; data.serve = serve, delete(data._origin)
- delete(data.type), delete(data.name), delete(data.text)
- can.user.jumps(can.base.MergeURL("/pages/river/river", data))
- return
- }
can.misc.request(can, can.request(), chat.WX_LOGIN_SCAN, data)
}
}})
@@ -63,10 +58,13 @@ Volcanos("user", {
},
trans: function(can, text, list, zone) { if (!text) { return text }
return can.core.Value(list, can.core.Keys(zone, text))||can.core.Value({
- "list": "查看", "back": "返回", "create": "创建",
+ "run": "执行", "list": "查看", "back": "返回",
+ "create": "创建", "remove": "删除",
+ "prunes": "清理",
"start": "启动", "stop": "停止", "open": "打开",
"trash": "清理",
input: {
+ "hash": "索引",
"time": "时间", "link": "链接", "status": "状态", "action": "操作",
"type": "类型", "name": "名称", "text": "内容", "icon": "图标",
"repos": "仓库", "binary": "程序", "script": "脚本", "template": "仓库", "version": "版本",
diff --git a/publish/client/mp/utils/proto.js b/publish/client/mp/utils/proto.js
index 96cff59b..29953064 100644
--- a/publish/client/mp/utils/proto.js
+++ b/publish/client/mp/utils/proto.js
@@ -24,28 +24,18 @@ Volcanos._init = function() {
}): can.core.Item(can.base.isFunc(item)? item(): item, set)
}); return msg
},
- run: function(event, cmds, cb) {
- wx.showLoading()
- var msg = can.request(event); msg._serve = can.db.serve
- can.misc.requests(can, can.request(event, {pod: can.db.pod||can.db.space}), can.onaction._name||nfs.CHAT_ACTION, {cmds: (can.onaction._cmds||[]).concat(cmds)}, function(msg) {
- msg.Dump = function() { can.ui.setData({list: msg.Table()}) }, cb(msg)
+ run: function(event, cmds, cb) { wx.showLoading()
+ can.misc.requests(can, can.request(event, {pod: can.db.pod||can.db.space}), can.onaction._apis||nfs.CHAT_ACTION, {cmds: (can.onaction._cmds||[]).concat(cmds)}, function(msg) {
+ msg.Dump = function() { can.ui.setData({list: msg.Table()}) }, cb(msg), wx.hideLoading()
})
},
}; Volcanos._page.__proto__ = getApp(), delete(Volcanos._page)
var page = {data: {action: can.onaction.list, list: []},
- onLoad: function(options) { can.ui = this, can.db = options
- can.db.serve = can.db.serve||can.conf.serve
+ onLoad: function(options) { can.ui = this, can.db = options, can.db.serve = can.db.serve||can.conf.serve
can.core.Item(can.db, function(key, value) { can.db[key] = decodeURIComponent(value) })
can.user.title(can.db.title||can.db.pod||can.db.space||(can.db.serve||can.conf.serve).split("://")[1])
- console.log("app show", can.ui.route, options)
- can.ui.setData({conf: can.db})
- can.user.login(can, function() {
- if (can.onaction.refresh) {
- can.onaction.refresh({}, can)
- } else {
-
- }
- })
+ console.log("app show", can.ui.route, options), can.ui.setData({conf: can.db})
+ can.user.login(can, function() { can.onaction.refresh({}, can) })
},
onShow: function() {},
onReady: function() {},