From c414beaa5b465c6d6b96e05151708733ef79a5e5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 6 Aug 2019 10:33:50 +0800 Subject: [PATCH] https://www.trustie.net/issues/22810 --- .../courses/coursesPublic/Startshixuntask.js | 35 +++++++++++++++---- .../courses/shixunHomework/CommitSummary.js | 3 +- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index d146b5ef4..4075eff03 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { WordsBtn } from 'educoder'; +import { WordsBtn, getTaskUrlById } from 'educoder'; import {Tooltip,message,Modal,Spin} from 'antd'; import {Link} from 'react-router-dom'; import axios from 'axios'; @@ -44,6 +44,11 @@ class Startshixuntask extends Component{ startbtn:false }) }else{ + setTimeout(() => { + this.setState({ + startbtn: false, + }) + }, 1000) if(response.data.status!=401&&response.data.status!=403){ const w=window.open('about:blank'); @@ -156,13 +161,31 @@ class Startshixuntask extends Component{ {/*知道了*/} {/*
*/} - + + {/* 如果是继续实战和查看实战,实训作业这边,后台会直接返回identity,直接写成a标签 */} {this.props.isStudent? - {this.props.data&&this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?this.taskoperationId( this.props.data&&this.props.data.task_operation[1])}> - {this.props.data&&this.props.data.task_operation[0]} - :"开启中":""} - :"" + {this.props.data&&this.props.data.task_operation&&this.props.data.task_operation?startbtn===false + ? + ((this.props.data && this.props.data.task_operation[1] && this.props.data.task_operation[1].indexOf('/') == -1) ? + + {this.props.data.task_operation[0]} + + : + this.taskoperationId( this.props.data&&this.props.data.task_operation[1])}> + {this.props.data&&this.props.data.task_operation[0]} + ) + :"开启中":""} + + :"" } diff --git a/public/react/src/modules/courses/shixunHomework/CommitSummary.js b/public/react/src/modules/courses/shixunHomework/CommitSummary.js index 728d86f96..db6180a5c 100644 --- a/public/react/src/modules/courses/shixunHomework/CommitSummary.js +++ b/public/react/src/modules/courses/shixunHomework/CommitSummary.js @@ -133,7 +133,8 @@ class CommitSummary extends Component{this.gotohome()}>{data === undefined ? "" :data.course_name===undefined?"": data.course_name} > - {data === undefined ? "" :data.category===undefined?"":data.category.category_name} > 作业详情