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

issues25489
cxt 5 years ago
commit fd0da3a667

@ -15,7 +15,7 @@ class TrustieHacksController < ApplicationController
hacks = hacks.where("name like ?", "%#{search}%")
end
@hackathon_users_count = hacks ? 0 : hacks.sum(:hack_users_count)
@hackathon_users_count = hacks.blank? ? 0 : hacks.sum(:hack_users_count)
@hacks_count = hacks.count
@hacks = hacks.page(page).per(limit)

@ -46,4 +46,4 @@
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
}

@ -62,7 +62,7 @@ class PollDetailTabForthRules extends Component{
this.unitChoose(this.props.rules);
}
if(this.props.flagPageEdit != prevProps.flagPageEdit){
this.setState({flagPageEdit:this.props.flagPageEdit})
this.setState({flagPageEdit: this.props.flagPageEdit})
}
}
componentDidMount=()=>{
@ -107,7 +107,7 @@ class PollDetailTabForthRules extends Component{
//修改发布规则里面的结束时间
changeRuleEndTime=(e,date,index)=>{
let arr=Object.assign({}, this.state.rules[parseInt(index)]);
arr.end_time=handleDateString(date);
if(date!="" && date!=undefined && moment(date,dataformat)>moment() && moment(date,dataformat)>moment(arr.publish_time,dataformat)){
arr.end_flag=""
@ -139,7 +139,7 @@ class PollDetailTabForthRules extends Component{
})
this.props.rulesCheckInfo && this.props.rulesCheckInfo(rules)
}
// changeOpen=(e,index)=>{
// let arr=Object.assign({}, this.state.rules[parseInt(index)]);
// arr.open= true;
@ -168,9 +168,9 @@ class PollDetailTabForthRules extends Component{
rules[index]=arr;
//修改选择分班下拉选项(是否被选中)
//let course_group = this.state.course_group;
this.unitChoose(rules);
this.setState({
rules:rules,
@ -194,8 +194,8 @@ class PollDetailTabForthRules extends Component{
}
});
}
let course_group =this.state.course_group;
let course_group =this.state.course_group;
course_group.forEach(ele=>{
if(arr.indexOf(ele.course_group_id) != -1){
ele.course_choosed = 1
@ -356,10 +356,10 @@ class PollDetailTabForthRules extends Component{
max-width:280px;
}
`}</style>
{
{
rules && rules.length > 0 && rules.map((rule,r)=>{
const courseGroup = rule.course_search !="" ?
const courseGroup = rule.course_search != "" ?
course_group.filter( item => item.course_group_name.indexOf(rule.course_search) != -1)
:course_group
@ -451,19 +451,19 @@ class PollDetailTabForthRules extends Component{
<Tooltip placement="bottom" title={rule.e_timeflag ? this.props.isAdmin()?"截止时间已过,不能再修改":"":""}>
<span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
placeholder="请选择截止时间"
locale={locale}
className={rule.end_flag && rule.end_flag !="" ? "noticeTip winput-240-40":"winput-240-40" }
value={rule.end_time && moment(rule.end_time,dataformat)}
onChange={(e, date)=>this.changeRuleEndTime(e, date,r)}
showTime={{ format: 'HH:mm' }}
format="YYYY-MM-DD HH:mm"
disabledTime={disabledDateTime}
showToday={false}
dropdownClassName="hideDisable"
placeholder="请选择截止时间"
locale={locale}
className={rule.end_flag && rule.end_flag !="" ? "noticeTip winput-240-40":"winput-240-40" }
value={rule.end_time && moment(rule.end_time,dataformat)}
onChange={(e, date)=>this.changeRuleEndTime(e, date,r)}
showTime={{ format: 'HH:mm' }}
format="YYYY-MM-DD HH:mm"
disabledTime={disabledDateTime}
disabledDate={disabledDate}
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px"}}
disabled={rule.e_timeflag === undefined ? rule.publish_time === null ? false : moment(rule.end_time, dataformat) <= moment() ? true : !flagPageEdit : rule.e_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px"}}
></DatePicker>
</span>
</Tooltip>
@ -480,7 +480,7 @@ class PollDetailTabForthRules extends Component{
<a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a>
</Tooltip>
:"":
r > 0 && rule.p_timeflag == false ?
r > 0 && rule.p_timeflag == false ?
<Tooltip title="删除">
<a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a>
</Tooltip>
@ -490,13 +490,13 @@ class PollDetailTabForthRules extends Component{
</li>
:""
}
</div>
</div>
)
})
})
}
</div>
)
}
}
export default PollDetailTabForthRules;
export default PollDetailTabForthRules;

@ -26,6 +26,7 @@ import '../css/members.css';
import '../css/busyWork.css';
import '../poll/pollStyle.css';
import './Challenges.css';
import {getImageUrl} from 'educoder';
import TraineetraininginformationModal from "./TraineetraininginformationModal";
import DownloadMessageysl from '../../modals/DownloadMessageysl';
@ -952,9 +953,9 @@ class Listofworksstudentone extends Component {
key: 'classroom',
dataIndex: 'classroom',
align: 'center',
className: 'font-14',
className: 'font-14 maxnamewidth120',
render: (text, record) => (
<span>
<span className="maxnamewidth120">
{record.classroom === undefined ? <span className="ysltable" style={{
color: '#07111B',
textAlign: "center"
@ -963,7 +964,8 @@ class Listofworksstudentone extends Component {
textAlign: "center"
}}>--</span> : record.classroom === null ?
<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>--</span> :
<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</span>}
<a className="ysltable maxnamewidth120" title={record.classroom}
style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</a>}
</span>
)
},
@ -1218,7 +1220,7 @@ class Listofworksstudentone extends Component {
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>评阅</a> :
<span>
<a style={{textAlign: "center"}} className="color-blue"
<a style={{textAlign: "center"}} className="color-blue maxnamewidth120"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>评阅</a>
</span>
@ -1299,9 +1301,9 @@ class Listofworksstudentone extends Component {
key: 'classroom',
dataIndex: 'classroom',
align: 'center',
className: 'font-14',
className: 'font-14 maxnamewidth120',
render: (text, record) => (
<span>
<span className="maxnamewidth120">
{record.classroom === undefined ? <span className="ysltable" style={{
color: '#07111B',
textAlign: "center"
@ -1309,8 +1311,9 @@ class Listofworksstudentone extends Component {
color: '#07111B',
textAlign: "center"
}}>--</span> : record.classroom === null ?
<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>--</span> :
<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</span>}
<span className="ysltable " style={{color: '#07111B', textAlign: "center"}}>--</span> :
<a className="ysltable maxnamewidth120" title={record.classroom}
style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</a>}
</span>
)
},

@ -51,6 +51,14 @@
white-space:nowrap;
cursor: default;
}
.maxnamewidth120 {
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.maxnamewidth200{
max-width: 200px;
overflow:hidden;

@ -745,7 +745,7 @@ class LoginDialog extends Component {
frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""}
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,${window.location.host}#wechat_redirect`}></iframe>:""}
{weixinlogin===true?<p className="clearfix ">

@ -8,10 +8,12 @@ class Otherloginstart extends Component {
componentDidMount() {
let query=this.props.location.search;
debugger
if(query!= ""){
const type = query.split('?code=');
const types = type[1].split('&state=');
const typeshref = types[1].split(',');
let codeurl = `/auth/wechat/callback.json`
axios.get(codeurl,{params:{
code:types[0]
@ -19,13 +21,13 @@ class Otherloginstart extends Component {
if(result){
if(result.data.status===0){
if(result.data.new_user===true){
window.location.href="/otherlogin?type=wechat"
window.location.href=`https://${typeshref[1]}/otherlogin?type=wechat`;
}else{
// this.getinfo()
if(types[1]==="account"){
window.location.href="/account/binding"
if(typeshref[1]==="account"){
window.location.href=`https://${typeshref[1]}/account/binding`;
}else{
window.location.href="/"
window.location.href=`https://${typeshref[1]}`;
}
}

@ -1293,7 +1293,7 @@ class LoginRegisterComponent extends Component {
frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""}
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,${window.location.host}#wechat_redirect`}></iframe>:""}
{weixinlogin===true?<p className="clearfix mb20 textcenter">
<a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回登录注册</a>
</p>:""}

@ -242,7 +242,7 @@ class AccountSecure extends Component {
<Form>
{list.map((item,key)=>{
if(item.en_type!="qq"){
return(
<div className="flexTable" key={key}>
<div className="flexTable">
@ -258,9 +258,9 @@ class AccountSecure extends Component {
<div className="status pt19">
{item.en_type!="qq"?<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
onClick={
item.id===null?() => this.showModal("wechat"):() => this.undologin("wechat",item.id)
}
onClick={
item.id===null?() => this.showModal("wechat"):() => this.undologin("wechat",item.id)
}
>{item.id===null?"绑定":"解绑"}</WordsBtn>:<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
onClick={
item.id===null?flag===true?() => this.openqqlogin():() => this.openphoneqqlogin():() => this.undologin("qq",item.id)
@ -271,6 +271,7 @@ class AccountSecure extends Component {
</div>
</div>
)
}
})
}
@ -297,7 +298,7 @@ class AccountSecure extends Component {
frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login&state=account#wechat_redirect`}></iframe>
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=account,${window.location.host}#wechat_redirect`}></iframe>
<p className="clearfix pagemancenter">
<a className={"startlogin color-blue"} onClick={()=>this.handleCancel()}>取消</a>
</p>

Loading…
Cancel
Save