Commit 93541dffa9f088a0b8899068e9aca05267817a23

Authored by ykxie
1 parent bcd4c7d8

add utile

src/js/gbreplayer.js
@@ -53,7 +53,7 @@ $(function(){ @@ -53,7 +53,7 @@ $(function(){
53 coderecordsData = coderecords; 53 coderecordsData = coderecords;
54 }else{ 54 }else{
55 // TODO 提示错误信息 55 // TODO 提示错误信息
56 - alert('错误') 56 + alert('错误')
57 } 57 }
58 }, 58 },
59 error: function(){ 59 error: function(){
@@ -422,7 +422,7 @@ $(function(){ @@ -422,7 +422,7 @@ $(function(){
422 selectLang(langid); 422 selectLang(langid);
423 compileMode(langid); 423 compileMode(langid);
424 console.log(coderecords); 424 console.log(coderecords);
425 - $("#play_audio").attr('src', "http://gxb-file.oss-cn-beijing.aliyuncs.com" + coderecords.audioUrl); 425 + // $("#play_audio").attr('src', "http://gxb-file.oss-cn-beijing.aliyuncs.com" + coderecords.audioUrl);
426 if (_languageid != 35) { 426 if (_languageid != 35) {
427 $('#cmprun-tabs').show(); 427 $('#cmprun-tabs').show();
428 } 428 }
src/player.html
@@ -319,6 +319,7 @@ @@ -319,6 +319,7 @@
319 <div class="tab-pane active padall15" id="stdin"> 319 <div class="tab-pane active padall15" id="stdin">
320 <input type="text" class="effect-2" id="input" placeholder="标准输入"> 320 <input type="text" class="effect-2" id="input" placeholder="标准输入">
321 <span class="focus-border"></span> 321 <span class="focus-border"></span>
  322 + <button class="btn playAudio">播放</button>
322 </div> 323 </div>
323 <div class="tab-pane padall15" id="cmpinfo"></div> 324 <div class="tab-pane padall15" id="cmpinfo"></div>
324 <div class="tab-pane padall15" id="stderr"></div> 325 <div class="tab-pane padall15" id="stderr"></div>
@@ -357,6 +358,13 @@ @@ -357,6 +358,13 @@
357 <script src="js/gbdebug/mode/clike/clike.js"></script> 358 <script src="js/gbdebug/mode/clike/clike.js"></script>
358 <script src="js/gbdebug/mode/php/php.js"></script> 359 <script src="js/gbdebug/mode/php/php.js"></script>
359 <script src="js/gbdebug/mode/python/python.js"></script> 360 <script src="js/gbdebug/mode/python/python.js"></script>
  361 +<script>
  362 + $(function(){
  363 + $('.playAudio').click(function(){
  364 + $('#audio-element')[0].play();
  365 + })
  366 + })
  367 +</script>
360 368
361 </body> 369 </body>
362 </html> 370 </html>