diff --git a/lib/misc.js b/lib/misc.js index df815b38..03031016 100644 --- a/lib/misc.js +++ b/lib/misc.js @@ -372,4 +372,4 @@ Volcanos("misc", { }, _signal: function(args) { this._list.push(args) }, _list: [], _skip: navigator && navigator.userAgent.indexOf("Chrome") > -1? 3: 3, }) - \ No newline at end of file + diff --git a/publish/client/mp/utils/frame-wx.js b/publish/client/mp/utils/frame-wx.js index 536177a7..879de633 100644 --- a/publish/client/mp/utils/frame-wx.js +++ b/publish/client/mp/utils/frame-wx.js @@ -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) @@ -59,8 +63,8 @@ Volcanos(chat.ONACTION, { } 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) { if (input.type != html.BUTTON) { input.value = ls[i++]||"" } }) - can.onaction._refresh(event, can, order); break + 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: break case ice.LIST: case web.REFRESH: msg._method = http.GET; break @@ -95,7 +99,7 @@ Volcanos(chat.ONACTION, { can.run(event, [field.id||field.index, ctx.ACTION, input.name], function(msg) { switch (msg.Option(ice.MSG_PROCESS)) { case "_location": - can.user.parse(can, msg.Option("_arg")) + can.user.parse(can, msg.Option("_arg")) } can.onaction._refresh(event, can, order) }) diff --git a/publish/client/mp/utils/proto.js b/publish/client/mp/utils/proto.js index 9ad1bd0f..052608f6 100644 --- a/publish/client/mp/utils/proto.js +++ b/publish/client/mp/utils/proto.js @@ -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) })