猎豆优选官网

homeJson.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. function getTime (time){
  2. var date = new Date();
  3. date.setHours(time);
  4. date.setMinutes(time);
  5. date.setSeconds(time);
  6. date.setMilliseconds(time);
  7. return Date.parse(date).toString().substr(0,10)
  8. }
  9. //function getTimeTwo (time){
  10. // var date = new Date();
  11. // date.setHours(time);
  12. // date.setMinutes(time);
  13. // date.setSeconds(time);
  14. // date.setMilliseconds(time);
  15. //// return date.getTime()
  16. // return Date.parse(date).toString().substr(0,10)
  17. //}
  18. //var now = new Date(parseInt(1530720000) * 1000).toLocaleString().replace(/:\d{1,2}$/,' ');
  19. //console.log(Number(getTime(0))+22*3600-Number(getTime(0))+20*3600)
  20. var activityTime = [
  21. {
  22. "time": "00 : 00",
  23. "timeStamp": Number(getTime(0))
  24. },
  25. {
  26. "time": "08 : 00",
  27. "timeStamp": Number(getTime(0))+8*3600
  28. },
  29. {
  30. "time": "10 : 00",
  31. "timeStamp": Number(getTime(0))+10*3600
  32. },
  33. {
  34. "time": "12 : 00",
  35. "timeStamp": Number(getTime(0))+12*3600
  36. },
  37. {
  38. "time": "14 : 00",
  39. "timeStamp": Number(getTime(0))+14*3600
  40. },
  41. {
  42. "time": "16 : 00",
  43. "timeStamp": Number(getTime(0))+16*3600
  44. },
  45. {
  46. "time": "18 : 00",
  47. "timeStamp": Number(getTime(0))+18*3600
  48. },
  49. {
  50. "time": "20 : 00",
  51. "timeStamp": Number(getTime(0))+20*3600
  52. },
  53. {
  54. "time": "22 : 00",
  55. "timeStamp": Number(getTime(0))+22*3600
  56. }
  57. ];
  58. var time_24 = Number(getTime(0))+24*3600