Authored by 邱骏

update

... ... @@ -40,18 +40,12 @@ const PARAMMAP = {
tp: 'type'
};
const genderMap = {
1: '1,3',
2: '2,3'
};
/**
* 解析 pathParams 获取标准参数
*/
const getParams = (pathParams) => {
let params = {};
console.log(pathParams);
pathParams = _.replace(pathParams, '.html', '');
if (pathParams) {
... ... @@ -64,18 +58,12 @@ const getParams = (pathParams) => {
.replace('__', '-')
.value();
if (keyRaw === 'gd') {
valueRaw = genderMap[valueRaw];
}
if (PARAMMAP[keyRaw]) {
params[PARAMMAP[keyRaw]] = valueRaw;
}
});
}
console.log(_.toPlainObject(params));
return _.toPlainObject(params);
};
... ...