Commit b68d354ca0c639d68da5e5680a39a4839124f1f1

Authored by 商艳涛
1 parent 1cf334a8

修改本地部署api链接地址

src/gxb-ide/Iterm.js
@@ -173,8 +173,12 @@ @@ -173,8 +173,12 @@
173 console.log(compileData); 173 console.log(compileData);
174 174
175 var compileApiUrl = ''; 175 var compileApiUrl = '';
  176 + // TODO compile_api 未定义
  177 + if (!compile_api) {
  178 + var compile_api = "https://restful.gaoxiaobang.com";
  179 + }
176 if(autoScore && questionId) { 180 if(autoScore && questionId) {
177 - compileApiUrl = gxb_api + "/programming/exam/codeRun/" + questionId + "/api"; 181 + compileApiUrl = compile_api + "/programming/exam/codeRun/" + questionId + "/api";
178 compileData = { 182 compileData = {
179 userId: userId, 183 userId: userId,
180 languageId: languageId, 184 languageId: languageId,
@@ -182,7 +186,7 @@ @@ -182,7 +186,7 @@
182 }; 186 };
183 } 187 }
184 else { 188 else {
185 - compileApiUrl = gxb_api + "/gxb-web/programmingMulti/codeRun/api"; 189 + compileApiUrl = compile_api + "/gxb-web/programmingMulti/codeRun/api";
186 } 190 }
187 191
188 //编译运行的接口部分 192 //编译运行的接口部分
src/gxb-ide/ToolBox.js
@@ -261,12 +261,7 @@ @@ -261,12 +261,7 @@
261 } 261 }
262 if (_role == 0) { 262 if (_role == 0) {
263 postData.codeRecordList = codeRecordLists; 263 postData.codeRecordList = codeRecordLists;
264 - // TODO 不知道为何老师保存代码需要走这一步,  
265 - // compile_api 未定义  
266 - if (!compile_api) {  
267 - var compile_api = "https://restful.gaoxiaobang.com";  
268 - }  
269 - roleUrl = compile_api + "/programming/codeReplay/api" 264 + roleUrl = gxb_api + "/programming/codeReplay/api"
270 }else if (_role == 1) { 265 }else if (_role == 1) {
271 postData.studentRecordList = codeRecordLists; 266 postData.studentRecordList = codeRecordLists;
272 roleUrl = gxb_api + "/programming/student/studentReplay/api" 267 roleUrl = gxb_api + "/programming/student/studentReplay/api"
src/js/gb-fuben.js
@@ -1520,11 +1520,7 @@ $(function() { @@ -1520,11 +1520,7 @@ $(function() {
1520 } 1520 }
1521 if (_role == 0) { 1521 if (_role == 0) {
1522 postData.codeRecordList = codeRecordLists; 1522 postData.codeRecordList = codeRecordLists;
1523 - // TODO compile_api 未定义  
1524 - if (!compile_api) {  
1525 - var compile_api = "https://restful.gaoxiaobang.com";  
1526 - }  
1527 - var roleUrl = compile_api + "/programming/codeReplay/api" 1523 + var roleUrl = gxb_api + "/programming/codeReplay/api"
1528 }else if (_role == 1) { 1524 }else if (_role == 1) {
1529 postData.studentRecordList = codeRecordLists; 1525 postData.studentRecordList = codeRecordLists;
1530 var roleUrl = gxb_api + "/programming/student/studentReplay/api" 1526 var roleUrl = gxb_api + "/programming/student/studentReplay/api"
@@ -2503,6 +2499,7 @@ $(function() { @@ -2503,6 +2499,7 @@ $(function() {
2503 "fileList": fileList 2499 "fileList": fileList
2504 } 2500 }
2505 console.log(compileData); 2501 console.log(compileData);
  2502 + console.log('compile_api', compile_api);
2506 $.ajax({ 2503 $.ajax({
2507 type: "POST", 2504 type: "POST",
2508 url: gxb_api + "/gxb-web/programmingMulti/codeRun/api", 2505 url: gxb_api + "/gxb-web/programmingMulti/codeRun/api",
src/js/gb.js
@@ -1523,11 +1523,7 @@ $(function() { @@ -1523,11 +1523,7 @@ $(function() {
1523 } 1523 }
1524 if (_role == 0) { 1524 if (_role == 0) {
1525 postData.codeRecordList = codeRecordLists; 1525 postData.codeRecordList = codeRecordLists;
1526 - // TODO compile_api 未定义  
1527 - if (!compile_api) {  
1528 - var compile_api = "https://restful.gaoxiaobang.com";  
1529 - }  
1530 - var roleUrl = compile_api + "/programming/codeReplay/api" 1526 + var roleUrl = gxb_api + "/programming/codeReplay/api"
1531 }else if (_role == 1) { 1527 }else if (_role == 1) {
1532 postData.studentRecordList = codeRecordLists; 1528 postData.studentRecordList = codeRecordLists;
1533 var roleUrl = gxb_api + "/programming/student/studentReplay/api" 1529 var roleUrl = gxb_api + "/programming/student/studentReplay/api"
@@ -2465,6 +2461,7 @@ $(function() { @@ -2465,6 +2461,7 @@ $(function() {
2465 "fileList": fileList 2461 "fileList": fileList
2466 } 2462 }
2467 console.log(compileData); 2463 console.log(compileData);
  2464 + console.log('compile_api', compile_api);
2468 $.ajax({ 2465 $.ajax({
2469 type: "POST", 2466 type: "POST",
2470 url: gxb_api + "/gxb-web/programmingMulti/codeRun/api", 2467 url: gxb_api + "/gxb-web/programmingMulti/codeRun/api",
src/js/gbreplayer-fuben.js
@@ -909,13 +909,9 @@ $(function(){ @@ -909,13 +909,9 @@ $(function(){
909 replaydto.totaltime = parseInt(keepTimer); 909 replaydto.totaltime = parseInt(keepTimer);
910 if(_role == 0){ 910 if(_role == 0){
911 replaydto.codeRecordList = recorddatas; 911 replaydto.codeRecordList = recorddatas;
912 - // TODO compile_api 未定义  
913 - if (!compile_api) {  
914 - var compile_api = "https://restful.gaoxiaobang.com";  
915 - }  
916 $.ajax({ 912 $.ajax({
917 type: "post", 913 type: "post",
918 - url: compile_api + "/programming/codeReplay/api", 914 + url: gxb_api + "/programming/codeReplay/api",
919 data: JSON.stringify(replaydto), 915 data: JSON.stringify(replaydto),
920 dataType: "json", 916 dataType: "json",
921 contentType: "application/json", 917 contentType: "application/json",
src/js/gbreplayer.js
@@ -969,13 +969,9 @@ $(function(){ @@ -969,13 +969,9 @@ $(function(){
969 replaydto.totaltime = parseInt(keepTimer); 969 replaydto.totaltime = parseInt(keepTimer);
970 if(_role == 0){ 970 if(_role == 0){
971 replaydto.codeRecordList = recorddatas; 971 replaydto.codeRecordList = recorddatas;
972 - // TODO compile_api 未定义  
973 - if (!compile_api) {  
974 - var compile_api = "https://restful.gaoxiaobang.com";  
975 - }  
976 $.ajax({ 972 $.ajax({
977 type: "post", 973 type: "post",
978 - url: compile_api + "/programming/codeReplay/api", 974 + url: gxb_api + "/programming/codeReplay/api",
979 data: JSON.stringify(replaydto), 975 data: JSON.stringify(replaydto),
980 dataType: "json", 976 dataType: "json",
981 contentType: "application/json", 977 contentType: "application/json",
src/v1.1/index.html
@@ -20,7 +20,8 @@ @@ -20,7 +20,8 @@
20 <link rel="stylesheet" href="../js/ladda/ladda-themeless.min.css"> 20 <link rel="stylesheet" href="../js/ladda/ladda-themeless.min.css">
21 21
22 <script> 22 <script>
23 - var gxb_api = "https://restful.gaoxiaobang.com"; 23 + var compile_api = "https://restful.gaoxiaobang.com";
  24 + var gxb_api = "http://bdlab.cczu.edu.cn/study";
24 </script> 25 </script>
25 26
26 <style> 27 <style>
src/v1.1/player.html
@@ -23,7 +23,8 @@ @@ -23,7 +23,8 @@
23 <link rel="stylesheet" href="../css/loading.css"> 23 <link rel="stylesheet" href="../css/loading.css">
24 24
25 <script> 25 <script>
26 - var gxb_api = "https://restful.gaoxiaobang.com"; 26 + var compile_api = "https://restful.gaoxiaobang.com";
  27 + var gxb_api = "http://bdlab.cczu.edu.cn/study";
27 var vedio_url = "https://gxb-file.gaoxiaobang.com" 28 var vedio_url = "https://gxb-file.gaoxiaobang.com"
28 // var gxb_api = "http://192.168.80.223:8080" 29 // var gxb_api = "http://192.168.80.223:8080"
29 </script> 30 </script>