dev_aliyun
cxt 5 years ago
commit d9e6af96df

@ -25,7 +25,15 @@ class CompetitionsController < ApplicationController
end end
def index def index
@competitions = Competition.where('status = 1 or published_at is not null').reorder("published_at desc, online_time desc") competitions = Competition.where('status = 1 or published_at is not null')
case params[:category]
when 'progressing' then
competitions = competitions.where('end_time > NOW()')
when 'ended' then
competitions = competitions.where('end_time < NOW()')
end
@competitions = competitions.reorder("published_at desc, online_time desc")
respond_to do |format| respond_to do |format|
format.html { render :layout => "base_edu"} format.html { render :layout => "base_edu"}
format.js format.js

@ -1083,7 +1083,12 @@ end
def enroll_list def enroll_list
@order = params[:order].blank? ? "desc" : params[:order] @order = params[:order].blank? ? "desc" : params[:order]
@competition = Competition.where(:id => params[:competition]).first @competition = Competition.where(:id => params[:competition]).first
@team_members = @competition.team_members.includes(:user => [:user_extensions => [:school]])
@only_teacher = @competition.competition_staffs.count == 1 && @competition.competition_staffs.first.category == 'teacher'
@team_members = @competition.team_members
@team_members = @team_members.where(is_teacher: false) unless @only_teacher # 只有老师报名时才显示老师,此时老师作为队员
if params[:school] || params[:location] if params[:school] || params[:location]
school_ids = School.where("schools.name like '%#{params[:school]}%'").pluck(:id) school_ids = School.where("schools.name like '%#{params[:school]}%'").pluck(:id)
school_ids = school_ids.size == 0 ? "(-1)" : "(" + school_ids.join(",") + ")" school_ids = school_ids.size == 0 ? "(-1)" : "(" + school_ids.join(",") + ")"
@ -1093,7 +1098,7 @@ end
@page = params[:page] || 1 @page = params[:page] || 1
@team_members = @team_members.reorder("team_members.created_at #{@order}") @team_members = @team_members.reorder("team_members.created_at #{@order}")
all_members = @team_members all_members = @team_members
@team_members = paginateHelper @team_members, 50 @team_members = paginateHelper(@team_members.includes(competition_team: [:user, teachers: :user], user: { user_extensions: :school }), 50)
respond_to do |format| respond_to do |format|
format.js format.js
format.html format.html

@ -2996,6 +2996,8 @@ module ApplicationHelper
else else
title << "教学案例" title << "教学案例"
end end
elsif params[:controller] == "project_packages"
title << "众包社区"
elsif @course elsif @course
title << (@course.name.nil? ? "课堂" : @course.name) title << (@course.name.nil? ? "课堂" : @course.name)
elsif params[:controller] == "homework_bank" || params[:controller] == "question_banks" || params[:controller] == "exercise_bank" elsif params[:controller] == "homework_bank" || params[:controller] == "question_banks" || params[:controller] == "exercise_bank"
@ -7468,7 +7470,7 @@ def tiding_url tiding
tiding.tiding_type == 'Apply' ? library_applies_path : library_path(tiding.container_id) tiding.tiding_type == 'Apply' ? library_applies_path : library_path(tiding.container_id)
when 'ProjectPackage' when 'ProjectPackage'
if tiding.container.present? if tiding.container.present?
tiding.tiding_type == 'Apply' ? project_package_applies_path : "/project_packages/#{tiding.container_id}" tiding.tiding_type == 'Apply' ? project_package_applies_path : "/crowdsourcing/#{tiding.container_id}"
else else
'javascript:void(0)' 'javascript:void(0)'
end end

@ -2,7 +2,7 @@ module LibrariesHelper
def show_library_tags(library) def show_library_tags(library)
html = '' html = ''
library.library_tags.each do |tag| library.library_tags.each do |tag|
html += content_tag(:span, tag.name, class: "edu-filter-btn fl cdefault mt3 ml10 " + library_tag_class(tag)) html += content_tag(:span, tag.name, class: "edu-filter-btn fl cdefault mt3 ml10 #{library_tag_class(tag)}")
end end
raw html raw html

@ -0,0 +1,100 @@
<% if @competitions.count > 0 %>
<div class="clearfix competitionsList">
<% @competitions.each do |competition| %>
<% if competition.status? %>
<div class="competitionsList-item mb20">
<div class="edu-back-white pr">
<% if competition.enroll_end_time.present? && competition.enroll_end_time > Time.now %>
<div class="applycompetitions">报名中</div>
<% end %>
<a href="<%= competition_path(competition) %>" class="competition-Img" target="_blank">
<%= image_tag(url_to_avatar(competition), :width => "100%", :height => "100%") %>
</a>
<div class="pt20 pl20 mb10 clearfix">
<a href="<%= competition_path(competition) %>" style="max-width: 400px;" class="font-16 task-hide fl" target="_blank"><%= [competition.name, competition.sub_title.presence].compact.join('——') %></a>
<% if competition.start_time > Time.now %>
<% unless competition.enroll_end_time.present? && competition.enroll_end_time < Time.now %>
<div class="fr status-orange">
<img src="/images/educoder/competition/home/orange.png" class="fl">
<span class="status-tag fl">报名中</span>
</div>
<% else %>
<div class="fr status-blue">
<img src="/images/educoder/competition/home/blue.png" class="fl">
<span class="status-tag fl">即将开始</span>
</div>
<% end %>
<% elsif competition.end_time < Time.now %>
<div class="fr status-grey">
<img src="/images/educoder/competition/home/grey.png" class="fl">
<span class="status-tag fl">已结束</span>
</div>
<% else %>
<% max_min_stage = max_min_stage_time competition %>
<% if max_min_stage.count == 1 %>
<div class="fr status-blue">
<img src="/images/educoder/competition/home/blue.png" class="fl">
<span class="status-tag fl">距离结束还剩<%= how_much_day competition.end_time %></span>
</div>
<% else %>
<% max_min_stage.each do |stage| %>
<% if stage.min_start_time > Time.now %>
<div class="fr status-blue">
<img src="/images/educoder/competition/home/blue.png" class="fl">
<span class="status-tag fl"><%= stage.competition_stage.name %>即将开始</span>
</div>
<% break %>
<% elsif stage.max_end_time > Time.now %>
<div class="fr status-blue">
<img src="/images/educoder/competition/home/blue.png" class="fl">
<span class="status-tag fl"><%= stage.competition_stage.name %>正在进行</span>
</div>
<% break %>
<% end %>
<% end %>
<% end %>
<% end %>
</div>
<p class="color-grey-B3 clearfix pl20 pr20 pb20">
<span class="fl"><span><%= format_date competition.start_time %></span>&nbsp;~&nbsp;<span><%= com_end_date competition.end_time %></span></span>
<span class="fr">
<span class="fl cdefault" data-tip-down="浏览数"><i class="iconfont icon-liulanyan font-16 fl mr3"></i><span class="font-12 mt3 fl"><%= competition.visits %></span></span>
<% if competition.member_count > 0 %>
<span class="ml30 fl cdefault" data-tip-down="报名数"><i class="iconfont icon-chengyuan font-16 fl mr3"></i>
<span class="font-12 mt4 fl">
<%= competition.identifier == "hn" ? 1125 : competition.member_count %>
</span>
</span>
<% end %>
</span>
</p>
</div>
</div>
<% elsif competition.published_at.present? %>
<% url = admin_or_business? ? competition_path(competition) : 'javascript:void(0)' %>
<div class="competitionsList-item mb20">
<div class="edu-back-white">
<a href="<%= url %>" class="competition-Img">
<%= image_tag(url_to_avatar(competition), :width => "100%", :height => "100%") %>
</a>
<div class="pt30 pb30 pl20 mt2 clearfix">
<a href="<%= url %>" style="max-width: 400px;" class="font-16 task-hide fl"><%= [competition.name, competition.sub_title.presence].compact.join('——') %></a>
<div class="fr status-orange">
<img src="/images/educoder/competition/home/orange.png" class="fl">
<span class="status-tag fl">即将发布</span>
</div>
</div>
<p class="color-grey-B3 clearfix pl20 pr20 pb20"></p>
</div>
<div class="competitionsList-item-tip strongNone">
<div class="color-white font-26">
<p>即将发布</p><p>敬请期待</p>
</div>
</div>
</div>
<% end %>
<% end %>
</div>
<% else %>
<%= render :partial => "welcome/no_data" %>
<% end %>

@ -1,101 +1,19 @@
<div class="educontent mt20 mb80"> <div class="educontent mt20 mb80">
<% if @competitions.count > 0 %>
<div class="clearfix competitionsList"> <div class="mt20 mb20 clearfix">
<% @competitions.each do |competition| %> <%= link_to '全部', competitions_path(category: ''), remote: true,
<% if competition.status? %> class: "fl mr20 font-16 bestChoose shixun_repertoire #{params[:category].blank? ? 'active' : ''}" %>
<div class="competitionsList-item mb20"> <%= link_to '进行中', competitions_path(category: 'progressing'), remote: true,
<div class="edu-back-white"> class: "fl mr20 font-16 bestChoose shixun_repertoire #{params[:category] == 'progressing' ? 'active' : ''}" %>
<a href="<%= competition_path(competition) %>" class="competition-Img" target="_blank"> <%= link_to '往期比赛', competitions_path(category: 'ended'), remote: true,
<%= image_tag(url_to_avatar(competition), :width => "100%", :height => "100%") %> class: "fl mr20 font-16 bestChoose shixun_repertoire #{params[:category] == 'ended' ? 'active' : ''}" %>
</a> </div>
<div class="pt20 pl20 mb10 clearfix">
<a href="<%= competition_path(competition) %>" style="max-width: 400px;" class="font-16 task-hide fl" target="_blank"><%= [competition.name, competition.sub_title.presence].compact.join('——') %></a> <div class="competition-list">
<% if competition.start_time > Time.now %> <%= render 'competitions/competition_list' %>
<% unless competition.enroll_end_time.present? && competition.enroll_end_time < Time.now %> </div>
<div class="fr status-orange">
<img src="/images/educoder/competition/home/orange.png" class="fl">
<span class="status-tag fl">报名中</span>
</div>
<% else %>
<div class="fr status-blue">
<img src="/images/educoder/competition/home/blue.png" class="fl">
<span class="status-tag fl">即将开始</span>
</div>
<% end %>
<% elsif competition.end_time < Time.now %>
<div class="fr status-grey">
<img src="/images/educoder/competition/home/grey.png" class="fl">
<span class="status-tag fl">已结束</span>
</div>
<% else %>
<% max_min_stage = max_min_stage_time competition %>
<% if max_min_stage.count == 1 %>
<div class="fr status-blue">
<img src="/images/educoder/competition/home/blue.png" class="fl">
<span class="status-tag fl">距离结束还剩<%= how_much_day competition.end_time %></span>
</div>
<% else %>
<% max_min_stage.each do |stage| %>
<% if stage.min_start_time > Time.now %>
<div class="fr status-blue">
<img src="/images/educoder/competition/home/blue.png" class="fl">
<span class="status-tag fl"><%= stage.competition_stage.name %>即将开始</span>
</div>
<% break %>
<% elsif stage.max_end_time > Time.now %>
<div class="fr status-blue">
<img src="/images/educoder/competition/home/blue.png" class="fl">
<span class="status-tag fl"><%= stage.competition_stage.name %>正在进行</span>
</div>
<% break %>
<% end %>
<% end %>
<% end %>
<% end %>
</div>
<p class="color-grey-B3 clearfix pl20 pr20 pb20">
<span class="fl"><span><%= format_date competition.start_time %></span>&nbsp;~&nbsp;<span><%= com_end_date competition.end_time %></span></span>
<span class="fr">
<span class="fl cdefault" data-tip-down="浏览数"><i class="iconfont icon-liulanyan font-16 fl mr3"></i><span class="font-12 mt3 fl"><%= competition.visits %></span></span>
<% if competition.member_count > 0 %>
<span class="ml30 fl cdefault" data-tip-down="报名数"><i class="iconfont icon-chengyuan font-16 fl mr3"></i>
<span class="font-12 mt4 fl">
<%= competition.identifier == "hn" ? 1125 : competition.member_count %>
</span>
</span>
<% end %>
</span>
</p>
</div>
</div>
<% elsif competition.published_at.present? %>
<% url = admin_or_business? ? competition_path(competition) : 'javascript:void(0)' %>
<div class="competitionsList-item mb20">
<div class="edu-back-white">
<a href="<%= url %>" class="competition-Img">
<%= image_tag(url_to_avatar(competition), :width => "100%", :height => "100%") %>
</a>
<div class="pt30 pb30 pl20 mt2 clearfix">
<a href="<%= url %>" style="max-width: 400px;" class="font-16 task-hide fl"><%= [competition.name, competition.sub_title.presence].compact.join('——') %></a>
<div class="fr status-orange">
<img src="/images/educoder/competition/home/orange.png" class="fl">
<span class="status-tag fl">即将发布</span>
</div>
</div>
<p class="color-grey-B3 clearfix pl20 pr20 pb20"></p>
</div>
<div class="competitionsList-item-tip strongNone">
<div class="color-white font-26">
<p>即将发布</p><p>敬请期待</p>
</div>
</div>
</div>
<% end %>
<% end %>
</div>
<% else %>
<%= render :partial => "welcome/no_data" %>
<% end %>
</div> </div>
<script> <script>
$(function(){ $(function(){

@ -0,0 +1 @@
$(".competition-list").html("<%= j(render :partial => 'competitions/competition_list') %>");

@ -1,7 +1,9 @@
<% group_mode = @competition.competition_staffs.sum(:maximum) > 1 %>
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0"> <table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0">
<thead> <thead>
<th>序号</th> <th>序号</th>
<% if @competition.max_num > 1 %> <% if group_mode %>
<th>创建者</th>
<th>战队名称</th> <th>战队名称</th>
<th>指导老师</th> <th>指导老师</th>
<th>队员姓名</th> <th>队员姓名</th>
@ -20,9 +22,10 @@
<% member_user = member.user %> <% member_user = member.user %>
<tr> <tr>
<td><%= (@page.to_i - 1)*50 + index + 1 %></td> <td><%= (@page.to_i - 1)*50 + index + 1 %></td>
<% if @competition.max_num > 1 %> <% if group_mode %>
<td><%= member.competition_team.user.show_real_name %></td>
<td><%= member.competition_team.try(:name) %></td> <td><%= member.competition_team.try(:name) %></td>
<td><%= member.competition_team.teacher.try(:show_real_name) %></td> <td><%= member.competition_team.teachers.map{|t| t.user.show_real_name}.join(',') %></td>
<% end %> <% end %>
<td><%= member_user.try(:show_real_name) %></td> <td><%= member_user.try(:show_real_name) %></td>
<td><%= member_user.try(:student_id) %></td> <td><%= member_user.try(:student_id) %></td>

@ -57,7 +57,7 @@ RedmineApp::Application.routes.draw do ## oauth相关
get :publish_success, on: :collection get :publish_success, on: :collection
end end
resources :project_packages, only: [:index, :show, :new, :edit, :destroy] do resources :project_packages, path: 'crowdsourcing', only: [:index, :show, :new, :edit, :destroy] do
get :apply_success, on: :member get :apply_success, on: :member
end end

@ -225,7 +225,7 @@ class App extends Component {
<Route path="/fork_list" component={TPMshixunfork_listIndexComponent}> <Route path="/fork_list" component={TPMshixunfork_listIndexComponent}>
</Route> */} </Route> */}
{/*众包*/} {/*众包*/}
<Route path={"/project_packages"} component={ProjectPackages}/> <Route path={"/crowdsourcing"} component={ProjectPackages}/>
<Route path="/forums" component={ForumsIndexComponent}> <Route path="/forums" component={ForumsIndexComponent}>
</Route> </Route>

@ -26,9 +26,9 @@ class NotFoundPage extends Component {
| |
<Link to="/demo">上海社区</Link> <Link to="/demo">上海社区</Link>
| |
<Link to={"/project_packages"}>zb</Link> <Link to={"/crowdsourcing"}>zb</Link>
| |
<Link to={"/project_packages/new"}>zbne</Link> <Link to={"/crowdsourcing/new"}>zbne</Link>
</div> </div>

File diff suppressed because one or more lines are too long

@ -51,6 +51,7 @@ class PackageConcent extends Component {
//否 string 排序,默认最新, recently, price //否 string 排序,默认最新, recently, price
// 否 string 类型, front,backend,mobile,database, cloud_compute_and_big_data,devops_and_test,ai,other // 否 string 类型, front,backend,mobile,database, cloud_compute_and_big_data,devops_and_test,ai,other
componentDidMount() { componentDidMount() {
window.document.title = '众包社区'
let {category,keyword,sort_by,sort_direction,page}=this.state let {category,keyword,sort_by,sort_direction,page}=this.state
this.setdatas(category,keyword,sort_by,sort_direction,page) this.setdatas(category,keyword,sort_by,sort_direction,page)
@ -136,7 +137,7 @@ class PackageConcent extends Component {
let {data,page,category,sort_by,sort_direction,project_packages}=this.state; let {data,page,category,sort_by,sort_direction,project_packages}=this.state;
return ( return (
<div className="educontent clearfix" style={{flex: "1 0 auto"}}> <div className="educontent clearfix mtf10" style={{flex: "1 0 auto"}}>
<div className="stud-class-set"> <div className="stud-class-set">
<div className="news"> <div className="news">
@ -156,14 +157,14 @@ class PackageConcent extends Component {
enterButton={<span><Icon type="search" className="mr5"/> 搜索</span>} enterButton={<span><Icon type="search" className="mr5"/> 搜索</span>}
onSearch={ (value)=>this.setdatafuns(value)} /> onSearch={ (value)=>this.setdatafuns(value)} />
<Button type="primary" className="setissues fr" size={"large"}> <Button type="primary" className="setissues fr" size={"large"}>
<a href="/project_packages/new" >发布需求</a> <a href="/crowdsourcing/new" >发布需求</a>
</Button> </Button>
</p> </p>
</p> </p>
</div> </div>
</div> </div>
<div className="edu-back-white mb20"> <div className="edu-back-white mb30">
<p className="clearfix padding30"> <p className="clearfix padding30">
<p className="clearfix mb30 shaiContent"> <p className="clearfix mb30 shaiContent">
<span className="shaiTitle fl mt3">类型</span> <span className="shaiTitle fl mt3">类型</span>
@ -208,7 +209,7 @@ class PackageConcent extends Component {
{project_packages&&project_packages.map((item,key)=>{ {project_packages&&project_packages.map((item,key)=>{
return( return(
<div className="educontent project-packages-list" key={key}> <div className="educontent project-packages-list mb30" key={key}>
<div className="project-package-item"> <div className="project-package-item">
@ -222,7 +223,7 @@ class PackageConcent extends Component {
<div className=" item-head-title"> <div className=" item-head-title">
<a className={"fl mt3 font-20 font-bd color-dark maxwidth700 "} <a className={"fl mt3 font-20 font-bd color-dark maxwidth700 "}
href={"/project_packages/"+item.id} href={"/crowdsourcing/"+item.id}
title={item.title} title={item.title}
>{item.title}</a> >{item.title}</a>
</div> </div>
@ -238,7 +239,7 @@ class PackageConcent extends Component {
</div> </div>
<div className=" item-category"> <div className=" item-category mt10">
<div className=" item-category-item">{item.category_name}</div> <div className=" item-category-item">{item.category_name}</div>
</div> </div>

@ -11,7 +11,7 @@ class PackageIndex extends Component{
} }
componentDidMount(){ componentDidMount(){
window.document.title = '众包社区'
} }
render() { render() {

@ -49,6 +49,7 @@ class PackageIndexNEITaskDetails extends Component {
componentDidMount() { componentDidMount() {
this.getdatas() this.getdatas()
window.document.title = '众包社区'
} }
getdatas=()=>{ getdatas=()=>{
@ -250,7 +251,7 @@ class PackageIndexNEITaskDetails extends Component {
<Breadcrumb separator={'>'} className={"fl"}> <Breadcrumb separator={'>'} className={"fl"}>
{/*<Breadcrumb.Item>{this.props.current_user.username}</Breadcrumb.Item>*/} {/*<Breadcrumb.Item>{this.props.current_user.username}</Breadcrumb.Item>*/}
<Breadcrumb.Item> <Breadcrumb.Item>
<a href="/project_packages">众包社区</a> <a href="/crowdsourcing">众包社区</a>
</Breadcrumb.Item> </Breadcrumb.Item>
<Breadcrumb.Item><span className={"tabelcli"} title={data&&data.title}>{data&&data.title}</span></Breadcrumb.Item> <Breadcrumb.Item><span className={"tabelcli"} title={data&&data.title}>{data&&data.title}</span></Breadcrumb.Item>
@ -289,8 +290,8 @@ class PackageIndexNEITaskDetails extends Component {
onMouseOver={this.setover} onMouseOver={this.setover}
onMouseOut={this.setout} onMouseOut={this.setout}
> >
{overtype===false?<a className="ContacttheTA fl" href={`/users/${this.props.current_user.login}/private_messages`}> <img alt="头像" class="mr5" src={require('./newsone.png')} />联系TA</a>: {overtype===false?<a className="ContacttheTA fl" href={`/users/${this.props.current_user.login}/message_detail?user_id=${data&&data.creator.id}`}> <img alt="头像" class="mr5" src={require('./newsone.png')} />联系TA</a>:
<a className="ContacttheTAs fl" href={`/users/${this.props.current_user.login}/private_messages`}> <img alt="头像" className="mr5" <a className="ContacttheTAs fl" href={`/users/${this.props.current_user.login}/message_detail?user_id=${data&&data.creator.id}`}> <img alt="头像" className="mr5"
src={require('./newstwo.png')}/>联系TA</a>} src={require('./newstwo.png')}/>联系TA</a>}
</div>} </div>}
</div> </div>
@ -344,13 +345,13 @@ class PackageIndexNEITaskDetails extends Component {
</div> </div>
{/*详情*/} {/*详情*/}
<div className={"stud-class-set padding30 coursenavbox edu-back-white mt20"}> <div className={"stud-class-set padding26 coursenavbox edu-back-white mt20"}>
<div> <div>
<div className={"longboxs"}> <div className={"longboxs"}>
需求详情 需求详情
{data&&data.status==="pending"&&data&&data.operation.can_select_bidding_user===true?<div className="fr"> {data&&data.status==="pending"&&data&&data.operation.can_select_bidding_user===true?<div className="fr">
<a className="task-btn-nebules fr" href={`/project_packages/${this.props.match.params.id}/edit`}>编辑</a> <a className="task-btn-nebules fr" href={`/crowdsourcing/${this.props.match.params.id}/edit`}>编辑</a>
<a className="task-btn-nebules fr" onClick={this.deletePackages}>删除</a> <a className="task-btn-nebules fr" onClick={this.deletePackages}>删除</a>
</div>:""} </div>:""}
@ -362,7 +363,7 @@ class PackageIndexNEITaskDetails extends Component {
</div> </div>
{data&&data.attachments.length>0?<div> {data&&data.attachments.length>0?<div>
<div className={"longboxs"}> <div className={"longboxs "}>
需求文件 需求文件
</div> </div>
{data&&data.attachments.map((item,key)=>{ {data&&data.attachments.map((item,key)=>{
@ -380,9 +381,9 @@ class PackageIndexNEITaskDetails extends Component {
{/*发布者和竞选者状态show*/} {/*发布者和竞选者状态show*/}
{this.state.setbiddingmantype===false&&data&&data.published_at!=null?<div className={"stud-class-set coursenavbox edu-back-white mt20"}> {this.state.setbiddingmantype===false&&data&&data.published_at!=null?<div className={"stud-class-set coursenavbox edu-back-white mt20"}>
{/*下面是头像*/} {/*下面是头像*/}
<div className={"stud-class-set pd30a0 coursenavbox edu-back-white"}> <div className={"stud-class-set pd26 coursenavbox edu-back-white"}>
<div className={"relativef"}> <div className={"relativef"}>
<div className={"longboxs"}> <div className={"longboxs mb0"}>
报名列表({data&&data.bidding_users.length}) 报名列表({data&&data.bidding_users.length})
</div> </div>
<div className="packageabsolute"> <div className="packageabsolute">
@ -392,7 +393,7 @@ class PackageIndexNEITaskDetails extends Component {
</div> </div>
</div> </div>
<div className={"ysllogin_register_contents edu-back-white "} style={{borderTop: '1px solid rgb(234, 234, 234)'}}> <div className={"ysllogin_register_contents ysllogin_register_contentss edu-back-white "} style={{borderTop: '1px solid rgb(234, 234, 234)'}}>
<div className="ysllogin_section"> <div className="ysllogin_section">
<div className="ysldivhome2"> <div className="ysldivhome2">
<div style={{height: "20px"}}> </div> <div style={{height: "20px"}}> </div>
@ -403,7 +404,7 @@ class PackageIndexNEITaskDetails extends Component {
{item.status==="bidding_won"?<img src={gouxuan} className="yslgouxuanimg"/>:""} {item.status==="bidding_won"?<img src={gouxuan} className="yslgouxuanimg"/>:""}
<a href={`/users/${item.login}`}><img className="div1img" src={item.avatar_url}/></a> <a href={`/users/${item.login}`}><img className="div1img" src={item.avatar_url}/></a>
<div className="textall mt10" title={item.name}> <p className="ptext">{item.name}</p></div> <div className="textall mt10" title={item.name}> <p className="ptext">{item.name}</p></div>
{this.props.current_user.login!=item.login?<a className="ContacttheTAs fl none" href={`/users/${this.props.current_user.login}/private_messages`}> {this.props.current_user.login!=item.login?<a className="ContacttheTAs fl none" href={`/users/${this.props.current_user.login}/message_detail?user_id=${data&&data.creator.id}`}>
<img alt="头像" className="mr5" src={require('./newstwo.png')}/>联系TA <img alt="头像" className="mr5" src={require('./newstwo.png')}/>联系TA
</a>:""} </a>:""}
</div> </div>
@ -426,9 +427,9 @@ class PackageIndexNEITaskDetails extends Component {
{this.state.setbiddingmantype===true?<div className={"stud-class-set coursenavbox edu-back-white mt20"}> {this.state.setbiddingmantype===true?<div className={"stud-class-set coursenavbox edu-back-white mt20"}>
{/*发布人选择状态*/} {/*发布人选择状态*/}
{/*下面是头像*/} {/*下面是头像*/}
<div className={"stud-class-set pd30a0 coursenavbox edu-back-white"}> <div className={"stud-class-set pd26 coursenavbox edu-back-white"}>
<div className={"relativef"}> <div className={"relativef"}>
<div className={"longboxs"}> <div className={"longboxs mb0"}>
报名列表({data&&data.bidding_users.length}) 报名列表({data&&data.bidding_users.length})
</div> </div>
@ -441,7 +442,7 @@ class PackageIndexNEITaskDetails extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className={"ysllogin_register_contents edu-back-white "} style={{borderTop: '1px solid rgb(234, 234, 234)'}}> <div className={"ysllogin_register_contents ysllogin_register_contentss edu-back-white "} style={{borderTop: '1px solid rgb(234, 234, 234)'}}>
<div className="ysllogin_section"> <div className="ysllogin_section">
<div className="ysldivhome2"> <div className="ysldivhome2">
<div style={{height: "20px"}}> </div> <div style={{height: "20px"}}> </div>

@ -5,13 +5,20 @@
flex-direction: row; flex-direction: row;
margin-bottom: 20px; margin-bottom: 20px;
} }
.ysllogin_register_contents{ .ysllogin_register_contents{
display: flex; display: flex;
margin-top: 20px; margin-top: 20px;
/*justify-content: center;*/ /*justify-content: center;*/
background: #fff; background: #fff;
}
.ysllogin_register_contentss{
margin-top:0px !important;
padding-top: 10px;
padding-bottom: 10px;
} }
.ysldivhomediv1{ .ysldivhomediv1{
width: 80px; width: 80px;
height: 130px; height: 130px;

@ -75,7 +75,7 @@ class PackageIndexNEIBannerConcent extends Component {
} }
componentDidMount() { componentDidMount() {
window.document.title = '众包社区'
if(this.props.match.params.id!=undefined){ if(this.props.match.params.id!=undefined){
let url=`/api/v1/project_packages/${this.props.match.params.id}.json` let url=`/api/v1/project_packages/${this.props.match.params.id}.json`
@ -454,7 +454,7 @@ class PackageIndexNEIBannerConcent extends Component {
if(type===true){ if(type===true){
this.props.setPublicationfun(response.data.id) this.props.setPublicationfun(response.data.id)
}else{ }else{
window.location.href="/project_packages/"+response.data.id window.location.href="/crowdsourcing/"+response.data.id
} }
this.setState({ this.setState({
springtype:false springtype:false
@ -502,7 +502,7 @@ class PackageIndexNEIBannerConcent extends Component {
if(type===true){ if(type===true){
this.props.setPublicationfun(response.data.id) this.props.setPublicationfun(response.data.id)
}else{ }else{
window.location.href="/project_packages/"+response.data.id window.location.href="/crowdsourcing/"+response.data.id
} }
this.setState({ this.setState({
springtype:false springtype:false

@ -10,15 +10,14 @@ class PackageIndexNEISubmit extends Component {
} }
} }
componentDidMount() { componentDidMount() {
window.document.title = '众包社区'
} }
setageload=(sum)=>{ setageload=(sum)=>{
if(sum===undefined){ if(sum===undefined){
window.location.href="/project_packages/new" window.location.href="/crowdsourcing/new"
}else{ }else{
// this.props.history.push("/project_packages/"+sum) // this.props.history.push("/project_packages/"+sum)
window.location.href="/project_packages/"+sum window.location.href="/crowdsourcing/"+sum
} }
} }

@ -18,8 +18,9 @@ class PackageIndexNewandEditIndex extends Component{
} }
componentDidMount(){ componentDidMount(){
window.document.title = '众包社区'
} }
setPublicationfun=(ids)=>{ setPublicationfun=(ids)=>{
this.setState({ this.setState({
setPublication:true, setPublication:true,

@ -31,6 +31,10 @@ class ProjectPackageIndex extends Component {
super(props) super(props)
} }
componentDidMount(){
window.document.title = '众包社区'
}
render() { render() {
return ( return (
@ -39,25 +43,25 @@ class ProjectPackageIndex extends Component {
<Switch> <Switch>
{/*众包首页*/} {/*众包首页*/}
<Route path="/project_packages/:id/edit" <Route path="/crowdsourcing/:id/edit"
render={ render={
(props) => (<PackageIndexNewandEdit {...this.props} {...props} {...this.state} />) (props) => (<PackageIndexNewandEdit {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/project_packages/new" <Route path="/crowdsourcing/new"
render={ render={
(props) => (<PackageIndexNewandEdit {...this.props} {...props} {...this.state} />) (props) => (<PackageIndexNewandEdit {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/project_packages/:id" <Route path="/crowdsourcing/:id"
render={ render={
(props) => (<PackageIndexNEITaskDetails {...this.props} {...props} {...this.state} />) (props) => (<PackageIndexNEITaskDetails {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/project_packages" <Route path="/crowdsourcing"
render={ render={
(props) => (<PackageIndex {...this.props} {...props} {...this.state} />) (props) => (<PackageIndex {...this.props} {...props} {...this.state} />)
} }

@ -97,8 +97,8 @@
line-height: 28px; line-height: 28px;
} }
.pd30a0{ .pd26a0{
padding: 30px 30px 16px 30px; padding: 26px 26px 16px 26px;
} }
.newFormbox .attachment .icon-fujian{ .newFormbox .attachment .icon-fujian{
@ -226,7 +226,7 @@
width: 80px; width: 80px;
height: 26px; height: 26px;
font-size: 14px; font-size: 14px;
line-height: 26px; line-height: 24px;
/*display: block;*/ /*display: block;*/
border: 1px solid #fff !important; border: 1px solid #fff !important;
background-color: #4CACFF; background-color: #4CACFF;
@ -275,7 +275,7 @@
.packageabsolute{ .packageabsolute{
position: absolute; position: absolute;
right: -16px; right: -16px;
top: -11px; top: -7px;
} }
.relativef{ .relativef{
position: relative; position: relative;
@ -320,3 +320,19 @@
max-width: 850px; max-width: 850px;
display: table-cell; display: table-cell;
} }
.mtf10{
margin-top:-10px;
}
.padding26{
padding: 26px;
box-sizing: border-box;
}
.pd26{
padding: 26px;
}
.pd30a0{
padding: 30px 30px 16px 30px;
}

@ -303,7 +303,7 @@ class NewHeader extends Component {
<li className={`${competitions === true ? 'active' : ''}`} ><a href="/competitions">在线竞赛</a></li> <li className={`${competitions === true ? 'active' : ''}`} ><a href="/competitions">在线竞赛</a></li>
<li className={`${competitions === true ? 'active' : ''}`} style={{display:project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'none':'block'}} > <li className={`${competitions === true ? 'active' : ''}`} style={{display:project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'none':'block'}} >
<a href="/project_packages"> <a href="/crowdsourcing">
{project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'':'众包'} {project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'':'众包'}
</a> </a>
</li> </li>

@ -3514,4 +3514,5 @@ line-height: 16px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
.vertical4{ .vertical4{
vertical-align: -4px; vertical-align: -4px;
margin-right: 0px !important;
} }

@ -578,7 +578,11 @@ a.user_greybg_btn{background-color:#747A7F;color: #fff;}
.new_li li{ list-style-type: disc!important; } .new_li li{ list-style-type: disc!important; }
.new_li ol li{ list-style-type: decimal!important; } .new_li ol li{ list-style-type: decimal!important; }
.new_li li{ margin-bottom: 0!important; } .new_li li{ margin-bottom: 0!important; }
.markdown-toc .markdown-toc-list li{
list-style-type: disc!important;
list-style-type: decimal!important;
margin-bottom: 0!important;
}
/*搜索框*/ /*搜索框*/
#pollingPanel{position: relative;width: 248px;height: 32px;} #pollingPanel{position: relative;width: 248px;height: 32px;}
#pollingPanel > input{width: 100%;height: 100%;border:1px solid #eaeaea;border-radius: 4px;padding: 0px 30px 0px 5px;box-sizing: border-box;background-color: #F4F4F4;} #pollingPanel > input{width: 100%;height: 100%;border:1px solid #eaeaea;border-radius: 4px;padding: 0px 30px 0px 5px;box-sizing: border-box;background-color: #F4F4F4;}
@ -1115,3 +1119,22 @@ html>body #ajax-indicator { position: fixed; }
color: coral; color: coral;
padding: 0 3px; padding: 0 3px;
} }
.applycompetitions{
line-height: 30px;
border-radius: 14px;
color: #666;
background: rgba(41,189,139,1);
opacity: 0.8;
font-size: 14px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(255,255,255,1);
position: absolute;
bottom: 139px;
left: 18px;
width: 73px;
height: 30px;
text-align: center;
}
Loading…
Cancel
Save