imageUrl + /

This commit is contained in:
caishi 2021-04-23 14:14:06 +08:00
parent 63da7adcf9
commit 383b3f5d74
15 changed files with 34 additions and 34 deletions

View File

@ -64,7 +64,7 @@ function CommentItem({
const commentAvatar = (author) => (
<img
className="item-flex flex-image"
src={author.image_url ? getImageUrl(`images/${author.image_url}`) : 'https://b-ssl.duitang.com/uploads/item/201511/13/20151113110434_kyReJ.jpeg'}
src={author.image_url ? getImageUrl(`/${author.image_url}`) : 'https://b-ssl.duitang.com/uploads/item/201511/13/20151113110434_kyReJ.jpeg'}
alt=""
/>
);

View File

@ -52,7 +52,7 @@ function Contributors({contributors,owner,projectsId,id,showNotification}){
<Spin spinning={isSpin}>
<FlexAJ>
<AlignCenter>
<Link to={`/users/${data.login}`}><img src={getImageUrl(data.image_url)} alt="" className="radius" width="38px" height="38px"/></Link>
<Link to={`/users/${data.login}`}><img src={getImageUrl(`/${data.image_url}`)} alt="" className="radius" width="38px" height="38px"/></Link>
<Link to={`/users/${data.login}`} className="ml10">{data.name}</Link>
</AlignCenter>
{
@ -96,7 +96,7 @@ function Contributors({contributors,owner,projectsId,id,showNotification}){
axios({
method: flag ? 'post' : 'delete',
url: `/watchers/${flag ? 'follow' : 'unfollow'}.json`,
params: {target_type: "project",id}
params: {target_type: "user",id:login}
}).then(result => {
if (result && (result.data.status === 0 || result.data.status === 2)) {
let a = menuList && menuList.filter(i=>i.login === login);

View File

@ -217,7 +217,7 @@ function Index(props){
data.map((item,key)=>{
return(
<li>
<Link to= {`/users/${item.login}`} className="infoImg"><img src={getImageUrl(`${item.imageUrl}`)} alt="" /></Link>
<Link to= {`/users/${item.login}`} className="infoImg"><img src={getImageUrl(`/${item.imageUrl}`)} alt="" /></Link>
<div style={{flex:'1',width:"0"}}>
<FlexAJ>
<AlignCenter>

View File

@ -16,7 +16,7 @@ class http500 extends Component {
<div className="newMain clearfix">
<div className=" edu-txt-center mt60 mb60">
{/*mt100 mb100*/}
<img src={getImageUrl("images/warn/pic_404.jpg")} />
<img src={getImageUrl("/images/warn/pic_404.jpg")} />
<p className="font-18 mt40">
您可以稍后尝试&nbsp;<a href="/"
className="color-blue">返回首页</a>

View File

@ -78,7 +78,7 @@ class CompetitionsIndex extends Component{
.courses-head{
width: 100%;
height: 300px;
background-image: url(${getImageUrl(this.props.mygetHelmetapi && this.props.mygetHelmetapi.competition_banner_url === null ?`images/educoder/competitions/courses.jpg`:this.props.mygetHelmetapi&&this.props.mygetHelmetapi.competition_banner_url)});
background-image: url(${getImageUrl(this.props.mygetHelmetapi && this.props.mygetHelmetapi.competition_banner_url === null ?`/images/educoder/competitions/courses.jpg`:this.props.mygetHelmetapi&&this.props.mygetHelmetapi.competition_banner_url)});
background-color: #081C4B;
background-position: center;
background-repeat: no-repeat;

View File

@ -358,10 +358,10 @@ class CompetitionCommon extends Component{
data && data.permission.editable === true ? "" :
<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div> : ""}
<img className={"Commonimg"}
src={data.competition_status === "ended" ? getImageUrl(`images/educoder/competitions/groups1.png`) : data.competition_status === "nearly_published" ? getImageUrl(`images/educoder/competitions/groups2.png`) : data.competition_status === "progressing" ? getImageUrl(`images/educoder/competitions/groups3.png`) : ""}/>
src={data.competition_status === "ended" ? getImageUrl(`/images/educoder/competitions/groups1.png`) : data.competition_status === "nearly_published" ? getImageUrl(`images/educoder/competitions/groups2.png`) : data.competition_status === "progressing" ? getImageUrl(`images/educoder/competitions/groups3.png`) : ""}/>
<Col span={15} className={"Commonimgbox"}>
<img className={"image_urlbox"}
src={data === undefined ? getImageUrl(`images/educoder/competitions/mainbanner.jpg`) : data.avatar_url === null ? getImageUrl(`images/educoder/competitions/mainbanner.jpg`) : getImageUrl(data.avatar_url)}/>
src={data === undefined ? getImageUrl(`/images/educoder/competitions/mainbanner.jpg`) : data.avatar_url === null ? getImageUrl(`/images/educoder/competitions/mainbanner.jpg`) : getImageUrl(data.avatar_url)}/>
</Col>
<Col className={"CompetitionCommonbannerfont"} span={9}>

View File

@ -249,11 +249,11 @@ class CompetitionContents extends Component{
cover={
<div className={"Competitionfirstbox center"}>
<li className="pr Competitioncenter">
<img src={getImageUrl("images/educoder/huangguan.png")}/>
<img src={getImageUrl("/images/educoder/huangguan.png")}/>
<div className={"mt10"}>
<a href={`/users/${item.user_login}`} target={"_blank"} className="color-dark">
<div className={"relativef"}>
<img className={"rankingimg"} src={getImageUrl(`images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} />
<img className={"rankingimg"} src={getImageUrl(`/images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} />
<div className={"competimgabsolute"}><Badge count={item.competition_prize} style={{ backgroundColor: '#459BE5' }} title={item.competition_prize}/></div>
</div>
<p className="task-hide rankName mt5 jinshaifont">{personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name}</p>

View File

@ -171,7 +171,7 @@ class CoursesHome extends Component {
coursesHomelist={coursesHomelist}></CoursesHomeCard>}
{coursesHomelist === undefined ? "" : coursesHomelist.courses.length === 0 ? <div className="edu-tab-con-box clearfix edu-txt-center mb50">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")} />
<img className="edu-nodata-img mb20" src={getImageUrl("/images/educoder/nodata.png")} />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p>
</div> : ""}

View File

@ -295,7 +295,7 @@ class Listofworksstudentone extends Component {
计算规则:<br/>
学员离开实训学习界面停止计时<br/>
评测首次通过之后停止计时<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'cost_time',
key: 'cost_time',
align: 'center',
@ -381,7 +381,7 @@ class Listofworksstudentone extends Component {
title:<span>关卡得分<Tooltip placement="top" title={<pre>
计算规则:<br/>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'final_score',
key: 'final_score',
align: 'center',
@ -420,7 +420,7 @@ class Listofworksstudentone extends Component {
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
工作效率 * 分值<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -694,7 +694,7 @@ class Listofworksstudentone extends Component {
计算规则:<br/>
学员离开实训学习界面停止计时<br/>
评测首次通过之后停止计时<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'cost_time',
key: 'cost_time',
align: 'center',
@ -780,7 +780,7 @@ class Listofworksstudentone extends Component {
title:<span>关卡得分<Tooltip placement="top" title={<pre>
计算规则:<br/>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'final_score',
key: 'final_score',
align: 'center',
@ -819,7 +819,7 @@ class Listofworksstudentone extends Component {
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
工作效率 * 分值<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -1050,7 +1050,7 @@ class Listofworksstudentone extends Component {
计算规则:<br/>
学员离开实训学习界面停止计时<br/>
评测首次通过之后停止计时<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'cost_time',
key: 'cost_time',
align: 'center',
@ -1134,7 +1134,7 @@ class Listofworksstudentone extends Component {
title:<span>关卡得分<Tooltip placement="top" title={<pre>
计算规则:<br/>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'final_score',
key: 'final_score',
align: 'center',
@ -1167,7 +1167,7 @@ class Listofworksstudentone extends Component {
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
工作效率 * 分值<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -1210,7 +1210,7 @@ class Listofworksstudentone extends Component {
title: <span>当前成绩<Tooltip placement="top"title={<pre>
鼠标停留具体分值上可查<br/>
看得分明细<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'work_score',
key: 'work_score',
align: 'center',
@ -1461,7 +1461,7 @@ class Listofworksstudentone extends Component {
计算规则:<br/>
学员离开实训学习界面停止计时<br/>
评测首次通过之后停止计时<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'cost_time',
key: 'cost_time',
align: 'center',
@ -1524,7 +1524,7 @@ class Listofworksstudentone extends Component {
title:<span>关卡得分<Tooltip placement="top" title={<pre>
计算规则:<br/>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'final_score',
key: 'final_score',
align: 'center',
@ -1557,7 +1557,7 @@ class Listofworksstudentone extends Component {
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
工作效率 * 分值<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -1600,7 +1600,7 @@ class Listofworksstudentone extends Component {
title: <span>当前成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/>
看得分明细<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
</pre>}><img src={getImageUrl("/images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'work_score',
key: 'work_score',
align: 'center',
@ -3898,7 +3898,7 @@ class Listofworksstudentone extends Component {
<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")}/>
<img className="edu-nodata-img mb20" src={getImageUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
</div>
</div>
@ -4175,7 +4175,7 @@ class Listofworksstudentone extends Component {
<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")}/>
src={getImageUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
</div>
</div>
@ -4409,7 +4409,7 @@ class Listofworksstudentone extends Component {
<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")}/>
src={getImageUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
</div>
</div>

View File

@ -514,7 +514,7 @@ class ShixunWorkReport extends Component {
<div className="fl edu-back-white ml10 ">
<img alt="头像" className="radius" height="91" id="nh_user_logo" name="avatar_image"
src={ getImageUrl(`images/${data&&data.image_url}`)}
src={ getImageUrl(`/${data&&data.image_url}`)}
width="91"/>
</div>

View File

@ -266,7 +266,7 @@ class ShixunWorkModal extends Component{
<div id="forum_list" className="forum_table">
<div className=" 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")}/>
<img className="edu-nodata-img mb20" src={getImageUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">暂时还没有相关数据哦</p>
</div>
</div>

View File

@ -193,7 +193,7 @@ class Messagerouting extends Component{
<a >
{
this.props.current_user!== undefined?
<img className="person radius myw120 myh120" src={getImageUrl("images/"+this.props.current_user.image_url)}/>
<img className="person radius myw120 myh120" src={getImageUrl("/images/"+this.props.current_user.image_url)}/>
:""
}

View File

@ -333,7 +333,7 @@ class InfosProject extends Component {
{
item.can_visited == false ?
<div className="closeSquare">
<img src={getImageUrl("images/educoder/icon/lockclose.svg")} className="mt80 mb25" />
<img src={getImageUrl("/images/educoder/icon/lockclose.svg")} className="mt80 mb25" />
<p className="font-14 color-white">非成员不能访问</p>
</div> : ""
}

View File

@ -332,7 +332,7 @@ class Projects extends Component{
{
item.can_visited ==false?
<div className="closeSquare">
<img src={getImageUrl("images/educoder/icon/lockclose.svg")} className="mt80 mb25"/>
<img src={getImageUrl("/images/educoder/icon/lockclose.svg")} className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p>
</div>:""
}

View File

@ -170,7 +170,7 @@ class SearchPage extends Component{
<div id="forum_list" className="forum_table">
<div className="mh650 bjyss">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<img className="edu-nodata-img mb20" src={getImageUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">暂时还没有相关数据哦</p>
</div>
</div>