1. function heartbeat(){
    2. console.log("调用了");
    3. var status = true;
    4. DiGui = function (param) {
    5. $.ajax({
    6. url:'/start',
    7. type:"get",
    8. data: param,
    9. timeout:3000,
    10. headers:{"idd":imagesID },
    11. beforeSend:function(){
    12. console.log("正在获取数据...");
    13. },
    14. success: function (returnValue) {
    15. if (status) {
    16. status = false;
    17. window.setInterval("DiGui()", 3000);
    18. }
    19. }
    20. });
    21. }
    22. DiGui(imagesID)
    23. }