dev_aliyun
cxt 5 years ago
commit a95e3066ba

@ -228,9 +228,9 @@ class CompetitionTeamsController < ApplicationController
end
team.team_members.create!(user_id: User.current.id, role: 2, competition_id: @competition.id)
# 记录引流
record_agent_user_action
end
# 记录引流
record_agent_user_action
end
# 退出战队 非创建者直接退出,创建者退出则解散团队

@ -0,0 +1,42 @@
<style>
/*//登录弹窗*/
.newLogipopup{
height: 100%;
width: 100%;
background-size: 100% 100%;
position: fixed;
bottom: 0px;
right: 0px;
}
</style>
<div class="educontent newLogipopup" id="backImg" >
<div class="pr edu-txt-center height-100 pt110">
<div class="login_reg pr login_regs">
<div style="position: relative;">
<a href="javascript:void(0)" onclick="competitionfun();" id="closeIcon" style="position: absolute;right: -20px;top: 36px;">
<i class="iconfont icon-shanchudiao"></i>
</a>
<img src="/images/educoder/competitionslog.png" height="580px" width="637px" />
<a style="position: absolute;left:43%; bottom:18px;" onclick="setcompetitionfun();" >
<img height="40px" width="150px" src="/images/educoder/applys.png" />
</a>
</div>
</div>
</div>
</div>
<script>
function competitionfun(){
localStorage.setItem('competition_uid', true);
hideModal();
}
function setcompetitionfun(){
competitionfun();
window.location.href="/competitions"
}
</script>

@ -1,24 +0,0 @@
<style>
/*//登录弹窗*/
.newLogipopup{
height: 100%;
width: 100%;
background-size: 100% 100%;
position: fixed;
bottom: 0px;
right: 0px;
}
</style>
<div class="educontent newLogipopup" id="backImg" >
<div class="pr edu-txt-center height-100 pt110">
<div class="login_reg pr login_regs">
<div>
<a href="javascript:void(0)" onclick="hideModal();" id="closeIcon" style="position: absolute;right: 0px;"><i class="iconfont icon-shanchudiao"></i></a>
<img src="/images/educoder/competitionslog.png" height="600px" width="600px" />
<img height="600px" width="600px" src="/images/educoder/applys.png" />
</div>
</div>
</div>
</div>

@ -23,7 +23,7 @@
<img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/>
</li>
<li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li>
<li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包", project_packages_path %></li>
<li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包创新", project_packages_path %></li>
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li>
<% if User.current.ec_school.present? %>
<li class="<%= ecs_controller.include?(params[:controller]) ? " active" : "" %>" id="ec_banner">
@ -129,6 +129,20 @@
<% end %>
<% end %>
var begin_time = new Date();
var end_time = new Date("2019-10-10");
if (begin_time < end_time) {
if (window.localStorage) {
var uid = localStorage.getItem('competition_uid');
} else {
var uid = false
}
if (!uid) {
var htmlvalue = "<%= escape_javascript(render :partial => 'competitions/competitions_name')%>";
pop_box_new(htmlvalue, 500, 380);
}
}
<% notice = SystemUpdateNotice.last %>
<% if @noticed_update || ((User.current.certification == 1 || params[:controller] != "welcome") && notice.present? && notice.end_time > Time.now && notice.start_time >= (Time.now - 21600) && User.current.user_system_notices.where(:notice_type => notice.notice_type).count == 0) %>

@ -24,7 +24,7 @@
<img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/>
</li>
<li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li>
<li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包", project_packages_path %></li>
<li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包创新", project_packages_path %></li>
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li>
<!--<li><%#= link_to "活动竞赛", competitions_path %></li>-->
</ul>
@ -93,4 +93,17 @@
var sl=-Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
document.getElementById('nHeader').style.left=sl+'px';
};
$(function() {
if (window.localStorage) {
var uid = localStorage.getItem('competition_uid');
} else {
var uid = false
}
if(!uid){
var htmlvalue = "<%= escape_javascript(render :partial => 'competitions/competitions_name')%>";
pop_box_new(htmlvalue, 500, 380);
}
})
</script>

@ -70,11 +70,11 @@
<%= hidden_field_tag 'cover_file_name', '', class: 'cover-file-name' %>
<input type="file" name="cover_file" accept="image/*" id="library-cover-file" style="display: none"/>
<div class="surfacePlot ml25 library-cover-select" data-tip-down="上传图片" onclick="$('#library-cover-file').click();">
<div class="surfacePlot ml60 library-cover-select" data-tip-down="上传图片" onclick="$('#library-cover-file').click();">
<img src="/images/educoder/unite.png" class="marginuploading <%= cover_exists ? 'hidden' : '' %>" style="<%= cover_exists ? 'display:none' : '' %>"/>
<div class="library-cover-perview" style="<%= cover_exists ? '' : 'display:none' %>">
<% cover_url = cover_exists ? download_attachment_path(@library.cover_id) : '' %>
<img src="<%= cover_url %>" width="120px" height="90px"/>
<img src="<%= cover_url %>" width="122px" height="93px"/>
</div>
</div>
<!-- <p style="height:20px;line-height:20px;"><span class="color-red ml20 none" id="cover_file_notice">请上传封面</span></p>-->
@ -140,13 +140,14 @@
var submitForm = function(){
var title = $("input[name='library[title]']").val();
var content = $("textarea[name='library[content]']").val();
var author_name = $("input[name='library[author_name]']").val();
var author_school_name = $("input[name='library[author_school_name]']").val();
var cover_file = $("input[name='cover_file").val();
var author_name = $("input[name='library[author_name]']").val();
var author_school_name = $("input[name='library[author_school_name]']").val();
var cover_file = $("input[name='cover_file").val();
if (!title || title.length == 0) {
$("#title_notice").removeClass("none");
$("#title_notice").html("请输入标题");
$(document).scrollTop(parseInt($("#title_notice").offset().top)-150);
return
}else{
$("#title_notice").addClass("none");
@ -163,29 +164,33 @@
if (!content || content.length == 0) {
$("#des_notice").removeClass("none");
$(document).scrollTop(parseInt($("#des_notice").offset().top)-150);
return
}else{
$("#des_notice").addClass("none");
}
if (!author_name || author_name.length == 0) {
$("#author_name_notice").removeClass("none");
return
}else{
$("#author_name_notice").addClass("none");
}
if (!author_name || author_name.length >10) {
$("#title_author_name").removeClass("none");
if (!author_name || author_name.length == 0) {
$("#author_name_notice").removeClass("none");
$(document).scrollTop(parseInt($("#author_name_notice").offset().top)-150);
return
}else{
$("#title_author_name").addClass("none");
}
}else{
$("#author_name_notice").addClass("none");
}
if (!author_name || author_name.length >10) {
$("#title_author_name").removeClass("none");
$(document).scrollTop(parseInt($("#title_author_name").offset().top)-150);
return
}else{
$("#title_author_name").addClass("none");
}
if (!author_school_name || author_school_name.length == 0) {
$("#author_school_name_notice").removeClass("none");
$(document).scrollTop(parseInt($("#author_school_name_notice").offset().top)-150);
return
}else{
$("#author_school_name_notice").addClass("none");
@ -201,6 +206,7 @@
if($('.attachments_fields .attachment').length == 0){
$("#file_notice").removeClass("none");
$(document).scrollTop(parseInt($("#file_notice").offset().top)-150);
return
}else{
$("#file_notice").addClass("none");

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

@ -51,7 +51,7 @@ class PackageConcent extends Component {
//否 string 排序,默认最新, recently, price
// 否 string 类型, front,backend,mobile,database, cloud_compute_and_big_data,devops_and_test,ai,other
componentDidMount() {
window.document.title = '众包社区'
window.document.title = '众包创新'
let {category,keyword,sort_by,sort_direction,page}=this.state
this.setdatas(category,keyword,sort_by,sort_direction,page)

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

@ -49,7 +49,7 @@ class PackageIndexNEITaskDetails extends Component {
componentDidMount() {
this.getdatas()
window.document.title = '众包社区'
window.document.title = '众包创新'
}
getdatas=()=>{
@ -251,7 +251,7 @@ class PackageIndexNEITaskDetails extends Component {
<Breadcrumb separator={'>'} className={"fl"}>
{/*<Breadcrumb.Item>{this.props.current_user.username}</Breadcrumb.Item>*/}
<Breadcrumb.Item>
<a href="/crowdsourcing">众包社区</a>
<a href="/crowdsourcing">众包创新</a>
</Breadcrumb.Item>
<Breadcrumb.Item><span className={"tabelcli"} title={data&&data.title}>{data&&data.title}</span></Breadcrumb.Item>

@ -75,7 +75,7 @@ class PackageIndexNEIBannerConcent extends Component {
}
componentDidMount() {
window.document.title = '众包社区'
window.document.title = '众包创新'
if(this.props.match.params.id!=undefined){
let url=`/api/v1/project_packages/${this.props.match.params.id}.json`

@ -10,7 +10,7 @@ class PackageIndexNEISubmit extends Component {
}
}
componentDidMount() {
window.document.title = '众包社区'
window.document.title = '众包创新'
}
setageload=(sum)=>{
if(sum===undefined){

@ -18,7 +18,7 @@ class PackageIndexNewandEditIndex extends Component{
}
componentDidMount(){
window.document.title = '众包社区'
window.document.title = '众包创新'
}
setPublicationfun=(ids)=>{

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

@ -5,6 +5,8 @@ import PropTypes from 'prop-types';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import { Modal} from 'antd';
// import searchImg from '../../../../images/educoder/icon/search.svg'
// /images/educoder/icon/search.svg
@ -134,7 +136,8 @@ class NewHeader extends Component {
ImageUrl:"",
ecUrl:null,
project_packages_url:null,
ImageUrlType:false
ImageUrlType:false,
competitiontype:false
}
}
componentWillMount(){
@ -230,9 +233,30 @@ class NewHeader extends Component {
});
if (window.localStorage) {
var uid = localStorage.getItem('competition_uid');
} else {
var uid = false
}
if(!uid){
this.setState({
competitiontype:true
})
}
}
setcompetitionfun=()=>{
this.competitionfun();
window.location.href="/competitions"
}
competitionfun=()=>{
this.setState({
competitiontype:false
})
localStorage.setItem('competition_uid', true);
}
render() {
let {careerslist,isLogin,current_user,ImageUrl,ecUrl,ImageUrlType,project_packages_url} = this.state;
// const isLogin = isLogintype; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。
@ -246,6 +270,7 @@ class NewHeader extends Component {
let activeCareers = false;
let activeCourses = false;
let competitions = false;
let crowdsourcing=false;
if (match.path === '/forums') {
activeForums = true;
} else if (match.path.startsWith('/shixuns')) {
@ -258,6 +283,8 @@ class NewHeader extends Component {
activeCourses=true;
}else if(match.path.startsWith('/competitions')){
competitions=true;
}else if(match.path.startsWith('/crowdsourcing')){
crowdsourcing=true
}else{
activeIndex = true;
}
@ -268,6 +295,45 @@ class NewHeader extends Component {
// console.log(match.path.startsWith("/ec_courses"))
return (
<div className="newHeader" id="nHeader">
<style>
{
`
.competitiontype .ant-modal{
width: 615px !important;
}
.competitiontype .ant-modal-content{
background-color: transparent !important;
box-shadow: none !important;
}
`
}
</style>
<Modal
visible={this.state.competitiontype}
closable={false}
footer={null}
className={"competitiontype"}
>
<div className="login_reg pr login_regs">
<div style={{position: "relative"}} >
<a onClick={()=>this.competitionfun()} id="closeIcon"
style={{position: "absolute",right: "-20px",top: "36px"}}
>
<i className="iconfont icon-shanchudiao"></i>
</a>
<img src={"/images/educoder/competitionslog.png"} height="580px" width="637px"/>
<a style={{position: "absolute",left:"43%", bottom:"18px"}} onClick={()=>this.setcompetitionfun()}>
<img height="40px" width="150px" src={"/images/educoder/applys.png"}/>
</a>
</div>
</div>
</Modal>
<div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
<a href="/">
@ -304,10 +370,12 @@ class NewHeader extends Component {
<a href="/competitions">在线竞赛</a>
<img className="roundedRectangles" src="/images/educoder/roundedRectangle.png"/>
</li>
<li><a href="/moop_cases">教学案例</a></li>
<li className={`${competitions === true ? 'active' : ''}`} style={{display:project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'none':'block'}} >
<li className={`${crowdsourcing === true ? 'active' : ''}`} style={{display:project_packages_url===null||project_packages_url===undefined||project_packages_url===""?'none':'block'}} >
<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>
</li>
<li className={`${activeForums === true ? 'active' : ''}`}><a href="/forums">交流问答</a></li>
@ -464,11 +532,3 @@ class NewHeader extends Component {
export default NewHeader;
// <ul id="header-nav">
// <li className="active">1{/*<%= link_to "首页", home_path %>*/}</li>
// <li>2{/*<%= link_to "精选实训", shixuns_path %>*/}</li>
// <li>3{/*<%= link_to "实训路径", subjects_path %>*/}</li>
// <li>4{/*<%= link_to "在线课堂", courses_path %>*/}</li>
// <li>5{/*<%= link_to "讨论组", forums_path %>*/}</li>
// </ul>

@ -2,7 +2,7 @@
/*头部导航条样式---2018-03-19--by-cs*/
.newHeader{background: #24292D;width:100%; height: 60px; min-width: 1200px;position: fixed;top: 0px;left: 0px;z-index:1000;-moz-box-shadow: 0px 0px 12px rgba(0,0,0,0.1); /* 老的 Firefox */box-shadow: 0px 0px 12px rgba(0,0,0,0.1);}
.newHeader .logoimg{margin-top:12px;float: left;width: 36px}
.head-nav{float: left;width: 780px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;}
.head-nav{float: left;width: 920px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;}
.head-nav ul#header-nav{position: absolute;top: 0px;z-index: 3;height: 60px;box-sizing: border-box;padding-left: 30px;}
.head-nav ul#header-nav li{float: left;height: 60px;line-height: 60px;margin-right: 30px;cursor: pointer;position: relative;font-size: 16px}
.head-nav ul#header-nav li a{display: block;height: 100%;width: 100%;color: #fff}
@ -464,7 +464,7 @@ li.li-width7{width: 7%;text-align: left}
.top-black-trangle{display: block;border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;}
.right-black-trangle{display: block;border-width: 8px;position: absolute;top: 10px;right: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;}
.activity-nav.active{color: #4CACFF!important;}
.project_packagesHead{width: 100%;margin-bottom:40px;background-size: 100% 100%;background-image: url("/images/educoder/project_packagesHead.png");height: 240px;
.project_packagesHead{width: 100%;margin-bottom:40px;background-size: 100% 100%;background-image: url("/images/educoder/project_packagesHead.jpg");height: 240px;
justify-content: center;align-items: center;display: -webkit-flex;}
.courseNewNum{display: block;background: #FF6800;border-radius:30px;padding:0px 2px;color: #fff!important;font-size: 11px;

@ -1243,6 +1243,9 @@ html>body #ajax-indicator { position: fixed; }
}
.login_regs{
margin-right: 35%;
width: 558px;
width: 580px !important;
}
.login_regs a{
cursor: pointer;
}
Loading…
Cancel
Save