|  |  | @ -4,7 +4,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @Github:  |  |  |  |  * @Github:  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @Date: 2019-11-27 13:42:11 |  |  |  |  * @Date: 2019-11-27 13:42:11 | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @LastEditors: tangjiang |  |  |  |  * @LastEditors: tangjiang | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @LastEditTime: 2019-11-29 11:11:13 |  |  |  |  * @LastEditTime: 2019-11-29 12:03:51 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | import types from "./actionTypes"; |  |  |  | import types from "./actionTypes"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { Base64 } from 'js-base64'; |  |  |  | import { Base64 } from 'js-base64'; | 
			
		
	
	
		
		
			
				
					|  |  | @ -90,7 +90,7 @@ export const debuggerCode = (identifier,value, type) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |      | 
			
		
	
		
		
			
				
					
					|  |  |  |     fetchDebuggerCode(identifier, value).then(res => { |  |  |  |     fetchDebuggerCode(identifier, value).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |       console.log('调用调试代码成功并返回结果: ', res); |  |  |  |       // console.log('调用调试代码成功并返回结果: ', res);
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       const { status } = res; |  |  |  |       const { status } = res; | 
			
		
	
		
		
			
				
					
					|  |  |  |       if (status === 200) { |  |  |  |       if (status === 200) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         // 调试代码成功后,调用轮循接口, 注意: 代码执行的时间要小于设置的时间限制
 |  |  |  |         // 调试代码成功后,调用轮循接口, 注意: 代码执行的时间要小于设置的时间限制
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -141,6 +141,12 @@ export const debuggerCode = (identifier,value, type) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 type: types.CHANGE_USER_CODE_TAB, |  |  |  |                 type: types.CHANGE_USER_CODE_TAB, | 
			
		
	
		
		
			
				
					
					|  |  |  |                 payload: 'record' |  |  |  |                 payload: 'record' | 
			
		
	
		
		
			
				
					
					|  |  |  |               }); |  |  |  |               }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               // 将按钮状态回滚
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               dispatch({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 type: types.SUBMIT_LOADING_STATUS, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 payload: false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               }); | 
			
		
	
		
		
			
				
					
					|  |  |  |               // 重新调用一下提交记录接口
 |  |  |  |               // 重新调用一下提交记录接口
 | 
			
		
	
		
		
			
				
					
					|  |  |  |               dispatch(getUserCommitRecord(identifier)); |  |  |  |               dispatch(getUserCommitRecord(identifier)); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
	
		
		
			
				
					|  |  | @ -153,6 +159,15 @@ export const debuggerCode = (identifier,value, type) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           getCodeSubmit(intervalTime, time_limit, count++, timer); |  |  |  |           getCodeSubmit(intervalTime, time_limit, count++, timer); | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, intervalTime); |  |  |  |         }, intervalTime); | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       dispatch({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         type: types.TEST_CODE_STATUS, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         payload: '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       dispatch({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         type: types.LOADING_STATUS, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         payload: false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |     }); |  |  |  |     }); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | @ -222,10 +237,20 @@ export const submitUserCode = (identifier, inputValue, type) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         flag: false |  |  |  |         flag: false | 
			
		
	
		
		
			
				
					
					|  |  |  |       }); |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |       fetchUserCodeSubmit(identifier).then(res => { |  |  |  |       fetchUserCodeSubmit(identifier).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         console.log('用户提交代码成功======》》》》》', res); |  |  |  |         // console.log('用户提交代码成功======》》》》》', res);
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         if (res.status === 200) { |  |  |  |         if (res.status === 200) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           dispatch(debuggerCode(identifier, inputValue, type || 'submit')); |  |  |  |           dispatch(debuggerCode(identifier, inputValue, type || 'submit')); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         dispatch({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           type: types.SUBMIT_LOADING_STATUS, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           payload: false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       dispatch({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         type: types.SUBMIT_LOADING_STATUS, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         payload: false | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }); |  |  |  |     }); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |