Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_cs
cxt 5 years ago
commit 5a72c66db8

@ -109,7 +109,15 @@ class ShixunsHome extends Component {
homedatalistreps.push(homedatalist.reps[homedatalist.reps.length-i-1]) homedatalistreps.push(homedatalist.reps[homedatalist.reps.length-i-1])
} }
} }
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5;
// }
return <Rating {...rest} value={myValue} />;
};
return ( return (
<div className="newMain clearfix backFAFAFA shixunsHome"> <div className="newMain clearfix backFAFAFA shixunsHome">
{this.state.updata===undefined?"":<UpgradeModals {this.state.updata===undefined?"":<UpgradeModals
@ -343,7 +351,7 @@ class ShixunsHome extends Component {
<p className="clearfix mt8 ml-3"> <p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title=""> <span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf /> <MyRate key={key} allowHalf defaultValue={item.score_info===null?5:item.score_info} disabled/>
</span> </span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span> <span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span>
</p> </p>

@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
import { Rating ,Progress} from "@icedesign/base"; import { Rating ,Progress} from "@icedesign/base";
import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd'; import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip,Rate} from 'antd';
import AccountProfile from"../user/AccountProfile"; import AccountProfile from"../user/AccountProfile";
@ -569,6 +569,15 @@ class TPMBanner extends Component {
}; };
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />; const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5;
// }
return <Rating {...rest} value={myValue} />;
};
return ( return (
shixunsDetails===undefined?"": shixunsDetails===undefined?"":
@ -607,7 +616,22 @@ class TPMBanner extends Component {
</p> </p>
<div className="clearfix mt50"> <div className="clearfix mt50">
<ul className="fl color-grey-c pathInfo"> {/*<style>*/}
{/*{*/}
{/*`*/}
{/*.anticon-star{*/}
{/*font-size:14px;*/}
{/*}*/}
{/*.pathInfo{*/}
{/*margin-right:-5px;*/}
{/*}*/}
{/*.ant-rate{*/}
{/*color: #FFA800;*/}
{/*}*/}
{/*`*/}
{/*}*/}
{/*</style>*/}
<ul className="fl color-grey-c pathInfo" >
<li> <li>
<span>学习人数</span> <span>学习人数</span>
<span className="mt10">{shixunsDetails.stu_num}</span> <span className="mt10">{shixunsDetails.stu_num}</span>
@ -624,11 +648,11 @@ class TPMBanner extends Component {
</ul> </ul>
<div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()} onMouseOut={()=>this.hideonMouseOut()}> <div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()} onMouseOut={()=>this.hideonMouseOut()}>
<div className={"color-grey-c mb7"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div> <div className={"color-grey-c ml15"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div>
<div className="rateYo"> <div className="rateYo">
<Rating value={star_info[0]} disabled allowHalf/> <MyRate allowHalf defaultValue={star_info[0]} disabled/>
</div> </div>
<div id="ratePanel" className="showratePanel" style={{"width":"512px"}} onMouseOut={()=>this.hideonMouseOut()}> <div id="ratePanel" className="showratePanel" style={{"width":"530px"}} onMouseOut={()=>this.hideonMouseOut()}>
<div className="pr"> <div className="pr">
<span className="rateTrangle"></span> <span className="rateTrangle"></span>
<div className="pr clearfix ratePanelContent" style={{height: '177px'}}> <div className="pr clearfix ratePanelContent" style={{height: '177px'}}>
@ -639,16 +663,16 @@ class TPMBanner extends Component {
<span className="displayblock">总评分</span> <span className="displayblock">总评分</span>
<div className="rateYo"> <div className="rateYo">
{showradios === true ? {showradios === true ?
<Rating value={star_info[0]} allowHalf/> <MyRate allowHalf defaultValue={star_info[0]} disabled/>
: ""} : ""}
</div> </div>
</div> </div>
</div> </div>
<div className="fr width360"> <div className="fr">
<div className="clearfix"> <div className="clearfix">
<div className="rateYo fl mt3"> <div className="rateYo fl mt3">
{showradios === true ? {showradios === true ?
<Rating value={5} disabled allowHalf/> <MyRate allowHalf defaultValue={5} disabled/>
: ""} : ""}
</div> </div>
<Progress percent={star_infos[1]} showInfo={false}></Progress> <Progress percent={star_infos[1]} showInfo={false}></Progress>
@ -657,7 +681,7 @@ class TPMBanner extends Component {
<div className="clearfix"> <div className="clearfix">
<div className="rateYo fl mt3"> <div className="rateYo fl mt3">
{showradios === true ? {showradios === true ?
<Rating value={4} disabled allowHalf/> <MyRate allowHalf defaultValue={4} disabled/>
: ""} : ""}
</div> </div>
<Progress percent={star_infos[2]} showInfo={false}></Progress> <Progress percent={star_infos[2]} showInfo={false}></Progress>
@ -666,7 +690,7 @@ class TPMBanner extends Component {
<div className="clearfix"> <div className="clearfix">
<div className="rateYo fl mt3"> <div className="rateYo fl mt3">
{showradios === true ? {showradios === true ?
<Rating value={3} disabled allowHalf/> <MyRate allowHalf defaultValue={3} disabled/>
: ""} : ""}
</div> </div>
<Progress percent={star_infos[3]} showInfo={false}></Progress> <Progress percent={star_infos[3]} showInfo={false}></Progress>
@ -675,7 +699,7 @@ class TPMBanner extends Component {
<div className="clearfix"> <div className="clearfix">
<div className="rateYo fl mt3"> <div className="rateYo fl mt3">
{showradios === true ? {showradios === true ?
<Rating value={2} disabled allowHalf/> <MyRate allowHalf defaultValue={2} disabled/>
: ""} : ""}
</div> </div>
<Progress percent={star_infos[4]} showInfo={false}></Progress> <Progress percent={star_infos[4]} showInfo={false}></Progress>
@ -684,7 +708,7 @@ class TPMBanner extends Component {
<div className="clearfix"> <div className="clearfix">
<div className="rateYo fl mt3"> <div className="rateYo fl mt3">
{showradios === true ? {showradios === true ?
<Rating value={1} disabled allowHalf/> <MyRate allowHalf defaultValue={1} disabled/>
: ""} : ""}
</div> </div>
<Progress percent={star_infos[5]} showInfo={false}></Progress> <Progress percent={star_infos[5]} showInfo={false}></Progress>

@ -88,7 +88,15 @@ export default class TPMFork_listComponent extends Component {
let {shixuns, total_count, shixunsID, Forkvisible, Forkcurrent} = this.state; let {shixuns, total_count, shixunsID, Forkvisible, Forkcurrent} = this.state;
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5;
// }
return <Rating {...rest} value={myValue} />;
};
return ( return (
<React.Fragment> <React.Fragment>
<div className="educontent mb20"> <div className="educontent mb20">
@ -141,9 +149,9 @@ export default class TPMFork_listComponent extends Component {
</p> </p>
<p className="clearfix mt8 ml-3"> <p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title=""> <span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf /> <MyRate key={key} allowHalf defaultValue={item.score_info===null?5:item.score_info} disabled/>
</span> </span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span> <span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span>
</p> </p>

@ -1,47 +1,47 @@
.tpmComment .-fit { .tpmComment .-fit {
position: inherit; position: inherit;
} }
.tpmComment .rc-pagination { .tpmComment .rc-pagination {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
margin-top: 12px; margin-top: 12px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.tpmComment .paginationSection { .tpmComment .paginationSection {
background: #FAFAFA; background: #FAFAFA;
} }
.tpmComment .comment_item_cont.df.clearfix:nth-last-child(1) { .tpmComment .comment_item_cont.df.clearfix:nth-last-child(1) {
border-bottom: none; border-bottom: none;
} }
/*.tpmComment .fl.edu-back-white {*/ /*.tpmComment .fl.edu-back-white {*/
/*min-height: 600px;*/ /*min-height: 600px;*/
/*}*/ /*}*/
.user_watch_btn { .user_watch_btn {
cursor: pointer; cursor: pointer;
} }
/*md编辑器*/ /*md编辑器*/
.tpmComment .commentItemMDEditor a.task-btn { .tpmComment .commentItemMDEditor a.task-btn {
background: #4cacff!important; background: #4cacff!important;
margin-right: 16px; margin-right: 16px;
margin-top: 16px; margin-top: 16px;
} }
/* md编辑器 resizeBar*/ /* md编辑器 resizeBar*/
.tpmComment .commentItemMDEditor .editor__resize { .tpmComment .commentItemMDEditor .editor__resize {
transform: translateX(-176%) transform: translateX(-176%)
} }
#ratePanel > div > div > div.fr div.rateYo.fl.mt3 { #ratePanel > div > div > div.fr div.rateYo.fl.mt3 {
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
cursor: default; cursor: default;
width: 90px; width: 110px;
} }
.tpmComment .icon-jiangli { .tpmComment .icon-jiangli {
/* margin-top: 2px; */ /* margin-top: 2px; */
} }

@ -11,7 +11,7 @@ import { Rating ,Pagination} from "@icedesign/base";
import {getImageUrl,setImagesUrl, toPath} from 'educoder'; import {getImageUrl,setImagesUrl, toPath} from 'educoder';
import { Spin,Icon,Tooltip } from 'antd'; import { Spin,Icon,Tooltip ,Rate} from 'antd';
import './shixunCss/shixunCard.css'; import './shixunCss/shixunCard.css';
@ -46,6 +46,15 @@ class ShixunCard extends Component {
render() { render() {
let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props; let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props;
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5;
// }
return <Rating {...rest} value={myValue} />;
};
return ( return (
<div className="educontent mb80"> <div className="educontent mb80">
@ -69,10 +78,11 @@ class ShixunCard extends Component {
</div> </div>
<div className="mt10 mb20 clearfix" <div className="mt10 mb20 clearfix"
style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "none" : "block"}}> // style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "none" : "block"}}
>
<div className="shixun_list_content"> <div className="shixun_list_content">
<div className="square-list clearfix"> <div className="square-list clearfix">
{ middleshixundata===undefined?" ":middleshixundata.map((item,key)=>{ {middleshixundata === undefined || middleshixundata.length === 0?" ":middleshixundata.map((item,key)=>{
return( return(
<div className="square-Item" key={key} id={item.id}> <div className="square-Item" key={key} id={item.id}>
<style> <style>
@ -113,12 +123,27 @@ class ShixunCard extends Component {
</p> </p>
{/*target="_blank"*/} {/*target="_blank"*/}
{/*<style>*/}
{/*{*/}
{/*`*/}
{/*.anticon-star{*/}
{/*font-size:16px;*/}
{/*}*/}
{/*.pathInfo{*/}
{/*margin-right:-5px;*/}
{/*}*/}
{/*.ant-rate{*/}
{/*color: #FFA800;*/}
{/*}*/}
{/*`*/}
{/*}*/}
{/*</style>*/}
<p className="clearfix mt8 ml-3"> <p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title=""> <span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<Rating value={item.score_info===null?5:item.score_info} disabled allowHalf /> {/*<Rate allowHalf value={item.score_info===null?5:item.score_info} disabled key={key} />*/}
<MyRate key={key} allowHalf defaultValue={item.score_info===null?5:item.score_info} disabled/>
</span> </span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span> <span className="fl ml25 font-12 color-grey-9 lineh-12 mt5">{item.score_info===null?"5分":item.score_info+"分"}</span>
</p> </p>
<p className="clearfix mt8 font-12 color-grey-B4"> <p className="clearfix mt8 font-12 color-grey-B4">

@ -8,7 +8,7 @@
.rateYo{ .rateYo{
text-align: center; text-align: center;
cursor: default; cursor: default;
width: 90px; width: 111px;
} }
a:link, a:visited { a:link, a:visited {

Loading…
Cancel
Save