From 550692b031a1838e6f360a41bf6006809369b6fc Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 24 Jun 2019 11:19:47 +0800
Subject: [PATCH] cancel_appeal
---
public/react/src/AppConfig.js | 2 +-
.../courses/busyWork/CommonWorkItem.js | 2 +-
.../modules/courses/busyWork/commonWork.js | 2 +-
.../courses/common/comments/CCommentItem.js | 20 +++++++++++++++----
.../courses/coursesDetail/CoursesBanner.js | 2 +-
5 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 05a4463cd..6c4a20fa9 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net"
- // proxy="http://47.96.87.25:48080"
+ proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
// 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js
index 0a8f990a0..7f5bea2da 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js
@@ -127,7 +127,7 @@ class CommonWorkItem extends Component{
}
{
- mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
+ mainList && mainList.homeworks && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
let canNotLink = !isAdminOrStudent && item.private_icon == true
return(
diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js
index a23318097..b0b80d147 100644
--- a/public/react/src/modules/courses/busyWork/commonWork.js
+++ b/public/react/src/modules/courses/busyWork/commonWork.js
@@ -430,7 +430,7 @@ class commonWork extends Component{
{
- mainList && mainList.homeworks.length==0 &&
+ mainList && mainList.homeworks && mainList.homeworks.length==0 &&
}
{
diff --git a/public/react/src/modules/courses/common/comments/CCommentItem.js b/public/react/src/modules/courses/common/comments/CCommentItem.js
index d02c76f5d..45ebb364b 100644
--- a/public/react/src/modules/courses/common/comments/CCommentItem.js
+++ b/public/react/src/modules/courses/common/comments/CCommentItem.js
@@ -46,9 +46,9 @@ class CCommentItem extends Component{
let { item, commentIndex }=this.props;
const url = `/student_works/${studentWorkId}/cancel_appeal.json`
- axios.post(url, { data: {
+ axios.post(url, {
score_id: item.id
- }})
+ })
.then((response) => {
if (response.data.status == 0) {
this.showNotification('撤销成功')
@@ -262,9 +262,21 @@ class CCommentItem extends Component{
return(
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index 74a1cd6f2..eb208b5bf 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -358,7 +358,7 @@ class CoursesBanner extends Component {
{
coursedata===undefined || coursedata.status===401 || coursedata.status===407?"":
-
+
{coursedata.name}