forked from x/volcanos
opt some
This commit is contained in:
parent
8fcb2dfdfa
commit
68eedc76f1
@ -23,6 +23,10 @@ Volcanos(chat.ONACTION, {
|
||||
}), can.page.setData(can), can.user.toast(can, "加载成功")
|
||||
},
|
||||
refresh: function(event, can) { can.onaction._apis = "", can.onaction._cmds = []
|
||||
if (can.db.index == "web.chat.grant") {
|
||||
wx.redirectTo({url: can.base.MergeURL("grant", {serve: can.db.serve, space: can.db.space})})
|
||||
return
|
||||
}
|
||||
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.onaction._reload(can, msg)
|
||||
|
@ -15,6 +15,7 @@ function Volcanos(name, list) { if (Volcanos._page) { Volcanos._page[name] = lis
|
||||
|
||||
Volcanos._init = function() { var page = Volcanos._page; page.__proto__ = getApp(), delete(Volcanos._page)
|
||||
var can = {__proto__: page,
|
||||
Option: function() { return {} },
|
||||
request: function(event) { event = event||{}, event = event._event||event
|
||||
var msg = event._msg||can.misc.Message(event, can); event._msg = msg
|
||||
function set(key, value) { if (key == "_method") { return msg._method = value }
|
||||
@ -28,7 +29,8 @@ Volcanos._init = function() { var page = Volcanos._page; page.__proto__ = getApp
|
||||
},
|
||||
run: function(event, cmds, cb) { wx.showLoading(); const info = wx.getSystemInfoSync()
|
||||
can.misc.POST(can, can.request(event, {share: can.db.share}), can.base.MergeURL(can.onaction._apis||nfs.CHAT_ACTION, kit.Dict(
|
||||
ice.POD, can.db.pod||can.db.space, ice.MSG_THEME, info.theme, ice.MSG_DEBUG, can.db.debug,
|
||||
// ice.POD, can.db.pod||can.db.space, ice.MSG_THEME, info.theme, ice.MSG_DEBUG, can.db.debug,
|
||||
ice.POD, can.db.pod, ice.MSG_THEME, info.theme, ice.MSG_DEBUG, can.db.debug,
|
||||
)), {cmds: (can.onaction._cmds||[]).concat(cmds)}, function(msg) { wx.hideLoading()
|
||||
msg.Dump = function() { can.ui.setData({list: msg.Table()}) }, cb(msg)
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user