From c3da446b5404a058dacee1e7e007c61dd6558208 Mon Sep 17 00:00:00 2001 From: lh_wang Date: Fri, 21 Aug 2015 16:11:39 +0800 Subject: [PATCH] add new menu --- catapp/index.html | 6 +++--- catapp/js/main.js | 15 ++++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/catapp/index.html b/catapp/index.html index 3bdc68a..ab08c94 100644 --- a/catapp/index.html +++ b/catapp/index.html @@ -82,7 +82,7 @@
2
- Event监控 + 业务大盘
  • @@ -238,7 +238,7 @@
  • - Event监控 + 业务大盘
  • @@ -246,7 +246,7 @@
  • - Matraix监控 + 网络大盘
  • diff --git a/catapp/js/main.js b/catapp/js/main.js index 5fe2c28..5b6788f 100644 --- a/catapp/js/main.js +++ b/catapp/js/main.js @@ -488,14 +488,19 @@ function clearNotice(){ } } +var playHandle; function autoPlay(){ - console.log("autoPlay") - var myAuto = document.getElementById('myaudio'); - myAuto.play(); - setTimeout(function(){ - myAuto.pause(); + console.log("autoPlay"); + playHandle &&(clearTimeout(playHandle), playHandle=null); + playHandle = setTimeout(function(){ + var myAuto = document.getElementById('myaudio'); + myAuto.play(); + setTimeout(function(){ + myAuto.pause(); + }, 1000); }, 1000); + }