Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit e23f71b36e

@ -110,6 +110,11 @@ const CoursesIndex = Loadable({
loader: () => import('./modules/courses/Index'),
loading: Loading,
})
const SearchPage = Loadable({
loader: () => import('./search/SearchPage'),
loading: Loading,
})
// 课堂讨论
// const BoardIndex = Loadable({
// loader: () => import('./modules/courses/boards/BoardIndex'),
@ -328,9 +333,10 @@ class App extends Component {
{/*实训课程(原实训路径)*/}
<Route path="/paths" component={ShixunPaths}></Route>
<Route path="/search" component={SearchPage} ></Route>
{/*课堂*/}
<Route path="/courses" component={CoursesIndex} {...this.props}></Route>
{/* 课堂讨论 */}
{/* <Route path="/board" component = {BoardIndex} {...this.props}></Route> */}
@ -340,6 +346,7 @@ class App extends Component {
{/* <Route path="/myshixuns/:shixunId/stages/:stageId" component={Index}/> */}
{/* 兴趣页面*/}
{/*<Route path="/interest" component={Interestpage}/>*/}
<Route path="/comment" component={CommentComponent}/>
<Route path="/testMaterial" component={TestMaterialDesignComponent}/>
<Route path="/test" component={TestIndex}/>

@ -50,3 +50,4 @@ export { default as DMDEditor } from './components/markdown/DMDEditor'
export { default as ImageLayerHook } from './hooks/ImageLayerHook'

@ -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 (
<ImageLayer showImage={showImage} imageSrc={imageSrc} onImageLayerClose={onImageLayerClose}></ImageLayer>
)
}
export default memo(ImageLayerHook)

@ -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;

@ -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
</ModalWrapper>
)
}
export default memo(CourseGroupChooserModal)
export default useMemo(CourseGroupChooserModal)

@ -1411,7 +1411,7 @@ class Listofworksstudentone extends Component {
// }
this.setState({
page: e.current,
teacherlists: teacherlists
// teacherlists: teacherlists
})
}

@ -33,6 +33,8 @@ class Trialapplication extends Component {
user_phone_binded: props.user_phone_binded,
showTrial: false,
user: undefined,
borredss:"bor-reds",
borredssz:"bor-reds fl mr5",
}
//user_phone_binded 判断是否手机号验证
// console.log("Trialapplication");
@ -371,7 +373,7 @@ class Trialapplication extends Component {
//执行view
render() {
let {login, codes, reason, isRenders, user_phone_binded, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state;
let {login, codes, reason, isRenders, user_phone_binded,borredss,borredssz, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state;
// console.log("Trialapplication22222222");
// console.log(this.props);
@ -600,12 +602,13 @@ class Trialapplication extends Component {
onChange={this.loginInputonChange}
onBlur={(e) => this.inputOnBlur(e)}
style={{"height": "38px",}}
className={Phonenumberisnotco && Phonenumberisnotco !== ""?borredss:""}
name="myiphone"
></Input>
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span style={{textAlign:"left"}}>{Phonenumberisnotco}</span>
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotco}</span>
</p>
: <div style={{height: "20px"}}></div>
}
@ -617,7 +620,9 @@ class Trialapplication extends Component {
user_phone_binded === true ? "" :
<div style={{"display": "flex", "justify-content": "center"}}>
<Input className="fl mr5" name="codes" type="text" autoComplete="off"
<Input
className={Phonenumberisnotcocodes && Phonenumberisnotcocodes !== ""?borredssz:"fl mr5"}
name="codes" type="text" autoComplete="off"
readonly
onfocus="this.removeAttribute('readonly')" style={{
"width": "316px",
@ -644,7 +649,7 @@ class Trialapplication extends Component {
"height": "38px",
}} type="primary"
onClick={() => this.getverificationcode()}
size={"large"}>验证码</Button>
size={"large"}>获取验证码</Button>
:
<Button className="fl ml5 " style={{
"background": "#4cacff!important",
@ -661,8 +666,8 @@ class Trialapplication extends Component {
{
Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ?
<p className="color-red " style={{width: " 100%", height: "20px"}}>
<span style={{textAlign:"left"}}>{Phonenumberisnotcocodes}</span>
<p className="color-red " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotcocodes}</span>
</p>
: <div style={{height: "20px"}}></div>
}
@ -672,12 +677,13 @@ class Trialapplication extends Component {
}}>
<Input placeholder="请在此输入推荐人信息或申请理由" value={reason}
onChange={this.loginInputonChanges}
className={Phonenumberisnotcoreason && Phonenumberisnotcoreason !== ""?borredss:""}
style={{"height": "38px",}}
name="mynames"></Input>
{
Phonenumberisnotcoreason && Phonenumberisnotcoreason != "" ?
<p className="color-red" style={{width: " 100%", height: "20px"}}>
<span style={{textAlign:"left"}}>{Phonenumberisnotcoreason}</span>
Phonenumberisnotcoreason && Phonenumberisnotcoreason !== "" ?
<p className="color-red" style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotcoreason}</span>
</p>
: <div style={{height: "20px"}}></div>
}
@ -689,6 +695,7 @@ class Trialapplication extends Component {
"width": "120px",
"text-align": "center",
"height": "38px",
marginTop: "10px",
}}
size={"large"}>提交申请</Button>

@ -126,4 +126,5 @@
display: inline-block;
height: 10px;
margin: 5px 0;
float: right;
}

@ -184,8 +184,8 @@ class CodeEvaluateView extends Component {
{ headIconClass && <i className={`fa ${ headIconClass } fr mt2 ml5 font-16`}></i> }
{ _headLockIconClass && <i className={`fa ${ _headLockIconClass } fr mt2 ml5 font-16`}></i> }
{ item.ts_memo && <span className="fr description">消耗内存{item.ts_memo}MB</span> }
{ item.ts_memo && item.ts_time && <span className="split"></span> }
{ item.ts_mem && <span className="fr description">消耗内存{item.ts_mem}MB</span> }
{ item.ts_mem && item.ts_time && <span className="split"></span> }
{ item.ts_time && <span className="fr description">代码执行时长{item.ts_time}</span> }
</p>

@ -169,8 +169,8 @@ class NewHeader extends Component {
RadioGroupvalue:undefined,
submitapplications:false,
isRender:false,
isRenders:false,
showTrial:false,
// isRenders:false,
// showTrial:false,
}
// console.log("176")
// console.log(props);
@ -547,13 +547,13 @@ submittojoinclass=(value)=>{
}
}
trialapplications =()=>{
console.log("点击了")
this.setState({
isRenders: true,
showTrial:true,
})
}
// trialapplications =()=>{
// console.log("点击了")
// this.setState({
// isRenders: true,
// showTrial:true,
// })
// }
// 关闭
cancelModulationModels = () => {
@ -617,14 +617,15 @@ submittojoinclass=(value)=>{
/>
{/* :""*/}
{/*}*/}
{
isRenders&&isRenders===true?
<Trialapplication
{...this.state}
Cancel={() => this.cancelModulationModels()}
/>
:""
}
{/*{*/}
{/* isRenders&&isRenders===true?*/}
{/* <Trialapplication*/}
{/* {...this.state}*/}
{/* Cancel={() => this.cancelModulationModels()}*/}
{/* />*/}
{/* :""*/}
{/*}*/}
<Trialapplication {...this.state} Cancel={() => this.cancelModulationModels()} ></Trialapplication>
<div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
@ -756,7 +757,7 @@ submittojoinclass=(value)=>{
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li>
<li><a href={`/account/profile`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}
<li className="bor-top-greyE">

@ -309,6 +309,15 @@ class LoginRegisterComponent extends Component {
//是否验证通过
dragOkCallback = () => {
console.log(this.state.login);
if(this.state.login===""||this.state.login.length===0){
this.setState({
Phonenumberisnotco: "账号不能为空",
Phonenumberisnotcobool: true,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return
}
this.Emailphonenumberverification(this.state.login)
}

@ -51,6 +51,10 @@ class LoginRegisterComponent extends Component {
codes: "",
Phonenumberisnotco: undefined,
Phonenumberisnotcos: undefined,
Phonenumberisnotcosyzm:undefined,
Phonenumberisnotcosymmm:undefined,
Phonenumberisnotcosytdhk:undefined,
Phonenumberisnotcosyfwtk:undefined,
Phonenumberisnotcobool: false,
Whethertoverify:false,
@ -81,6 +85,10 @@ class LoginRegisterComponent extends Component {
codes: "",
Phonenumberisnotco: undefined,
Phonenumberisnotcos: undefined,
Phonenumberisnotcosyzm:undefined,
Phonenumberisnotcosymmm:undefined,
Phonenumberisnotcosytdhk:undefined,
Phonenumberisnotcosyfwtk:undefined,
Phonenumberisnotcobool: false,
Whethertoverify:false,
@ -175,6 +183,15 @@ class LoginRegisterComponent extends Component {
//是否验证通过
dragOkCallback = () => {
console.log(this.state.logins);
if(this.state.logins===""||this.state.logins.length===0){
this.setState({
Phonenumberisnotco:"账号不能为空",
Phonenumberisnotcobool: true,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return
}
this.Emailphonenumberverification(this.state.logins, 2)
}
@ -182,8 +199,10 @@ class LoginRegisterComponent extends Component {
//是否同意
onChange = (e) => {
this.setState({
Agreetotheterms: e.target.checked,
Phonenumberisnotcosyfwtk:undefined,
})
}
@ -225,21 +244,31 @@ class LoginRegisterComponent extends Component {
}
//注册接口
postregistered = () => {
if (this.state.logins === undefined || this.state.logins === "") {
this.openNotification(`请输入登录手机号码或邮箱`,2);
if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) {
this.setState({
Phonenumberisnotcos:"账号不能为空",
})
return
} else if (this.state.dragOk === false) {
this.openNotification(`请拖动滑块验证`,2);
this.setState({
Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
})
return
} else if (this.state.codes === undefined || this.state.codes == "") {
this.openNotification(`请输入验证码`,2);
} else if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
// this.openNotification(`请输入验证码`,2);
this.setState({
Phonenumberisnotcosyzm:"验证码不能为空",
})
return
} else if (this.state.passwords === undefined || this.state.passwords == "") {
this.openNotification(`请输入密码`,2);
} else if (this.state.passwords === undefined || this.state.passwords == "" ||this.state.passwords.length===0) {
this.setState({
Phonenumberisnotcosymmm:"密码不能为空",
})
return
} else if (this.state.Agreetotheterms === false) {
this.openNotification(`请同意服务协议条款`,2);
this.setState({
Phonenumberisnotcosyfwtk:"请同意服务协议条款",
})
return;
}
var url = "/accounts/register.json";
@ -249,14 +278,30 @@ class LoginRegisterComponent extends Component {
code: this.state.codes,
}).then((result) => {
if(result){
if(result.data.status===-2){
if(response.data.message==="验证码不正确"){
this.setState({
Phonenumberisnotcosyzm:"验证码不正确",
})
return;
}else if(response.data.message==="验证码已失效"){
this.setState({
logins: "",
dragOk: false,
codes: "",
passwords: "",
Agreetotheterms: "",
Phonenumberisnotcosyzm:"验证码不正确",
})
this.props.history.push("/interesse");
return;
}
}else {
this.setState({
logins: "",
dragOk: false,
codes: "",
passwords: "",
Agreetotheterms: "",
})
this.props.history.push("/interesse");
}
}
}).catch((error) => {
@ -514,12 +559,14 @@ class LoginRegisterComponent extends Component {
}
this.setState({
passwords: stirngt,
Phonenumberisnotcosymmm:undefined,
})
}
//获取code
codesonChange = (e) => {
this.setState({
codes: e.target.value
codes: e.target.value,
Phonenumberisnotcosyzm:undefined,
})
}
//切换tab
@ -565,6 +612,11 @@ class LoginRegisterComponent extends Component {
dragOk,
Whethertoverify,
classpassbool,
Phonenumberisnotcosyzm,
Phonenumberisnotcosymmm,
Phonenumberisnotcosytdhk,
Phonenumberisnotcosyfwtk,
Phonenumberisnotcobool,
// 注册
readAgreement,
} = this.state
@ -687,6 +739,7 @@ class LoginRegisterComponent extends Component {
<Input className="loginInputsyl color-grey-9 loginInputzhuche" placeholder="请使用手机号/邮箱账号进行注册"
value={this.state.logins}
type="text" autoComplete="off"
onChange={this.loginInputonChanges}
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
{
@ -718,10 +771,17 @@ class LoginRegisterComponent extends Component {
:
""
}
{
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk != "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosytdhk}</span>
</p>
: <div style={{height:"25px"}}></div>
}
<div className="mt25">
<div className="">
<Input className="fl mr5 font-14 color-grey-9 loginInputzhuche" name="codes" type="text" autoComplete="off" readonly
onfocus="this.removeAttribute('readonly')" style={{
width:'210px',
@ -745,6 +805,14 @@ class LoginRegisterComponent extends Component {
</div>
{
Phonenumberisnotcosyzm && Phonenumberisnotcosyzm != "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosyzm}</span>
</p>
: <div style={{height:"25px"}}></div>
}
<style>
{
@ -756,9 +824,8 @@ class LoginRegisterComponent extends Component {
`
}
</style>
<Input className="loginInput font-14 mt25 color-grey-9 loginInputzhuche" placeholder="输入8~16位密码区分大小写"
<Input className="loginInput font-14 color-grey-9 loginInputzhuche" placeholder="输入8~16位密码区分大小写"
type={classpassbool===false?"text":"password"}
autoComplete="new-password"
onClick={this.changeType}
value={this.state.passwords} onChange={this.passwordonChanges}
@ -766,11 +833,27 @@ class LoginRegisterComponent extends Component {
<img className={"mt5"} src={passopens} onClick={(key) => this.Showandhide(key)}>
</img>
}></Input>
{
Phonenumberisnotcosymmm && Phonenumberisnotcosymmm!== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosymmm}</span>
</p>
: ""
}
<Checkbox onChange={this.onChange}
value={Agreetotheterms}
><span className="font-14 " style={{
color: '#676767',
}}>我已阅读并同意服务协议条款</span></Checkbox>
{
Phonenumberisnotcosyfwtk && Phonenumberisnotcosyfwtk!== "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcosyfwtk}</span>
</p>
: ""
}
<Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postregistered()}
size={"large"}>注册</Button>

@ -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,

@ -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'
@ -202,6 +202,10 @@ 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{
</span>
<Dragger {...uploadProps2}>
{imageUrl2 ?
<a href={imageUrl2} target="_blank" title="点击重新上传图片">
// <a href={imageUrl2} target="_blank" title="点击重新上传图片"></a>
<img src={imageUrl2} alt="avatar" style={{ maxHeight: '110px'}}/>
</a> :
:
<React.Fragment>
<p className="ant-upload-drag-icon">
<i className="iconfont icon-cuban2shangchuanyunduan" style={{color:"#4B667F",font:"42px"}}></i>
@ -311,7 +315,9 @@ class RealNameCertificationModal extends Component{
<div className="df mt10 color-grey-9" style={{ justifyContent: 'center' }} >
<span className="fl mr20 edu-txt-center" style={{width:"160px"}}>示例图片</span>
<span className="fl edu-txt-center mr20" style={{width:"160px"}}>
<a href="javascript:void(0)" className="color-orange" style={{borderBottom:"1px solid #ff6800"}}>查看大图</a>
<ImageLayerHook parentSel={'#imageLayerBtn'} parentSel={'#imageLayerBtn'}
></ImageLayerHook>
<a href="javascript:void(0)" id="imageLayerBtn" src={imageUrl || imageUrl2} className="color-orange" style={{borderBottom:"1px solid #ff6800"}}>查看大图</a>
</span>
</div>
</div>

@ -0,0 +1,219 @@
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,markdownToHTML,getImageUrl} 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,
keywords:"python",
type:"",
page:1,
perpages:20,
data:[],
}
}
//切换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,
// })
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,data,page,perpages}=this.state;
console.log(tab);
return(
<div className="newMain clearfix">
<div className="headersear" >
<div style={{height:"53px"}}></div>
<Search
style={{ width: "800px", marginTop:"53px"}}
className="packinput"
enterButton={<span><Icon type="search" className="mr5"/> 搜索</span>}
onSearch={ (value)=>this.setdatafuns(value)} />
</div>
<div className="tabtitle">
<div className="tabtitles2">
<Menu mode="horizontal" className="tabtitless" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item className={"tabtitle1"} key="0">开发社区</Menu.Item>
<Menu.Item className={"tabtitle2"} key="1">实践课程</Menu.Item>
<Menu.Item className={"tabtitle2"} key="2">翻转课堂</Menu.Item>
<Menu.Item className={"tabtitle2"} key="3">交流问答</Menu.Item>
</Menu>
</div>
</div>
{
JSON.stringify(data) === "[]" ?
<div id="forum_list" className="forum_table">
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示</p>
</div>
</div>
</div>
:
<div>
<div className="counttit">
<p className="counttittext">共找到相关结果<span className="counttittexts">{count}</span></p>
</div>
<div className="mainx">
<div className="educontent project-packages-list mb30">
{data === undefined ? "" : data.map((item, key) => {
return (
<div className="project-package-item">
<div className={"font-16 color-dark fl "} >
{/*标题*/}
<span className={"markdown-body fonttext"}
dangerouslySetInnerHTML={{__html:item.title}}/>
{/*描述*/}
<div>
{item.content.content === undefined || item.content.content===0?"": item.content.content.map((item4, key4) => {
return (
<span className={"markdown-body magr11 fontextcolor"}
dangerouslySetInnerHTML={{__html: item4}} />
)
})
}
</div>
<div>
{/*内容*/}
{item.content.description === undefined || item.content.description===0?"": item.content.description.map((item3, key3) => {
return (
<span className={"markdown-body magr11 fontextcolor"}
dangerouslySetInnerHTML={{__html: item3}} />
)
})
}
</div>
<div className="xuxianpro"></div>
<div>
{/*挑战名字*/}
{item.content.challenge_names === undefined || item.content.challenge_names===0?"": item.content.challenge_names.map((item5, key5) => {
return (
<span className={"markdown-body"}
dangerouslySetInnerHTML={{__html: item5}} />
)
})
}
</div>
<div>
{/*挑战标签*/}
{item.content.challenge_tag_names === undefined || item.content.challenge_tag_names===0?"": item.content.challenge_tag_names.map((item6, key6) => {
return (
<span className={key6>1?"markdown-body tzbq ":"markdown-body tzbqx"}
dangerouslySetInnerHTML={{__html:item6}} />
)
})
}
</div>
</div>
</div>
)
})}
</div>
</div>
<div className="mt20">
<span></span> <span></span> <span></span>
</div>
</div>
}
{
count && count && count> perpages ?
<div className="edu-txt-center" style={{paddingBottom:"30px"}}>
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={perpages}
total={count}></Pagination>
</div>
: ""
}
</div>
)
}
}
export default SnackbarHOC() (TPMIndexHOC ( SearchPage ));

@ -0,0 +1,117 @@
.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{
height: 62px !important;
box-shadow: 3px 10px 21px 0px rgba(76, 76, 76, 0.15);
border-radius: 6px;
background: #fff;
display: flex;
justify-content: center;
}
.tabtitles2{
background: #fff;
height: 62px !important;
width: 1200px;
}
.tabtitless{
height: 62px !important;
line-height: 62px !important;
}
.tabtitle1{
}
.tabtitle2{
margin-left: 30px !important;
}
.counttit{
display: flex;
justify-content: center;
}
.counttittext{
text-align: left;
width: 1200px;
height: 18px;
color: #888888;
font-size: 13px;
margin-top: 24px;
}
.counttittexts{
color: #4CACFF !important;
font-size: 13px;
}
.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;
}
Loading…
Cancel
Save