Commit 5d08ed5c1c88d47ef0e8bef471c1d2ca9e18f687
1 parent
e13a0540
多次点击
Showing
6 changed files
with
22 additions
and
10 deletions
dist/gxb-ide/CodingEditer.js
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | pauseValue: [], |
| 14 | 14 | isRecordPage: 1, |
| 15 | 15 | flag: true, // 解决多次点击 |
| 16 | + pflag: true, | |
| 16 | 17 | isHanld: 1, |
| 17 | 18 | init: function(){ |
| 18 | 19 | console.log('CodingEditer'); |
| ... | ... | @@ -458,6 +459,7 @@ |
| 458 | 459 | if (CodingEditer.triggertotal === CodingEditer.records.length && !replay_type) { |
| 459 | 460 | CodingEditer.editable(0); |
| 460 | 461 | CodingEditer.flag = true |
| 462 | + CodingEditer.pflag = true | |
| 461 | 463 | |
| 462 | 464 | for (var i = 0; i < CodingEditer.records.length; i++) { |
| 463 | 465 | CodingEditer.records[i].trigger = 0; | ... | ... |
dist/js/player.js
| ... | ... | @@ -33,11 +33,11 @@ $(function(){ |
| 33 | 33 | |
| 34 | 34 | CodingEditer.isRecordPage = 0; |
| 35 | 35 | Dir.isReplayPage = true; |
| 36 | - | |
| 37 | 36 | $('.play-code').on('click', function(){ |
| 38 | - // alert('=================') | |
| 39 | - CodingEditer.playCoding(); | |
| 40 | - // CodingEditer.editable(0) | |
| 37 | + if (CodingEditer.pflag) { | |
| 38 | + CodingEditer.pflag = false; | |
| 39 | + CodingEditer.playCoding(); | |
| 40 | + } | |
| 41 | 41 | }) |
| 42 | 42 | |
| 43 | 43 | $('#play').unbind('click').click(function(){ | ... | ... |
dist/v1.1/player.html
| ... | ... | @@ -220,5 +220,15 @@ |
| 220 | 220 | <script src="../js/gbdebug/mode/clike/clike.js"></script> |
| 221 | 221 | <script src="../js/gbdebug/mode/php/php.js"></script> |
| 222 | 222 | <script src="../js/gbdebug/mode/python/python.js"></script> |
| 223 | + | |
| 224 | +<script> | |
| 225 | +$(function(){ | |
| 226 | + window.pauseAudio = function(){ | |
| 227 | + alert('999999') | |
| 228 | + $.AudioPlayer.pause(); | |
| 229 | + alert('00000') | |
| 230 | + } | |
| 231 | +}) | |
| 232 | +</script> | |
| 223 | 233 | </body> |
| 224 | 234 | </html> |
| 225 | 235 | \ No newline at end of file | ... | ... |
src/gxb-ide/CodingEditer.js
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | pauseValue: [], |
| 14 | 14 | isRecordPage: 1, |
| 15 | 15 | flag: true, // 解决多次点击 |
| 16 | + pflag: true, | |
| 16 | 17 | isHanld: 1, |
| 17 | 18 | init: function(){ |
| 18 | 19 | console.log('CodingEditer'); |
| ... | ... | @@ -458,6 +459,7 @@ |
| 458 | 459 | if (CodingEditer.triggertotal === CodingEditer.records.length && !replay_type) { |
| 459 | 460 | CodingEditer.editable(0); |
| 460 | 461 | CodingEditer.flag = true |
| 462 | + CodingEditer.pflag = true | |
| 461 | 463 | |
| 462 | 464 | for (var i = 0; i < CodingEditer.records.length; i++) { |
| 463 | 465 | CodingEditer.records[i].trigger = 0; | ... | ... |
src/js/player.js
| ... | ... | @@ -33,11 +33,11 @@ $(function(){ |
| 33 | 33 | |
| 34 | 34 | CodingEditer.isRecordPage = 0; |
| 35 | 35 | Dir.isReplayPage = true; |
| 36 | - | |
| 37 | 36 | $('.play-code').on('click', function(){ |
| 38 | - // alert('=================') | |
| 39 | - CodingEditer.playCoding(); | |
| 40 | - // CodingEditer.editable(0) | |
| 37 | + if (CodingEditer.pflag) { | |
| 38 | + CodingEditer.pflag = false; | |
| 39 | + CodingEditer.playCoding(); | |
| 40 | + } | |
| 41 | 41 | }) |
| 42 | 42 | |
| 43 | 43 | $('#play').unbind('click').click(function(){ | ... | ... |