Commit b68d354ca0c639d68da5e5680a39a4839124f1f1

Authored by 商艳涛
1 parent 1cf334a8

修改本地部署api链接地址

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