判断json数组是否为空
if(JSON.stringify(goods)!="{}" )
判断变量是否定义
if(typeof od.key!="undefined")
js浮点数parseFloat
js取整parseInt