resources.js
380 Bytes
const _ = require('lodash');
/**
* 处理楼层数据
* @param {[array]} list
* @return {[array]}
*/
module.exports = (list) => {
const formatData = [];
list = list || [];
_.forEach(list, (floor) => {
floor[_.camelCase(floor.template_name)] = true;
// 特殊资源位处理
formatData.push(floor);
});
return formatData;
};