|
|
|
|
|
var $ = require('jquery');
|
|
|
var jsonUtils={
|
|
|
formSerializeArrayKey:{
|
|
|
name:"name",
|
...
|
...
|
@@ -8,12 +9,16 @@ var jsonUtils={ |
|
|
var _g=this;
|
|
|
var result={};
|
|
|
var one_form_data= _params.data;
|
|
|
|
|
|
var _value;
|
|
|
for(var key in one_form_data){
|
|
|
result[one_form_data[key][_g.formSerializeArrayKey.name]]=one_form_data[key][_g.formSerializeArrayKey.value];
|
|
|
_value=one_form_data[key][_g.formSerializeArrayKey.value];
|
|
|
if(typeof(_value)==="string"){
|
|
|
_value=$.trim(_value);
|
|
|
}
|
|
|
result[one_form_data[key][_g.formSerializeArrayKey.name]]=_value;
|
|
|
}
|
|
|
return result;
|
|
|
},
|
|
|
}
|
|
|
};
|
|
|
|
|
|
module.exports = jsonUtils; |
|
|
\ No newline at end of file |
...
|
...
|
|