diff --git a/public/react/src/modules/modals/UpgradeModals.js b/public/react/src/modules/modals/UpgradeModals.js
new file mode 100644
index 000000000..0bf06ff6e
--- /dev/null
+++ b/public/react/src/modules/modals/UpgradeModals.js
@@ -0,0 +1,78 @@
+import React, { Component } from 'react';
+import {getImageUrl} from 'educoder';
+import { Spin, Icon , Modal} from 'antd';
+import moment from 'moment';
+class UpgradeModals extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ system_updates:false
+ }
+ }
+
+ updatasmodals=()=>{
+ let {updata} = this.props;
+ if(updata&&updata.system_update===true){
+ let SystemUpdateEndTime = localStorage.getItem('SystemUpdateEndTime');
+ if(SystemUpdateEndTime===null){
+ this.setState({
+ system_updates:true
+ })
+ }else if(moment(SystemUpdateEndTime) < moment(updata.end_time)){
+ this.setState({
+ system_updates:true
+ })
+ }
+ }
+ }
+
+ componentDidMount() {
+ this.updatasmodals()
+ }
+
+ componentDidUpdate(prevProps){
+ if (prevProps.data!=this.props.updata) {
+ this.updatasmodals()
+ }
+ }
+
+ setmodalSave=()=>{
+ let {updata}=this.props;
+ localStorage.setItem('SystemUpdateEndTime',updata.end_time);
+ this.setState({
+ system_updates:false
+ })
+ }
+
+
+render() {
+ // const antIcons =
+ {/*
*/}
+
+ {/**/}
+ let {system_updates}=this.state;
+ let {updata}=this.props;
+ return(
+
+
+
{updata&&updata.system_score}
+
+
+
+ )
+ }
+}
+
+export default UpgradeModals;
\ No newline at end of file
diff --git a/public/react/src/modules/paths/ShixunPathSearch.js b/public/react/src/modules/paths/ShixunPathSearch.js
index c37754d62..cca9b0e94 100644
--- a/public/react/src/modules/paths/ShixunPathSearch.js
+++ b/public/react/src/modules/paths/ShixunPathSearch.js
@@ -1,13 +1,15 @@
import React, { Component } from 'react';
-import PathCard from "./ShixunPathCard.js"
+import PathCard from "./ShixunPathCard.js";
import axios from 'axios';
import {Input} from 'antd';
+import UpgradeModals from '../modals/UpgradeModals';
import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
-import './ShixunPaths.css'
+import './ShixunPaths.css';
const Search = Input.Search;
+
class ShixunPathSearch extends Component{
constructor(props) {
super(props)
@@ -65,7 +67,17 @@ class ShixunPathSearch extends Component{
componentDidMount(){
- let { order,select,search,page }=this.state;
+ const upsystem=`/users/system_update.json`;
+ axios.get(upsystem).then((response)=>{
+ let updata=response.data;
+ this.setState({
+ updata
+ })
+ }).catch((error)=>{
+ console.log(error);
+ })
+
+ let { order,select,search,page }=this.state;
this.getList(order,select,search,page );
}
@@ -96,7 +108,10 @@ class ShixunPathSearch extends Component{
let { order,sortList,search,page,total_count,select }=this.state;
return (
-
+
diff --git a/public/react/src/modules/tpm/shixuns/ShixunsIndex.js b/public/react/src/modules/tpm/shixuns/ShixunsIndex.js
index 5efd31c3b..bbf63ca2d 100644
--- a/public/react/src/modules/tpm/shixuns/ShixunsIndex.js
+++ b/public/react/src/modules/tpm/shixuns/ShixunsIndex.js
@@ -18,6 +18,8 @@ import ShixunSearchBar from './ShixunSearchBar';
import ShixunCard from './ShixunCard';
+import UpgradeModals from '../../modals/UpgradeModals';
+
const queryString = require('query-string');
const $ = window.$;
@@ -45,7 +47,20 @@ class ShixunsIndex extends Component {
}
}
componentDidMount(){
- let _keyword;
+
+ const upsystem=`/users/system_update.json`;
+ axios.get(upsystem).then((response)=>{
+ let updata=response.data;
+ this.setState({
+ updata
+ })
+ }).catch((error)=>{
+ console.log(error);
+ })
+
+
+
+ let _keyword;
if (window.__headSearchKeyword) {
this.setState({ keyword: window.__headSearchKeyword })
_keyword = window.__headSearchKeyword
@@ -366,6 +381,10 @@ class ShixunsIndex extends Component {
return (
+
{/*
*/}
{
- this.getInfo(this.props.match.params.username);
+ const upsystem=`/users/system_update.json`;
+ axios.get(upsystem).then((response)=>{
+ let updata=response.data;
+ this.setState({
+ updata
+ })
+ }).catch((error)=>{
+ console.log(error);
+ })
+
+ this.getInfo(this.props.match.params.username);
}
+
+
//判断是否看的是当前用户的个人主页
componentDidUpdate =(prevProps)=> {
if(this.props.current_user && prevProps.current_user != this.props.current_user){
@@ -214,6 +226,10 @@ class Infos extends Component{
moduleName=pathname.split("/")[3];
return(
+
{
isRenders &&
this.cancelModulationModels()}/>
}
From 438b20e528ed1363d46ac77a675277ef9129920f 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, 22 Jul 2019 18:14:30 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=20=E5=8D=87=E7=BA=A7=E6=8F=90=E7=A4=BA?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/coursesHome/coursesHome.js | 7 +++----
public/react/src/modules/home/shixunsHome.js | 14 ++++++++++++++
public/react/src/modules/modals/UpgradeModals.js | 10 +++++++---
public/react/src/modules/paths/ShixunPathSearch.js | 7 +++----
.../react/src/modules/tpm/shixuns/ShixunsIndex.js | 8 ++++----
public/react/src/modules/user/usersInfo/Infos.js | 12 +++++-------
6 files changed, 36 insertions(+), 22 deletions(-)
diff --git a/public/react/src/modules/courses/coursesHome/coursesHome.js b/public/react/src/modules/courses/coursesHome/coursesHome.js
index 6f9e0577c..994e14eb9 100644
--- a/public/react/src/modules/courses/coursesHome/coursesHome.js
+++ b/public/react/src/modules/courses/coursesHome/coursesHome.js
@@ -57,7 +57,7 @@ class coursesHome extends Component{
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
- updata
+ updata:updata
})
}).catch((error)=>{
console.log(error);
@@ -106,10 +106,9 @@ class coursesHome extends Component{
return (
-
+ />}
diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js
index 5400368ec..92f3c9f44 100644
--- a/public/react/src/modules/home/shixunsHome.js
+++ b/public/react/src/modules/home/shixunsHome.js
@@ -10,6 +10,8 @@ import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import SiderBar from '../tpm/SiderBar';
+import UpgradeModals from '../modals/UpgradeModals';
+
import { SnackbarHOC , getImageUrl} from 'educoder';
import Slider from '@icedesign/base/lib/slider';
@@ -35,6 +37,15 @@ class ShixunsHome extends Component {
}
}
componentDidMount(){
+ const upsystem=`/users/system_update.json`;
+ axios.get(upsystem).then((response)=>{
+ let updata=response.data;
+ this.setState({
+ updata:updata
+ })
+ }).catch((error)=>{
+ console.log(error);
+ })
let url=`/home/index.json`;
axios.get(url).then((response)=> {
if(response.status===200){
@@ -106,6 +117,9 @@ class ShixunsHome extends Component {
return (
+ {this.state.updata===undefined?"":
}
{/*懒加载*/}
diff --git a/public/react/src/modules/modals/UpgradeModals.js b/public/react/src/modules/modals/UpgradeModals.js
index 0bf06ff6e..e3d882ff4 100644
--- a/public/react/src/modules/modals/UpgradeModals.js
+++ b/public/react/src/modules/modals/UpgradeModals.js
@@ -18,6 +18,10 @@ class UpgradeModals extends Component {
this.setState({
system_updates:true
})
+ }else if(SystemUpdateEndTime===undefined){
+ this.setState({
+ system_updates:true
+ })
}else if(moment(SystemUpdateEndTime) < moment(updata.end_time)){
this.setState({
system_updates:true
@@ -31,9 +35,9 @@ class UpgradeModals extends Component {
}
componentDidUpdate(prevProps){
- if (prevProps.data!=this.props.updata) {
- this.updatasmodals()
- }
+ // if (prevProps.data!=this.props.updata){
+ // this.updatasmodals()
+ // }
}
setmodalSave=()=>{
diff --git a/public/react/src/modules/paths/ShixunPathSearch.js b/public/react/src/modules/paths/ShixunPathSearch.js
index cca9b0e94..da19e0521 100644
--- a/public/react/src/modules/paths/ShixunPathSearch.js
+++ b/public/react/src/modules/paths/ShixunPathSearch.js
@@ -71,7 +71,7 @@ class ShixunPathSearch extends Component{
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
- updata
+ updata:updata
})
}).catch((error)=>{
console.log(error);
@@ -108,10 +108,9 @@ class ShixunPathSearch extends Component{
let { order,sortList,search,page,total_count,select }=this.state;
return (
-
+ />}
diff --git a/public/react/src/modules/tpm/shixuns/ShixunsIndex.js b/public/react/src/modules/tpm/shixuns/ShixunsIndex.js
index bbf63ca2d..468afc43a 100644
--- a/public/react/src/modules/tpm/shixuns/ShixunsIndex.js
+++ b/public/react/src/modules/tpm/shixuns/ShixunsIndex.js
@@ -52,7 +52,7 @@ class ShixunsIndex extends Component {
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
- updata
+ updata:updata
})
}).catch((error)=>{
console.log(error);
@@ -379,12 +379,12 @@ class ShixunsIndex extends Component {
render() {
let {middleshixundata, typepvisible, pages, search_tags, keyword,parsedid,newtag_level,newpalce} = this.state;
+ console.log(this.state.updata)
return (
-
+ />}
{/*
*/}
{
- const upsystem=`/users/system_update.json`;
+ let upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
- updata
+ updata:updata
})
}).catch((error)=>{
console.log(error);
@@ -68,7 +68,6 @@ class Infos extends Component{
//判断是否看的是当前用户的个人主页
componentDidUpdate =(prevProps)=> {
if(this.props.current_user && prevProps.current_user != this.props.current_user){
- console.log(this.props);
if(this.props.current_user.login != this.props.match.params.username){
this.setState({
is_current:false,
@@ -226,10 +225,9 @@ class Infos extends Component{
moduleName=pathname.split("/")[3];
return(
-
+ />}
{
isRenders &&
this.cancelModulationModels()}/>
}
From bd9c7bf622bf5de2a4e022a7c7c11ce376ff935c 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, 22 Jul 2019 18:43:17 +0800
Subject: [PATCH 3/5] endtime
---
.../modules/courses/shixunHomework/Listofworksstudentone.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 7c98c514d..69bcd060a 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -1941,6 +1941,8 @@ class Listofworksstudentone extends Component {
axios.get(url).then((response) => {
if (response.status === 200) {
+ let starttime = this.props.getNowFormatDates(1);
+ let endtime = this.props.getNowFormatDates(2);
this.setState({
modalname: "立即发布",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
@@ -1958,8 +1960,7 @@ class Listofworksstudentone extends Component {
Saves: this.homeworkstartend,
course_groups: response.data.course_groups,
})
- let starttime = this.props.getNowFormatDates(1);
- let endtime = this.props.getNowFormatDates(2);
+
}
}).catch((error) => {
console.log(error)
From 700d221ae91c2d93309b4e0963632b2c530d2e61 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, 22 Jul 2019 18:49:14 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/user/LoginRegisterComponent.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js
index 9281d228c..b761a910f 100644
--- a/public/react/src/modules/user/LoginRegisterComponent.js
+++ b/public/react/src/modules/user/LoginRegisterComponent.js
@@ -944,7 +944,10 @@ class LoginRegisterComponent extends Component {
value={Agreetotheterms}
>我已阅读并同意服务协议条款
+ }}>我已阅读并同意
+
+ 《服务协议条款》
+
From dd74c61db318b104240e6914043101df02ebcad6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 22 Jul 2019 18:52:30 +0800
Subject: [PATCH 5/5] 2
---
.../shixunHomework/Listofworksstudentone.js | 2 +-
.../src/modules/login/EducoderInteresse.js | 20 +-
public/react/src/modules/user/Interestpage.js | 54 ++--
.../react/src/modules/user/InterestpageMax.js | 291 ++++++++++++++++++
public/react/src/modules/user/MyeducoderI.css | 3 +
public/react/src/modules/user/common.css | 54 ++--
public/react/src/modules/user/commontwo.css | 265 ++++++++++++++++
7 files changed, 629 insertions(+), 60 deletions(-)
create mode 100644 public/react/src/modules/user/InterestpageMax.js
create mode 100644 public/react/src/modules/user/MyeducoderI.css
create mode 100644 public/react/src/modules/user/commontwo.css
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 7c98c514d..ef22c82e5 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -2453,7 +2453,7 @@ class Listofworksstudentone extends Component {
{teacherdata === undefined ? "" : teacherdata.student_works.length}个检索结果({teacherdata === undefined ? "" : teacherdata.all_member_count}学生)
+ className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works&&teacherdata.student_works.length}个检索结果({teacherdata === undefined ? "" : teacherdata.all_member_count}学生)