dev_aliyun
daiao 5 years ago
commit 0bf99af635

@ -67,7 +67,7 @@ class CollegesController < ApplicationController
user_extensions.`school_id`=#{@school.id}) and work_status between 1 and 2 and myshixun_id !=0").first.try(:sw_count)
@teachers = User.find_by_sql("SELECT users.id, users.login, users.lastname, users.firstname, users.nickname, IFNULL((SELECT count(shixuns.id) FROM shixuns where shixuns.user_id =users.id group by shixuns.user_id), 0) AS publish_shixun_count,
(SELECT count(c.id) FROM courses c, members m, member_roles mr WHERE c.id != 1309 and m.course_id = c.id AND m.id=mr.member_id AND mr.role_id in (3,7,9) AND m.user_id=users.id AND c.is_delete = 0) as course_count
(SELECT count(c.id) FROM courses c, members m, member_roles mr WHERE c.id != 1309 and m.course_id = c.id AND m.id=mr.member_id AND mr.role_id in (3,7,9) and c.school_id = #{@school.id} AND m.user_id=users.id AND c.is_delete = 0) as course_count
FROM `users`, user_extensions ue where users.id=ue.user_id and ue.identity=0 and ue.school_id=#{@school.id} ORDER BY publish_shixun_count desc, course_count desc, id desc LIMIT 10")
# ).order("publish_shixun_count desc, experience desc").limit(10)
@teachers =

@ -30,9 +30,19 @@
</div>
<div class="-task-sidebars" style="right: 240px !important;">
<div id="trophyreturn" class="-task-sidebars" style="right: 65px !important;width: 154px;">
<a onclick="trophyreturnfun();" id="closeIcon" style="position: absolute;right: 12px;top: 10px; color: #000;">
<i class="iconfont icon-shanchudiao"></i>
</a>
<a href="/competitions">
<img src="/images/educoder/competition/lvmeng.png" width="150px" height="150px">
</a>
</div>
<script>
function trophyreturnfun(){
$("#trophyreturn").hide()
}
</script>

@ -7,14 +7,20 @@ const $ = window.$;
class SiderBar extends Component {
constructor(props) {
super(props)
this.state = {
trophyreturn: false
}
}
componentDidMount() {
window._initSider();
}
trophyreturnfun=()=>{
this.setState({
trophyreturn:true
})
}
render() {
return (
<div>
@ -51,11 +57,15 @@ class SiderBar extends Component {
</div>
</div>
<div className="-task-sidebars" style={{right: "240px"}}>
{this.state.trophyreturn===true?"":<div className="-task-sidebars" style={{right: "65x",width: "154px"}}>
<a onClick={this.trophyreturnfun} id="closeIcon"
style={{position: "absolute", right: "12px",top:"10px",color: "#000"}}>
<i className="iconfont icon-shanchudiao"></i>
</a>
<a href="/competitions">
<img src={getImageUrl("images/educoder/competition/lvmeng.png")} width="150px" height="150px" />
</a>
</div>
</div>}
</div>
);

Loading…
Cancel
Save