+
+ {
+ Phonenumberisnotcosyzm && Phonenumberisnotcosyzm != "" ?
+
+ {Phonenumberisnotcosyzm}
+
+ :
+
+ }
-
this.Showandhide(key)}>
}>
+ {
+ Phonenumberisnotcosymmm && Phonenumberisnotcosymmm!== "" ?
+
+ {Phonenumberisnotcosymmm}
+
+ : ""
+
+ }
我已阅读并同意服务协议条款
+ {
+ Phonenumberisnotcosyfwtk && Phonenumberisnotcosyfwtk!== "" ?
+
+ {Phonenumberisnotcosyfwtk}
+
+ : ""
+
+ }
diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js
new file mode 100644
index 000000000..076bc9f4d
--- /dev/null
+++ b/public/react/src/search/SearchPage.js
@@ -0,0 +1,82 @@
+import React,{ Component } from "react";
+import {Checkbox,Input,Table, Pagination,Menu,Icon} from "antd";
+import {Link,NavLink} from 'react-router-dom';
+import { WordsBtn ,ActionBtn,SnackbarHOC} from 'educoder';
+const Search = Input.Search;
+import axios from 'axios';
+import './searchc.css'
+import {TPMIndexHOC} from "../modules/tpm/TPMIndexHOC";
+
+class SearchPage extends Component{
+ constructor(props) {
+ super(props);
+ this.state={
+ tab:"0",
+ count:0,
+ }
+ }
+ //切换tab
+ changeTab=(e)=>{
+ this.setState({
+ tab:e.key
+ })
+
+
+ }
+
+ componentDidMount(){
+ // const query =this.props.location.search;
+ // const type = query.split('?tab=');
+ // let sum = []
+ // sum.push(type[1])
+ // // console.log("componentDidMountcomponentDidMount");
+ // // console.log(sum);
+ // this.setState({
+ // tab:sum,
+ // })
+
+ }
+ setdatafuns =(value)=>{
+
+ }
+
+ render(){
+ let {tab,count}=this.state;
+ console.log(tab);
+ return(
+
+
+
+
搜索}
+ onSearch={ (value)=>this.setdatafuns(value)} />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default SnackbarHOC() (TPMIndexHOC ( SearchPage ));
\ No newline at end of file
diff --git a/public/react/src/search/searchc.css b/public/react/src/search/searchc.css
new file mode 100644
index 000000000..9fe8b22a0
--- /dev/null
+++ b/public/react/src/search/searchc.css
@@ -0,0 +1,74 @@
+.searchinput{
+ width: 800px;
+ margin-top: 53px;
+}
+.headersear{
+ height: 160px;
+ background: #EAF2F9;
+ display: flex;
+ justify-content: center;
+}
+.packinput .ant-input{
+ height: 55px;
+ width:663px !important;
+ font-size: 18px;
+ color: #681616 !important;
+ border-color: #E1EDF8 !important;
+}
+
+.packinput .ant-input-group-addon .ant-btn{
+ width:137px !important;
+ font-size: 18px;
+ height: 53px;
+ background:rgba(76,172,255,1);
+
+}
+.tabtitle{
+ width: 100% !important;
+ height: 62px !important;
+ box-shadow: 3px 10px 21px 0px rgba(76, 76, 76, 0.15);
+ border-radius: 6px;
+ background: #fff;
+ background: rgb(244, 244, 244);
+}
+
+
+.tabtitless{
+ height: 62px !important;
+ line-height: 62px !important;
+
+}
+.tabtitle1{
+ margin-left: 181px !important;
+
+}
+.tabtitle2{
+ margin-left: 90px !important;
+
+}
+
+
+.counttit{
+ width: 130px;
+ height: 18px;
+}
+
+.counttittext{
+ width: 130px;
+ height: 18px;
+ color: #888888;
+ font-size: 13px;
+ margin-top: 24px;
+ padding-bottom: 17px;
+ margin-left: 343px;
+
+}
+.counttittexts{
+ color: #4CACFF !important;
+ font-size: 13px;
+}
+
+.mainx{
+ display: flex;
+ justify-content: center;
+}
\ No newline at end of file
From 26f443203d660f16588db37458e5df0e85df66f0 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 19 Jul 2019 16:35:32 +0800
Subject: [PATCH 3/7] ts_mem
---
public/react/src/modules/page/main/CodeEvaluateView.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js
index 48bb0b245..8be0b8765 100644
--- a/public/react/src/modules/page/main/CodeEvaluateView.js
+++ b/public/react/src/modules/page/main/CodeEvaluateView.js
@@ -184,8 +184,8 @@ class CodeEvaluateView extends Component {
{ headIconClass &&
}
{ _headLockIconClass &&
}
- { item.ts_memo &&
消耗内存{item.ts_memo}MB }
- { item.ts_memo && item.ts_time &&
}
+ { item.ts_mem &&
消耗内存{item.ts_mem}MB }
+ { item.ts_mem && item.ts_time &&
}
{ item.ts_time &&
代码执行时长:{item.ts_time}秒 }
From 49d3cc2c48b8bf98cc580d21289e007b0d66a48d Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 19 Jul 2019 17:25:52 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=A4=A7=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/common/educoder.js | 1 +
.../react/src/common/hooks/ImageLayerHook.js | 47 +++++++++++++++++++
.../members/modal/CourseGroupChooserModal.js | 4 +-
.../modules/page/main/CodeEvaluateView.css | 1 +
.../user/modal/RealNameCertificationModal.js | 14 ++++--
5 files changed, 61 insertions(+), 6 deletions(-)
create mode 100644 public/react/src/common/hooks/ImageLayerHook.js
diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js
index 263e08808..749d2a1e5 100644
--- a/public/react/src/common/educoder.js
+++ b/public/react/src/common/educoder.js
@@ -50,3 +50,4 @@ export { default as DMDEditor } from './components/markdown/DMDEditor'
+export { default as ImageLayerHook } from './hooks/ImageLayerHook'
\ No newline at end of file
diff --git a/public/react/src/common/hooks/ImageLayerHook.js b/public/react/src/common/hooks/ImageLayerHook.js
new file mode 100644
index 000000000..c9f0a14a4
--- /dev/null
+++ b/public/react/src/common/hooks/ImageLayerHook.js
@@ -0,0 +1,47 @@
+import React, { useState, useEffect, memo } from 'react'
+import ImageLayer from '../../modules/page/layers/ImageLayer'
+import { isImageExtension } from 'educoder'
+function ImageLayerHook(props) {
+ const [showImage, setShowImage] = useState(false)
+ const [imageSrc, setImageSrc] = useState('')
+
+ const { parentSel, childSel, watchPropsArray } = props
+
+ const onImageLayerClose = () => {
+ setShowImage(false)
+ setImageSrc('')
+ }
+ const onDelegateClick = (event) => {
+ const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
+ // 判断imageSrc是否是图片
+ const fileName = event.target.innerHTML.trim()
+ if (isImageExtension(imageSrc.trim()) || isImageExtension(fileName) || event.target.tagName == 'IMG' || imageSrc.indexOf('base64,') != -1) {
+ // 非回复里的头像图片; 非emoticons
+ if (imageSrc.indexOf('/images/avatars/User') === -1 &&
+ imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) {
+ setShowImage(true)
+ setImageSrc(imageSrc)
+ }
+ event.stopPropagation()
+ event.preventDefault && event.preventDefault()
+ event.originalEvent.preventDefault()
+ // event.originalEvent.stopPropagation()
+ // event.originalEvent.cancelBubble = true
+ return false;
+ }
+ }
+ useEffect(() => {
+ $(parentSel)
+ .delegate(childSel, "click", onDelegateClick);
+
+ return () => {
+ $(parentSel).undelegate(childSel, "click", onDelegateClick )
+ }
+ })
+
+ return (
+
+ )
+}
+
+export default memo(ImageLayerHook)
\ No newline at end of file
diff --git a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
index dc3044cc0..3f4f1a0ca 100644
--- a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
+++ b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, useRef, memo } from 'react'
+import React, { useState, useEffect, useRef, useMemo } from 'react'
import { trigger } from 'educoder'
import { Input, Checkbox } from "antd";
import CourseGroupChooser from '../CourseGroupChooser'
@@ -105,4 +105,4 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i
)
}
-export default memo(CourseGroupChooserModal)
\ No newline at end of file
+export default useMemo(CourseGroupChooserModal)
\ No newline at end of file
diff --git a/public/react/src/modules/page/main/CodeEvaluateView.css b/public/react/src/modules/page/main/CodeEvaluateView.css
index bd0427d7b..137174d95 100644
--- a/public/react/src/modules/page/main/CodeEvaluateView.css
+++ b/public/react/src/modules/page/main/CodeEvaluateView.css
@@ -126,4 +126,5 @@
display: inline-block;
height: 10px;
margin: 5px 0;
+ float: right;
}
\ No newline at end of file
diff --git a/public/react/src/modules/user/modal/RealNameCertificationModal.js b/public/react/src/modules/user/modal/RealNameCertificationModal.js
index ccb301a32..6c92423cd 100644
--- a/public/react/src/modules/user/modal/RealNameCertificationModal.js
+++ b/public/react/src/modules/user/modal/RealNameCertificationModal.js
@@ -2,7 +2,7 @@ import React, { Component } from "react";
import { message, Icon, Input, Form, Upload} from "antd";
import axios from 'axios'
import ModalWrapper from "../../courses/common/ModalWrapper"
-import { City, getUploadActionUrl,getImageUrl } from 'educoder'
+import { City, getUploadActionUrl, getImageUrl, ImageLayerHook } from 'educoder'
import '../account/common.css'
import authImg from '../../../images/account/auth.png'
@@ -201,7 +201,11 @@ class RealNameCertificationModal extends Component{
}
.applyForModal .ant-form-item-label label {
color: #979797
+ }
+ .applyForModal .ant-upload.ant-upload-drag .ant-upload {
+ padding: 0px;
}
+
.certificationModal .ant-modal-body{
padding:20px;
}
@@ -295,9 +299,9 @@ class RealNameCertificationModal extends Component{
{imageUrl2 ?
-
+ //
- :
+ :
@@ -311,7 +315,9 @@ class RealNameCertificationModal extends Component{
From b89832fe8476840874fe5e639edfe63c88e0538a Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 19 Jul 2019 17:44:52 +0800
Subject: [PATCH 5/7] users
---
public/react/src/context/TPIContextProvider.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js
index 10e9c07e2..449f79a7a 100644
--- a/public/react/src/context/TPIContextProvider.js
+++ b/public/react/src/context/TPIContextProvider.js
@@ -424,7 +424,7 @@ pop_box_new(htmlvalue, 480, 182);
*/
let user = resData.user;
user.username = resData.user.name;
- user.user_url = `/user/${resData.user.login}`;
+ user.user_url = `/users/${resData.user.login}`;
// user.image_url = resData.image_url;
user.is_teacher = resData.is_teacher;
resData.user = user;
From c67050034abe1be4a0dee67cba30587a92f6ab00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 19 Jul 2019 17:47:21 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixunHomework/Listofworksstudentone.js | 2 +-
public/react/src/search/SearchPage.js | 161 ++++++++++++++++--
public/react/src/search/searchc.css | 63 +++++--
3 files changed, 203 insertions(+), 23 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 1ba8c85b7..f31cb954d 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -1411,7 +1411,7 @@ class Listofworksstudentone extends Component {
// }
this.setState({
page: e.current,
- teacherlists: teacherlists
+ // teacherlists: teacherlists
})
}
diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js
index 076bc9f4d..14966b670 100644
--- a/public/react/src/search/SearchPage.js
+++ b/public/react/src/search/SearchPage.js
@@ -1,7 +1,7 @@
import React,{ Component } from "react";
import {Checkbox,Input,Table, Pagination,Menu,Icon} from "antd";
import {Link,NavLink} from 'react-router-dom';
-import { WordsBtn ,ActionBtn,SnackbarHOC} from 'educoder';
+import { WordsBtn ,ActionBtn,SnackbarHOC,markdownToHTML,getImageUrl} from 'educoder';
const Search = Input.Search;
import axios from 'axios';
import './searchc.css'
@@ -13,6 +13,11 @@ class SearchPage extends Component{
this.state={
tab:"0",
count:0,
+ keywords:"python",
+ type:"",
+ page:1,
+ perpages:20,
+ data:[],
}
}
//切换tab
@@ -34,14 +39,47 @@ class SearchPage extends Component{
// this.setState({
// tab:sum,
// })
+ this.getdata(this.state.page);
}
setdatafuns =(value)=>{
}
+ paginationonChanges = (pageNumber) => {
+ this.setState({
+ page: pageNumber,
+ loadingstate: true,
+ })
+ this.getdata(pageNumber);
+ }
+ //获取数据
+ getdata=(pages)=>{
+ let url = "/search.json";
+ axios.get(url,{params:{
+ keyword:this.state.keywords,
+ type:this.state.types,
+ page:pages,
+ per_page:this.state.perpages,
+ }
+ }).then((response) => {
+ if(response === undefined){
+
+ return
+ }
+ console.log("63");
+ console.log(response.data);
+ this.setState({
+ count:response.data.count,
+ data:response.data.results,
+ })
+ }).catch((error) => {
+ console.log("56");
+ console.log(error);
+ });
+ }
render(){
- let {tab,count}=this.state;
+ let {tab,count,data,page,perpages}=this.state;
console.log(tab);
return(
@@ -55,24 +93,123 @@ class SearchPage extends Component{
+ {
+ JSON.stringify(data) === "[]" ?
+
+
+
+
+
}/)
+
没有数据可以显示!
+
+
+
+
+ :
+
+
+
+
+
+
+ {data === undefined ? "" : data.map((item, key) => {
+ return (
+
+
+
+ {/*标题*/}
+
+ {/*描述*/}
+
+ {item.content.content === undefined || item.content.content===0?"": item.content.content.map((item4, key4) => {
+ return (
+
+ )
+ })
+ }
+
+
+
+ {/*内容*/}
+ {item.content.description === undefined || item.content.description===0?"": item.content.description.map((item3, key3) => {
+ return (
+
+ )
+ })
+ }
+
+
+
+
+
+ {/*挑战名字*/}
+ {item.content.challenge_names === undefined || item.content.challenge_names===0?"": item.content.challenge_names.map((item5, key5) => {
+ return (
+
+ )
+ })
+ }
+
+
+
+ {/*挑战标签*/}
+ {item.content.challenge_tag_names === undefined || item.content.challenge_tag_names===0?"": item.content.challenge_tag_names.map((item6, key6) => {
+ return (
+ 1?"markdown-body tzbq ":"markdown-body tzbqx"}
+ dangerouslySetInnerHTML={{__html:item6}} />
+ )
+ })
+ }
+
+
+
+
+
+
+
+ )
+ })}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+
+ {
+ count && count && count> perpages ?
+
+ : ""
+ }
-
-
-
-
-
-
-
-
)
diff --git a/public/react/src/search/searchc.css b/public/react/src/search/searchc.css
index 9fe8b22a0..a3e9fafbd 100644
--- a/public/react/src/search/searchc.css
+++ b/public/react/src/search/searchc.css
@@ -24,14 +24,18 @@
}
.tabtitle{
- width: 100% !important;
height: 62px !important;
box-shadow: 3px 10px 21px 0px rgba(76, 76, 76, 0.15);
border-radius: 6px;
background: #fff;
- background: rgb(244, 244, 244);
+ display: flex;
+ justify-content: center;
+}
+.tabtitles2{
+ background: #fff;
+ height: 62px !important;
+ width: 1200px;
}
-
.tabtitless{
height: 62px !important;
@@ -39,28 +43,27 @@
}
.tabtitle1{
- margin-left: 181px !important;
}
.tabtitle2{
- margin-left: 90px !important;
+ margin-left: 30px !important;
}
.counttit{
- width: 130px;
- height: 18px;
+ display: flex;
+ justify-content: center;
}
.counttittext{
- width: 130px;
+ text-align: left;
+ width: 1200px;
height: 18px;
color: #888888;
font-size: 13px;
margin-top: 24px;
- padding-bottom: 17px;
- margin-left: 343px;
+
}
.counttittexts{
@@ -71,4 +74,44 @@
.mainx{
display: flex;
justify-content: center;
+ margin-top: 17px;
+}
+.project-packages-list{
+
+}
+.project-package-item{
+ display: -webkit-flex;
+ display: flex;
+ flex-direction:column;
+ margin-bottom: 20px;
+ padding: 20px;
+ background: white;
+ /* box-shadow: 1px 3px 3px 1px rgba(156,156,156,0.16); */
+
+}
+.xuxianpro{
+ height: 20px;
+ border-bottom: 1px dashed;
+ border-color: #EAEAEA;
+ margin-bottom: 18px;
+}
+.magr11{
+ margin-top: 11px;
+}
+.highlight{
+ color: #4CACFF;
+}
+.fonttext{
+ font-size: 20px;
+ font-weight:bold;
+}
+
+.fontextcolor{
+ color: #777777;
+}
+.tzbq{
+ margin-left: 68px;
+}
+.tzbqx{
+ margin-left: 24px;
}
\ No newline at end of file
From 5f8c43b592109a6b644b414a6c40847bd3cdac9b Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 19 Jul 2019 17:51:36 +0800
Subject: [PATCH 7/7] name
---
public/react/src/modules/user/modal/ApplyForAddOrgModal.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
index 76664bfec..95cfa9105 100644
--- a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
+++ b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
@@ -40,7 +40,7 @@ class ApplyForAddOrgModal extends Component{
if(!err){
let url=`/add_school_applies.json`;
axios.post(url,{
- schoolName:values.schoolName,
+ name:values.schoolName,
province:values.city && values.city[0],
city:values.city && values.city[1],
address:values.address,