众包完善

dev_admin
杨树明 6 years ago
parent 58bf4afde2
commit 872fc5bb6c

@ -222,7 +222,7 @@ export default class MDEditors extends Component {
const _placeholder = placeholder || "";
// amp;
// 编辑时要传memoId
const imageUrl = `/upload_with_markdown?container_id=&container_type=Memo`;
const imageUrl = `/api/attachments.json`;
// 创建editorMd
let react_id = `react_${_id}`;

@ -43,6 +43,12 @@ function disabledDateTime() {
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
};
}
function disabledDate(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
class PackageIndexNEIBannerConcent extends Component {
constructor(props) {
super(props)
@ -50,7 +56,7 @@ class PackageIndexNEIBannerConcent extends Component {
this.state = {
modalCancel:false,
getverificationcodes:true,
seconds:35,
seconds:60,
springtype:false,
category:undefined,
title:undefined,
@ -83,7 +89,7 @@ class PackageIndexNEIBannerConcent extends Component {
deadline_at:moment(data.deadline_at),
min_price:data.min_price,
max_price:data.max_price,
contact_name:data.contact_name==null||data.contact_name==undefined?this.props.current_user.username:data.contact_name,
contact_name:data.contact_name==null||data.contact_name==undefined?this.props.current_user.real_name:data.contact_name,
phones:data.contact_phone,
attachments:data.attachments,
@ -93,7 +99,7 @@ class PackageIndexNEIBannerConcent extends Component {
})
}else{
console.log(this.props.current_user&&this.props.current_user.username)
console.log(this.props.current_user&&this.props.current_user.real_name)
}
let Url = `/project_package_categories.json`;
@ -112,7 +118,7 @@ class PackageIndexNEIBannerConcent extends Component {
})
this.setState({
contact_name:this.props.current_user&&this.props.current_user.username
contact_name:this.props.current_user&&this.props.current_user.real_name
})
// this.contentMdRef.current.setValue("测试赋值")
@ -123,7 +129,7 @@ class PackageIndexNEIBannerConcent extends Component {
if(prevProps.current_user!=this.props.current_user){
if(this.props.current_user!=undefined){
this.setState({
contact_name:this.props.current_user.username
contact_name:this.props.current_user.real_name
})
}
}
@ -151,7 +157,7 @@ class PackageIndexNEIBannerConcent extends Component {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 35,
seconds: 60,
})
}
});
@ -170,7 +176,7 @@ class PackageIndexNEIBannerConcent extends Component {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 35,
seconds: 60,
})
}
@ -187,7 +193,7 @@ class PackageIndexNEIBannerConcent extends Component {
axios.get((url), {
params: {
value: contact_phone,
type: 9,
type: 5,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
@ -452,7 +458,7 @@ class PackageIndexNEIBannerConcent extends Component {
deadline_at:deadline_at._i,
min_price:parseInt(min_price),
max_price:parseInt(max_price),
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.username:contact_name,
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.real_name:contact_name,
contact_phone: contact_phone===undefined?this.props.current_user&&this.props.current_user.phone:contact_phone,
code:code,
publish:types
@ -500,7 +506,7 @@ class PackageIndexNEIBannerConcent extends Component {
deadline_at:deadline_at._i,
min_price:parseInt(min_price),
max_price:parseInt(max_price),
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.username:contact_name,
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.real_name:contact_name,
contact_phone: contact_phone===undefined?this.props.current_user&&this.props.current_user.phone:contact_phone,
code:code,
publish:types
@ -805,6 +811,8 @@ class PackageIndexNEIBannerConcent extends Component {
placeholder="请选择任务的竞标截止日期"
className={"fafas"}
disabledTime={disabledDateTime}
disabledDate={disabledDate}
dropdownClassName="hideDisable"
value={this.state.deadline_at}
onChange={this.onChangeTimePicker}
/>
@ -848,7 +856,7 @@ class PackageIndexNEIBannerConcent extends Component {
<Input
className={"fafafas"}
style={{"width": "260px"}}
value={this.state.contact_name===null||this.state.contact_name===undefined?this.props.current_user&&this.props.current_user.username:this.state.contact_name}
value={this.state.contact_name===null||this.state.contact_name===undefined?this.props.current_user&&this.props.current_user.real_name:this.state.contact_name}
placeholder="请输入姓名"
onInput={(e)=>this.onChangeContact_name(e)}
/>

@ -617,8 +617,10 @@ submittojoinclass=(value)=>{
let activeShixuns = false;
let activePaths = false;
let coursestype=false;
let activePackages=false;
if (match.path === '/forums') {
if (match.path === '/forums') {
activeForums = true;
} else if (match.path.startsWith('/shixuns')) {
activeShixuns = true;
@ -626,14 +628,12 @@ submittojoinclass=(value)=>{
activePaths = true;
} else if (match.path.startsWith('/courses')) {
coursestype = true;
}else {
}else if (match.path.startsWith('/crowdsourcing')) {
activePackages = true;
}else {
activeIndex = true;
}
// join_course_url: "https://www.educoder.net/courses/join_course_multi_role"
// join_project_url: "https://www.educoder.net/applied_project/applied_project_info"
// rolearr:["",""],
// console.log("618");
// console.log(user_phone_binded);
return (
<div className="newHeader" id="nHeader" >
@ -716,10 +716,9 @@ submittojoinclass=(value)=>{
/>
</li>
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.moop_cases_url}>教学案例</a></li>
<li className=""><a
// href={this.props.Headertop===undefined?"":this.props.Headertop.crowdsourcing_url}
href={'/crowdsourcing'}
>众包创新</a></li>
<li className={`${activePackages === true ? 'pr active' : 'pr'}`}>
<a href={'/crowdsourcing'}>众包创新</a>
</li>
<li className={`${activeForums === true ? 'active' : ''}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</a></li>
<li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}}

Loading…
Cancel
Save