function indexOf(arr, value) { if (arr.indexOf(value) < 0) { return false; } else { return true; } } function hasBtnWhiteList(whiteList){ if(whiteList&&whiteList.split(',').length>0){ return true }else{ return false } } function toFix(num,decimal){ if(num===0){ return 0 }else{ return num.toFixed(decimal?decimal:1) } } function dateFormat(now,timestamp){ var day = 60*60*24; var offset = now-timestamp if(offsetday*7&&offsetday*30&&offsetday*60&&offsetday*90&&offsetday*180&&offset