Commit 54995f02a36d65bc4b069bc7adb43678b9f46553

Authored by 商艳涛
1 parent dc912c63

修改本地部署api链接地址 暂时没时间仔细理逻辑,暂时修复一下

src/gxb-ide/ToolBox.js
@@ -261,6 +261,11 @@ @@ -261,6 +261,11 @@
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 + }
264 roleUrl = compile_api + "/programming/codeReplay/api" 269 roleUrl = compile_api + "/programming/codeReplay/api"
265 }else if (_role == 1) { 270 }else if (_role == 1) {
266 postData.studentRecordList = codeRecordLists; 271 postData.studentRecordList = codeRecordLists;
src/js/gb-fuben.js
@@ -1520,6 +1520,10 @@ $(function() { @@ -1520,6 +1520,10 @@ $(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 + }
1523 var roleUrl = compile_api + "/programming/codeReplay/api" 1527 var roleUrl = compile_api + "/programming/codeReplay/api"
1524 }else if (_role == 1) { 1528 }else if (_role == 1) {
1525 postData.studentRecordList = codeRecordLists; 1529 postData.studentRecordList = codeRecordLists;
src/js/gb.js
@@ -1523,6 +1523,10 @@ $(function() { @@ -1523,6 +1523,10 @@ $(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 + }
1526 var roleUrl = compile_api + "/programming/codeReplay/api" 1530 var roleUrl = compile_api + "/programming/codeReplay/api"
1527 }else if (_role == 1) { 1531 }else if (_role == 1) {
1528 postData.studentRecordList = codeRecordLists; 1532 postData.studentRecordList = codeRecordLists;
src/js/gbreplayer-fuben.js
@@ -909,6 +909,10 @@ $(function(){ @@ -909,6 +909,10 @@ $(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 + }
912 $.ajax({ 916 $.ajax({
913 type: "post", 917 type: "post",
914 url: compile_api + "/programming/codeReplay/api", 918 url: compile_api + "/programming/codeReplay/api",
src/js/gbreplayer.js
@@ -969,6 +969,10 @@ $(function(){ @@ -969,6 +969,10 @@ $(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 + }
972 $.ajax({ 976 $.ajax({
973 type: "post", 977 type: "post",
974 url: compile_api + "/programming/codeReplay/api", 978 url: compile_api + "/programming/codeReplay/api",