Authored by 邱骏

update

@@ -40,18 +40,12 @@ const PARAMMAP = { @@ -40,18 +40,12 @@ const PARAMMAP = {
40 tp: 'type' 40 tp: 'type'
41 }; 41 };
42 42
43 -const genderMap = {  
44 - 1: '1,3',  
45 - 2: '2,3'  
46 -};  
47 -  
48 /** 43 /**
49 * 解析 pathParams 获取标准参数 44 * 解析 pathParams 获取标准参数
50 */ 45 */
51 const getParams = (pathParams) => { 46 const getParams = (pathParams) => {
52 let params = {}; 47 let params = {};
53 48
54 - console.log(pathParams);  
55 pathParams = _.replace(pathParams, '.html', ''); 49 pathParams = _.replace(pathParams, '.html', '');
56 50
57 if (pathParams) { 51 if (pathParams) {
@@ -64,18 +58,12 @@ const getParams = (pathParams) => { @@ -64,18 +58,12 @@ const getParams = (pathParams) => {
64 .replace('__', '-') 58 .replace('__', '-')
65 .value(); 59 .value();
66 60
67 - if (keyRaw === 'gd') {  
68 - valueRaw = genderMap[valueRaw];  
69 - }  
70 -  
71 if (PARAMMAP[keyRaw]) { 61 if (PARAMMAP[keyRaw]) {
72 params[PARAMMAP[keyRaw]] = valueRaw; 62 params[PARAMMAP[keyRaw]] = valueRaw;
73 } 63 }
74 }); 64 });
75 } 65 }
76 66
77 - console.log(_.toPlainObject(params));  
78 -  
79 return _.toPlainObject(params); 67 return _.toPlainObject(params);
80 }; 68 };
81 69