From 645003f34a811ef8c8b7a0ada991cd7827402ffa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 14 Oct 2019 15:19:32 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B5=8F=E8=A7=88?=
=?UTF-8?q?=E5=99=A8=E5=A4=B4=E9=83=A8=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/config/webpack.config.dev.js | 2 +-
public/react/public/index.html | 4 +++-
.../src/modules/courses/coursesDetail/CoursesBanner.js | 1 +
public/react/src/modules/courses/coursesHome/CoursesHome.js | 1 +
public/react/src/modules/forums/MemoDetail.js | 3 ++-
public/react/src/modules/forums/MemoNew.js | 6 +++++-
public/react/src/modules/moop_cases/CaseDetail.js | 1 +
public/react/src/modules/moop_cases/CaseList.js | 1 +
public/react/src/modules/moop_cases/CaseNew.js | 5 ++++-
public/react/src/modules/moop_cases/index.js | 3 ++-
.../react/src/modules/paths/PathDetail/PathDetailIndex.js | 2 ++
public/react/src/modules/paths/ShixunPathSearch.js | 1 +
12 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js
index fe525154f..ef38a18f8 100644
--- a/public/react/config/webpack.config.dev.js
+++ b/public/react/config/webpack.config.dev.js
@@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map",
// 开启调试
- devtool: "source-map", // 开启调试
+ //devtool: "source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
diff --git a/public/react/public/index.html b/public/react/public/index.html
index 321fbe0e5..f6eef196a 100755
--- a/public/react/public/index.html
+++ b/public/react/public/index.html
@@ -8,7 +8,9 @@
-
+
+
+
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index ce891bced..0168d3e27 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -481,6 +481,7 @@ class CoursesBanner extends Component {
render() {
let { Addcoursestypes, coursedata,excellent, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide,AccountProfiletype} = this.state;
const isCourseEnd = this.props.isCourseEnd()
+ document.title=coursedata===undefined || coursedata.status===401 || coursedata.status===407?"":coursedata.name;
return (
{
diff --git a/public/react/src/modules/courses/coursesHome/CoursesHome.js b/public/react/src/modules/courses/coursesHome/CoursesHome.js
index 2cf7aca90..d147a6d93 100644
--- a/public/react/src/modules/courses/coursesHome/CoursesHome.js
+++ b/public/react/src/modules/courses/coursesHome/CoursesHome.js
@@ -53,6 +53,7 @@ class CoursesHome extends Component{
}
componentDidMount(){
+ document.title="翻转课堂";
const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;
diff --git a/public/react/src/modules/forums/MemoDetail.js b/public/react/src/modules/forums/MemoDetail.js
index d3007c433..cc206713b 100644
--- a/public/react/src/modules/forums/MemoDetail.js
+++ b/public/react/src/modules/forums/MemoDetail.js
@@ -27,6 +27,7 @@ import { Tooltip } from 'antd'
// import CBreadcrumb from '../courses/common/CBreadcrumb'
import { typeNameMap2 } from './MemoNew'
+import CaseDetail from "../moop_cases/CaseDetail";
const $ = window.$
function urlStringify(params) {
let noParams = true;
@@ -673,7 +674,7 @@ class MemoDetail extends Component {
const { match, history } = this.props
const { memo, recommend_shixun, current_user,author_info } = this.props;
const { comments, hasMoreComments, goldRewardDialogOpen } = this.state;
-
+ document.title = memo&&memo.subject!=undefined?memo&&memo.subject:"交流问答";
if (!memo || this.state.memoLoading) {
return
}
diff --git a/public/react/src/modules/forums/MemoNew.js b/public/react/src/modules/forums/MemoNew.js
index 962e74f22..fbbd88044 100644
--- a/public/react/src/modules/forums/MemoNew.js
+++ b/public/react/src/modules/forums/MemoNew.js
@@ -18,6 +18,7 @@ import 'antd/lib/select/style/index.css'
import TPMMDEditor from '../tpm/challengesnew/TPMMDEditor'
import { getUrl, getUploadActionUrl, appendFileSizeToUploadFileAll, appendFileSizeToUploadFile } from 'educoder'
+import CaseDetail from "../moop_cases/CaseDetail";
const Option = Select.Option;
const $ = window.$;
@@ -316,7 +317,8 @@ class MemoNew extends Component {
const repertoires = [];
const repertoiresTagMap = {}
if ( data.tag_list ) {
- // data.tag_list.forEach((item, index)=>{
+ document.title = "交流问答";
+ // data.tag_list.forEach((item, index)=>{
// const tagArray = [];
// item.tag.forEach( (tag, index) => {
// tagArray.push(tag.name)
@@ -362,6 +364,8 @@ class MemoNew extends Component {
const tag_list = response.data.tag_list
if (tag_list) {
// this.setState({...response.data})
+
+ document.title = response.data.subject;
const { content, forum_id, id, repertoire_name, subject,
current_user, tag_list, attachments_url, memo_tags, attachments } = response.data;
this.initMD(content);
diff --git a/public/react/src/modules/moop_cases/CaseDetail.js b/public/react/src/modules/moop_cases/CaseDetail.js
index e99f6bab0..20e57f3e9 100644
--- a/public/react/src/modules/moop_cases/CaseDetail.js
+++ b/public/react/src/modules/moop_cases/CaseDetail.js
@@ -65,6 +65,7 @@ class CaseDetail extends Component{
modalsTopval,
modalsBottomval,
} = this.state;
+ document.title = CaseDetail&&CaseDetail.title!=undefined?CaseDetail&&CaseDetail.title:"教学案例";
return(
{
diff --git a/public/react/src/modules/moop_cases/CaseList.js b/public/react/src/modules/moop_cases/CaseList.js
index 626b06eb8..b4fdfddd0 100644
--- a/public/react/src/modules/moop_cases/CaseList.js
+++ b/public/react/src/modules/moop_cases/CaseList.js
@@ -31,6 +31,7 @@ class CaseList extends Component{
}
componentDidMount = () =>{
+ window.document.title = '教学案例'
let { type , search , page , pageSize } = this.state;
this.InitList(type,search,page,pageSize);
}
diff --git a/public/react/src/modules/moop_cases/CaseNew.js b/public/react/src/modules/moop_cases/CaseNew.js
index 925536a1a..ce322252a 100644
--- a/public/react/src/modules/moop_cases/CaseNew.js
+++ b/public/react/src/modules/moop_cases/CaseNew.js
@@ -130,9 +130,12 @@ class CaseNew extends Component{
// 编辑时加载数据
componentDidMount=()=>{
+
if(this.props.match.params.caseID){
this.InitEditData();
- }
+ }else{
+ window.document.title = '教学案例'
+ }
let url=`/library_tags.json`;
axios.get(url).then((result) => {
console.log(result)
diff --git a/public/react/src/modules/moop_cases/index.js b/public/react/src/modules/moop_cases/index.js
index 7134b66bf..8ac4aa33f 100644
--- a/public/react/src/modules/moop_cases/index.js
+++ b/public/react/src/modules/moop_cases/index.js
@@ -47,7 +47,7 @@ class Index extends Component{
}
}
componentDidMount(){
- window.document.title = '教学案例'
+
}
// 获取案例详情
getDetail = (caseID) =>{
@@ -64,6 +64,7 @@ class Index extends Component{
tags:result.data.tags,
attachments:result.data.attachments
})
+ window.document.title = result.data.title;
}
}).catch((error)=>{
console.log(error);
diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
index 25437c09e..f66539c99 100644
--- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
+++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
@@ -227,6 +227,8 @@ class PathDetailIndex extends Component{
pathtopskey:key===undefined?1:key,
// items: getItems(result.data.members.length),
})
+
+ document.title=result.data.name;
}
}).catch((error)=>{
diff --git a/public/react/src/modules/paths/ShixunPathSearch.js b/public/react/src/modules/paths/ShixunPathSearch.js
index 8323cd607..7f052c166 100644
--- a/public/react/src/modules/paths/ShixunPathSearch.js
+++ b/public/react/src/modules/paths/ShixunPathSearch.js
@@ -64,6 +64,7 @@ class ShixunPathSearch extends Component{
componentDidMount(){
+ document.title="实践课程";
const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;
From 22457350b45d642b84cb58005593a34b25fed8eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 14 Oct 2019 15:39:03 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=88=E7=8E=87?=
=?UTF-8?q?=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/shixunHomework/Trainingjobsetting.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
index 5d2462ec0..fa0cdd832 100644
--- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
+++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
@@ -1016,14 +1016,14 @@ class Trainingjobsetting extends Component {
this.setState({
completionefficiencyscore: e.target.checked,
work_efficiencys:e.target.checked,
- latedeductiontwo: 0,
+ latedeductiontwo: 20,
})
//均分比例
if(this.state.proportion==="均分比例"){
- this.Equalproportion(0);
+ this.Equalproportion(20);
}else if(this.state.proportion==="经验值比例"){
- this.Empiricalvalueratio(0);
+ this.Empiricalvalueratio(20);
}
@@ -1691,6 +1691,7 @@ class Trainingjobsetting extends Component {
modalSave: this.cancelBox
})
} else {
+
var releasetime =true;
var deadline = true;
var endtime =true;
@@ -1840,7 +1841,7 @@ class Trainingjobsetting extends Component {
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
- completionefficiencyscore:false,
+ completionefficiencyscore:true,
work_efficiencys:datas.data.work_efficiency,
unifiedsetting:datas.data.unified_setting,
latedeductiontwo:datas.data.eff_score,
@@ -2080,7 +2081,7 @@ class Trainingjobsetting extends Component {
// console.log(this.props.isAdmin())
// console.log(this.state.code_review===false)
// console.log("引入的分值");
- console.log(this.state.work_efficiencys);
+ // console.log(this.state.work_efficiencys);