Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_cs_new
daiao 6 years ago
commit 66bdd23951

@ -20,16 +20,16 @@ let hashTimeout
// TODO 开发期多个身份切换
let debugType =""
if (isDev) {
const _search = window.location.search;
let parsed = {};
if (_search) {
parsed = queryString.parse(_search);
}
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' :
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// if (isDev) {
// const _search = window.location.search;
// let parsed = {};
// if (_search) {
// parsed = queryString.parse(_search);
// }
// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
// window.location.search.indexOf('debug=s') != -1 ? 'student' :
// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
// }
window._debugType = debugType;
export function initAxiosInterceptors(props) {

@ -75,10 +75,15 @@ class ShixunWorkReport extends Component {
let homeworkid=this.props.match.params.homeworkid;
let url = `/student_works/${homeworkid}/shixun_work_report.json`
axios.get(url).then((result) => {
if (result.data.status === 403||result.data.status === 401||result.data.status === 407||result.data.status === 408) {
}else{
this.setState({
data:result.data,
spinning:false
})
}
}).catch((error) => {
console.log(error)
this.setState({
@ -111,6 +116,8 @@ class ShixunWorkReport extends Component {
}
render() {
let{data} =this.state;
console.log(data)
console.log(this.props)
let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id;
let homeworkid=this.props.match.params.homeworkid;

@ -193,12 +193,20 @@ class DetailCards extends Component{
}
startgameid=(id)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => {

@ -326,6 +326,15 @@ class PathDetailIndex extends Component{
return(
<div className="newContainer">
<style>
{
`
.head-right{
line-height: 30px;
}
`
}
</style>
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}

@ -172,7 +172,17 @@ class TPMBanner extends Component {
* 发送至按钮
* */
Senttothe=()=>{
let id = this.props.match.params.shixunId;
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/search_user_courses.json";
this.setState({
Senttothetype:true
@ -384,6 +394,11 @@ class TPMBanner extends Component {
//开始实战按钮
startshixunCombat=(id, reset)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true

@ -220,6 +220,13 @@ class Challenges extends Component {
//开始实战按钮
startshixunCombat = (type, ids, id) => {
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
@ -227,7 +234,7 @@ class Challenges extends Component {
return
}
debugger
let { ChallengesDataList } = this.state;
// let id = this.props.match.params.shixunId;
this.setState({

Loading…
Cancel
Save