Authored by 陶雨

grid接口添加默认值

... ... @@ -11,7 +11,7 @@ module.exports={
url: '/activity/querySpecialActivityPage',
params: [
{name: 'page', type: 'number'},
{name: 'size', type: 'number'},
{name: 'size', type: 'number',default:10},
{name: 'sort', type: 'string'},
{name: 'title', type: 'string'},
{name: 'plateform', type: 'string'},
... ...
... ... @@ -155,6 +155,9 @@ function __requestOption(req, apiOpt, config, consts) {
//兼容 yo之前的模式 后期废弃
apiOpt.params.forEach(function (param) {
var name = param.name;
if (param.default) {
data[name] = param.default;
}
if (req.param(name)) {
if (param.type.toUpperCase() == "NUMBER") {
data[name] = Number(req.param(name));
... ...