Commit dbba4520f7c50735dc8b3a9a1b6a88522d9045eb

Authored by ykxie
1 parent 035681a2

删除log

Showing 1 changed file with 0 additions and 71 deletions
src/js/gbreplayer.js
@@ -371,7 +371,6 @@ $(function(){ @@ -371,7 +371,6 @@ $(function(){
371 type: "get", 371 type: "get",
372 url: apiUrl, 372 url: apiUrl,
373 success: function(coderecords) { 373 success: function(coderecords) {
374 - console.log(coderecords);  
375 var langid = parseInt(coderecords.languageid); 374 var langid = parseInt(coderecords.languageid);
376 selectLang(langid); 375 selectLang(langid);
377 compileMode(langid); 376 compileMode(langid);
@@ -386,15 +385,11 @@ $(function(){ @@ -386,15 +385,11 @@ $(function(){
386 ,debuggers: false 385 ,debuggers: false
387 ,allowSeek: false 386 ,allowSeek: false
388 ,playCallback: function(){ // 播放 387 ,playCallback: function(){ // 播放
389 - console.log(GBCodePlayBack.pauseValue)  
390 -  
391 if (GBCodePlayBack.firstPlay == 0) { 388 if (GBCodePlayBack.firstPlay == 0) {
392 $('#readonly').trigger('click'); 389 $('#readonly').trigger('click');
393 GBCodePlayBack.htmlplayereditor.setValue(GBCodePlayBack.pauseValue) 390 GBCodePlayBack.htmlplayereditor.setValue(GBCodePlayBack.pauseValue)
394 - console.log('GBCodePlayBack.firstPlay--------' + GBCodePlayBack.firstPlay);  
395 }else{ 391 }else{
396 GBCodePlayBack.htmlplayereditor.setValue('') 392 GBCodePlayBack.htmlplayereditor.setValue('')
397 - console.log('GBCodePlayBack.firstPlay--------' + GBCodePlayBack.firstPlay);  
398 var resultData = { 393 var resultData = {
399 output: '', 394 output: '',
400 stderr: '', 395 stderr: '',
@@ -476,7 +471,6 @@ $(function(){ @@ -476,7 +471,6 @@ $(function(){
476 $('#play').find('i').removeClass('icon-play').addClass('icon-playcopy').attr('data-original-title', '暂停'); 471 $('#play').find('i').removeClass('icon-play').addClass('icon-playcopy').attr('data-original-title', '暂停');
477 } 472 }
478 } 473 }
479 - console.log(GBCodePlayBack.records);  
480 if(!playstatus){ 474 if(!playstatus){
481 var playbackrecord = GBCodePlayBack.records, 475 var playbackrecord = GBCodePlayBack.records,
482 currenteditor = ''; 476 currenteditor = '';
@@ -497,12 +491,10 @@ $(function(){ @@ -497,12 +491,10 @@ $(function(){
497 if (tag === 1) { 491 if (tag === 1) {
498 GBCodePlayBack.stopIntervalTime = playbackrecord[0].intervaltime - (GBCodePlayBack.pauseData - GBCodePlayBack.playRecordStart); 492 GBCodePlayBack.stopIntervalTime = playbackrecord[0].intervaltime - (GBCodePlayBack.pauseData - GBCodePlayBack.playRecordStart);
499 starttime = GBCodePlayBack.stopIntervalTime; 493 starttime = GBCodePlayBack.stopIntervalTime;
500 - console.log('+++++++++++++++++++++++++++' + starttime);  
501 tag++; 494 tag++;
502 }else{ 495 }else{
503 GBCodePlayBack.stopIntervalTime = GBCodePlayBack.stopIntervalTime - (GBCodePlayBack.pauseData - GBCodePlayBack.playRecordStart); 496 GBCodePlayBack.stopIntervalTime = GBCodePlayBack.stopIntervalTime - (GBCodePlayBack.pauseData - GBCodePlayBack.playRecordStart);
504 starttime = GBCodePlayBack.stopIntervalTime; 497 starttime = GBCodePlayBack.stopIntervalTime;
505 - console.log('&&&&&&&&&&&&&&&&&&&&&&&&&&' + starttime);  
506 } 498 }
507 } 499 }
508 500
@@ -581,7 +573,6 @@ $(function(){ @@ -581,7 +573,6 @@ $(function(){
581 573
582 playbtn.data('status', 0); 574 playbtn.data('status', 0);
583 $('#play').trigger('click'); 575 $('#play').trigger('click');
584 - console.log('--------------=============')  
585 }); 576 });
586 577
587 //setting speed in cookie 578 //setting speed in cookie
@@ -636,7 +627,6 @@ $(function(){ @@ -636,7 +627,6 @@ $(function(){
636 627
637 //播放代码回放 628 //播放代码回放
638 $('#playrecord').unbind('click').click(function(){ 629 $('#playrecord').unbind('click').click(function(){
639 - console.log("---------------------")  
640 // 根据不同的角色请求不同的接口播放 630 // 根据不同的角色请求不同的接口播放
641 $('#playrecord').hide(); 631 $('#playrecord').hide();
642 $('#play').show(); 632 $('#play').show();
@@ -650,7 +640,6 @@ $(function(){ @@ -650,7 +640,6 @@ $(function(){
650 type: "get", 640 type: "get",
651 url: apiUrl, 641 url: apiUrl,
652 success: function(coderecords) { 642 success: function(coderecords) {
653 - console.log(coderecords);  
654 $("#play_audio").attr('src', "http://gxb-file.oss-cn-beijing.aliyuncs.com/" + coderecords.audioUrl); 643 $("#play_audio").attr('src', "http://gxb-file.oss-cn-beijing.aliyuncs.com/" + coderecords.audioUrl);
655 if (_role == 0) { 644 if (_role == 0) {
656 var coderecords = coderecords.codeRecordList; 645 var coderecords = coderecords.codeRecordList;
@@ -934,7 +923,6 @@ $(function(){ @@ -934,7 +923,6 @@ $(function(){
934 923
935 var keepTimer = $('.recording-time').val() 924 var keepTimer = $('.recording-time').val()
936 replaydto.totaltime = parseInt(keepTimer); 925 replaydto.totaltime = parseInt(keepTimer);
937 - console.log(replaydto);  
938 if(_role == 0){ 926 if(_role == 0){
939 replaydto.codeRecordList = recorddatas; 927 replaydto.codeRecordList = recorddatas;
940 $.ajax({ 928 $.ajax({
@@ -944,8 +932,6 @@ $(function(){ @@ -944,8 +932,6 @@ $(function(){
944 dataType: "json", 932 dataType: "json",
945 contentType: "application/json", 933 contentType: "application/json",
946 success: function(data){ 934 success: function(data){
947 - console.log('-------------------');  
948 - console.log(data);  
949 $(window).unbind('beforeunload'); 935 $(window).unbind('beforeunload');
950 var _data = { 936 var _data = {
951 "programId": data.codeReplayId, 937 "programId": data.codeReplayId,
@@ -973,8 +959,6 @@ $(function(){ @@ -973,8 +959,6 @@ $(function(){
973 dataType: "json", 959 dataType: "json",
974 contentType: "application/json", 960 contentType: "application/json",
975 success: function(data) { 961 success: function(data) {
976 - console.log('++++++++++++++++++++++++');  
977 - console.log(data)  
978 $(window).unbind('beforeunload'); 962 $(window).unbind('beforeunload');
979 var _data = { 963 var _data = {
980 "programId": data.studentReplayId, 964 "programId": data.studentReplayId,
@@ -1050,7 +1034,6 @@ $(function(){ @@ -1050,7 +1034,6 @@ $(function(){
1050 1034
1051 // 暂停录制 1035 // 暂停录制
1052 var pauseState = $('#pause').data('pause'); 1036 var pauseState = $('#pause').data('pause');
1053 - console.log('------------' + pauseState + '----------------');  
1054 if(pauseState == 1 && _role == 0){ 1037 if(pauseState == 1 && _role == 0){
1055 GBCodePlayBack.record_pause_time = new Date().getTime(); // 暂停的时间 1038 GBCodePlayBack.record_pause_time = new Date().getTime(); // 暂停的时间
1056 1039
@@ -1085,7 +1068,6 @@ $(function(){ @@ -1085,7 +1068,6 @@ $(function(){
1085 dataType: "json", 1068 dataType: "json",
1086 contentType: "application/json", 1069 contentType: "application/json",
1087 success: function(data) { 1070 success: function(data) {
1088 - console.log(data)  
1089 compileResult(data) 1071 compileResult(data)
1090 l.stop(); 1072 l.stop();
1091 1073
@@ -1113,7 +1095,6 @@ $(function(){ @@ -1113,7 +1095,6 @@ $(function(){
1113 GBCodePlayBack.records[length].cmpinfo = GBCodePlayBack.compileResultData.cmpinfo; 1095 GBCodePlayBack.records[length].cmpinfo = GBCodePlayBack.compileResultData.cmpinfo;
1114 GBCodePlayBack.records[length].result = GBCodePlayBack.compileResultData.result; 1096 GBCodePlayBack.records[length].result = GBCodePlayBack.compileResultData.result;
1115 1097
1116 - console.log(GBCodePlayBack.records);  
1117 GBCodePlayBack.record_continue_time = new Date().getTime(); 1098 GBCodePlayBack.record_continue_time = new Date().getTime();
1118 1099
1119 contrlPause() 1100 contrlPause()
@@ -1395,15 +1376,9 @@ $(function(){ @@ -1395,15 +1376,9 @@ $(function(){
1395 1376
1396 var pausetatus = $('#pause').data('status'); 1377 var pausetatus = $('#pause').data('status');
1397 1378
1398 - console.log(pausetatus);  
1399 -  
1400 if(_role == 0 && pausetatus == 1){ 1379 if(_role == 0 && pausetatus == 1){
1401 -  
1402 intervaltime = (currenttime - GBCodePlayBack.record_continue_time) + (GBCodePlayBack.record_pause_time - GBCodePlayBack.record_startime); 1380 intervaltime = (currenttime - GBCodePlayBack.record_continue_time) + (GBCodePlayBack.record_pause_time - GBCodePlayBack.record_startime);
1403 -  
1404 $('#pause').data('status', '0'); 1381 $('#pause').data('status', '0');
1405 -  
1406 - console.log('--------------开始录制代码===================')  
1407 } 1382 }
1408 1383
1409 1384
@@ -1414,7 +1389,6 @@ $(function(){ @@ -1414,7 +1389,6 @@ $(function(){
1414 trigger: 0, 1389 trigger: 0,
1415 playTime: 0 1390 playTime: 0
1416 }; 1391 };
1417 - console.log(GBCodePlayBack.records)  
1418 GBCodePlayBack.records.push(recordobj); 1392 GBCodePlayBack.records.push(recordobj);
1419 GBCodePlayBack.record_startime = currenttime; //设定起始时间 1393 GBCodePlayBack.record_startime = currenttime; //设定起始时间
1420 1394
@@ -1452,8 +1426,6 @@ $(function(){ @@ -1452,8 +1426,6 @@ $(function(){
1452 compileResult(resultData); 1426 compileResult(resultData);
1453 } 1427 }
1454 1428
1455 - console.log(record);  
1456 -  
1457 if(replay_type){ 1429 if(replay_type){
1458 GBCodePlayBack.excercise_triggertotal += 1; 1430 GBCodePlayBack.excercise_triggertotal += 1;
1459 }else{ 1431 }else{
@@ -1594,8 +1566,6 @@ $(function(){ @@ -1594,8 +1566,6 @@ $(function(){
1594 $("#re-recoding").show(); 1566 $("#re-recoding").show();
1595 $("#start-recording").hide(); 1567 $("#start-recording").hide();
1596 $("#countdown").find('img').attr('src', ''); 1568 $("#countdown").find('img').attr('src', '');
1597 -  
1598 - console.log()  
1599 stopReacoder(); 1569 stopReacoder();
1600 } 1570 }
1601 }) 1571 })
@@ -1670,45 +1640,10 @@ $(function(){ @@ -1670,45 +1640,10 @@ $(function(){
1670 1640
1671 1641
1672 1642
1673 - // 播放页面-结束播放事件  
1674 - // if (document.URL.indexOf('player.html') >= 0) {  
1675 - // var play_audio = document.getElementById('play_audio');  
1676 - // play_audio.addEventListener("ended", function() {  
1677 - // console.log(GBCodePlayBack.records)  
1678 - // console.log('结束播放')  
1679 - // $('#play').hide();  
1680 - // $('#playrecord').show();  
1681 - // if (_role == 0) {  
1682 - // $.ajax({  
1683 - // type: "PUT",  
1684 - // url: gxb_api + "/programming/learn/chapter/" + _chapterId + "/user/" + _userId,  
1685 - // success: function(data){  
1686 - // },  
1687 - // error: function(){  
1688 - // console.log('')  
1689 - // }  
1690 - // });  
1691 - // }  
1692 -  
1693 - // GBCodePlayBack.triggertotal = 0;  
1694 -  
1695 - // /* 初始化播放 */  
1696 - // for (var i = 0; i < GBCodePlayBack.records.length; i++) {  
1697 - // GBCodePlayBack.records[i].trigger = 0;  
1698 - // }  
1699 -  
1700 - // for (var i = 0; i < GBCodePlayBack.recordtimeoutcontrolls.length; i++) {  
1701 - // clearTimeout(GBCodePlayBack.recordtimeoutcontrolls[i]);  
1702 - // }  
1703 -  
1704 - // }, false);  
1705 - // }  
1706 -  
1707 1643
1708 // 开始录制 1644 // 开始录制
1709 function startReacoder(){ 1645 function startReacoder(){
1710 HZRecorder.get(function(rec) { 1646 HZRecorder.get(function(rec) {
1711 - console.log('+++++++++++++++++++')  
1712 recorder = rec; 1647 recorder = rec;
1713 recorder.start(); 1648 recorder.start();
1714 1649
@@ -1803,7 +1738,6 @@ $(function(){ @@ -1803,7 +1738,6 @@ $(function(){
1803 $('#recordertab a:eq(1)').tab('show'); 1738 $('#recordertab a:eq(1)').tab('show');
1804 1739
1805 var playstatus = $('#play').data('status'); 1740 var playstatus = $('#play').data('status');
1806 - console.log(playstatus)  
1807 if (!playstatus) { 1741 if (!playstatus) {
1808 var playbackrecord = GBCodePlayBack.records; 1742 var playbackrecord = GBCodePlayBack.records;
1809 var starttime = playbackrecord[0].intervaltime; 1743 var starttime = playbackrecord[0].intervaltime;
@@ -1836,7 +1770,6 @@ $(function(){ @@ -1836,7 +1770,6 @@ $(function(){
1836 } 1770 }
1837 timeoutcontroller = setTimeout(GBCodePlayBack.changeValueCallback(playbackrecord[i]), starttime); 1771 timeoutcontroller = setTimeout(GBCodePlayBack.changeValueCallback(playbackrecord[i]), starttime);
1838 GBCodePlayBack.recordtimeoutcontrolls.push(timeoutcontroller); 1772 GBCodePlayBack.recordtimeoutcontrolls.push(timeoutcontroller);
1839 - console.log(GBCodePlayBack.recordtimeoutcontrolls);  
1840 } 1773 }
1841 } 1774 }
1842 // 记录播放的时间 1775 // 记录播放的时间
@@ -1979,10 +1912,8 @@ $(function(){ @@ -1979,10 +1912,8 @@ $(function(){
1979 type: "PUT", 1912 type: "PUT",
1980 url: gxb_api + "/programming/learn/chapter/" + _chapterId + "/user/" + _userId, 1913 url: gxb_api + "/programming/learn/chapter/" + _chapterId + "/user/" + _userId,
1981 success: function(data){ 1914 success: function(data){
1982 - console.log(data);  
1983 }, 1915 },
1984 error: function(data){ 1916 error: function(data){
1985 - console.log('播放结束错误');  
1986 } 1917 }
1987 }); 1918 });
1988 } 1919 }
@@ -2002,7 +1933,6 @@ $(function(){ @@ -2002,7 +1933,6 @@ $(function(){
2002 GBCodePlayBack.pauseTime = null; 1933 GBCodePlayBack.pauseTime = null;
2003 GBCodePlayBack.playRecordStart = null; 1934 GBCodePlayBack.playRecordStart = null;
2004 1935
2005 - console.log(GBCodePlayBack.records)  
2006 if($('#readonly').length>0){ 1936 if($('#readonly').length>0){
2007 setTimeout(function(){$('#readonly').popover({html:true, placement:'right', container: 'body', content:''}).popover('show');}, 2000); 1937 setTimeout(function(){$('#readonly').popover({html:true, placement:'right', container: 'body', content:''}).popover('show');}, 2000);
2008 1938
@@ -2020,7 +1950,6 @@ $(function(){ @@ -2020,7 +1950,6 @@ $(function(){
2020 $('#readonly').trigger('click'); 1950 $('#readonly').trigger('click');
2021 } else { 1951 } else {
2022 $('#readonly').trigger('click'); 1952 $('#readonly').trigger('click');
2023 - console.log('iOS 几分')  
2024 } 1953 }
2025 1954
2026 } 1955 }