diff --git a/lib/base.js b/lib/base.js index a924b538..49ec623e 100644 --- a/lib/base.js +++ b/lib/base.js @@ -223,7 +223,7 @@ Volcanos("base", {help: "数据类型", Int: function(val, def) { return parseIn } return n }, - random: function(max, min) { min = min||0, parseInt(Math.random()*(max-min))+min }, + random: function(max, min) { return min = min||0, parseInt(Math.random()*(max-min))+min }, isNight: function() { var now = new Date(); return now.getHours() < 7 || now.getHours() > 17 }, beginWith: function(str, begin) { return str.trim().indexOf(begin) == 0 }, endWith: function(str, end) { return str.lastIndexOf(end) + end.length == str.length }, diff --git a/plugin/local/team/plan.js b/plugin/local/team/plan.js index e0aed5f9..c5c00edb 100644 --- a/plugin/local/team/plan.js +++ b/plugin/local/team/plan.js @@ -1,11 +1,8 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, target) { - can.onmotion.clear(can, target) - can.ui = can.onlayout.profile(can) - can.onimport[can.Option("scale")||"week"](can, msg) - can.page.style(can, can.ui.project, html.MAX_HEIGHT, can.ui.content.offsetHeight) + can.onmotion.clear(can, target), can.base.isFunc(cb) && cb(msg) + + can.ui = can.onlayout.profile(can), can.onimport[can.Option("scale")||"week"](can, msg) can.page.style(can, can.ui.profile, html.MAX_HEIGHT, can.ui.content.offsetHeight) - can.page.style(can, can.ui.profile, {display: "block"}) - can.base.isFunc(cb) && cb(msg) can.user.isMobile && !can.user.isLandscape() && can.onmotion.hidden(can, can.ui.project) }, _content: function(can, msg, head, list, key, get, set) {