|
|
|
@ -1,11 +1,9 @@
|
|
|
|
|
import React, {Component} from 'react';
|
|
|
|
|
import {Link} from "react-router-dom";
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import { Input , Spin, Icon ,Button,Pagination,DatePicker} from 'antd';
|
|
|
|
|
import { handleDateString,getUrl,setmiyah} from 'educoder';
|
|
|
|
|
import { Input, Spin, Icon, Button, Pagination, DatePicker } from 'antd';
|
|
|
|
|
import { handleDateString, getUrl, setmiyah } from 'educoder';
|
|
|
|
|
import locale from 'antd/lib/date-picker/locale/zh_CN';
|
|
|
|
|
import MDEditors from '../MDEditors';
|
|
|
|
|
import PhoneModel from './PhoneModel';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import '../packageconcnet.css';
|
|
|
|
|
const { Search } = Input;
|
|
|
|
@ -22,9 +20,9 @@ if (!window.postUpMsg) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function checkPhone(phone){
|
|
|
|
|
function checkPhone(phone) {
|
|
|
|
|
|
|
|
|
|
if(!(/^1[3456789]\d{9}$/.test(phone))){
|
|
|
|
|
if (!(/^1[3456789]\d{9}$/.test(phone))) {
|
|
|
|
|
// alert("手机号码有误,请重填");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -54,62 +52,62 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
super(props)
|
|
|
|
|
this.contentMdRef = React.createRef();
|
|
|
|
|
this.state = {
|
|
|
|
|
modalCancel:false,
|
|
|
|
|
getverificationcodes:true,
|
|
|
|
|
seconds:60,
|
|
|
|
|
springtype:false,
|
|
|
|
|
category:undefined,
|
|
|
|
|
title:undefined,
|
|
|
|
|
content:undefined,
|
|
|
|
|
attachment_ids:undefined,
|
|
|
|
|
deadline_at:undefined,
|
|
|
|
|
min_price:undefined,
|
|
|
|
|
max_price:undefined,
|
|
|
|
|
contact_name:undefined,
|
|
|
|
|
contact_phone:undefined,
|
|
|
|
|
code:undefined,
|
|
|
|
|
publish:false,
|
|
|
|
|
categories:[]
|
|
|
|
|
modalCancel: false,
|
|
|
|
|
getverificationcodes: true,
|
|
|
|
|
seconds: 60,
|
|
|
|
|
springtype: false,
|
|
|
|
|
category: undefined,
|
|
|
|
|
title: undefined,
|
|
|
|
|
content: undefined,
|
|
|
|
|
attachment_ids: undefined,
|
|
|
|
|
deadline_at: undefined,
|
|
|
|
|
min_price: undefined,
|
|
|
|
|
max_price: undefined,
|
|
|
|
|
contact_name: undefined,
|
|
|
|
|
contact_phone: undefined,
|
|
|
|
|
code: undefined,
|
|
|
|
|
publish: false,
|
|
|
|
|
categories: []
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
window.document.title = '众包创新'
|
|
|
|
|
if(this.props.match.params.id!=undefined){
|
|
|
|
|
if (this.props.match.params.id != undefined) {
|
|
|
|
|
|
|
|
|
|
let url=`/project_packages/${this.props.match.params.id}.json`
|
|
|
|
|
let url = `/project_packages/${this.props.match.params.id}.json`
|
|
|
|
|
axios.get((url)).then((response) => {
|
|
|
|
|
|
|
|
|
|
let data=response.data
|
|
|
|
|
let data = response.data
|
|
|
|
|
this.setState({
|
|
|
|
|
category:data.category_id,
|
|
|
|
|
title:data.title,
|
|
|
|
|
content:data.content,
|
|
|
|
|
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.real_name:data.contact_name,
|
|
|
|
|
phones:data.contact_phone,
|
|
|
|
|
attachments:data.attachments,
|
|
|
|
|
category: data.category_id,
|
|
|
|
|
title: data.title,
|
|
|
|
|
content: data.content,
|
|
|
|
|
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.real_name : data.contact_name,
|
|
|
|
|
phones: data.contact_phone,
|
|
|
|
|
attachments: data.attachments,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
console.log(this.props.current_user&&this.props.current_user.real_name)
|
|
|
|
|
} else {
|
|
|
|
|
console.log(this.props.current_user && this.props.current_user.real_name)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let Url = `/project_package_categories.json`;
|
|
|
|
|
axios.get(Url).then((response) => {
|
|
|
|
|
// console.log(response)
|
|
|
|
|
if(response.data.status===-1){
|
|
|
|
|
if (response.data.status === -1) {
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
categories:response.data.categories
|
|
|
|
|
categories: response.data.categories
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -118,7 +116,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_name:this.props.current_user&&this.props.current_user.real_name
|
|
|
|
|
contact_name: this.props.current_user && this.props.current_user.real_name
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// this.contentMdRef.current.setValue("测试赋值")
|
|
|
|
@ -126,22 +124,22 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
|
|
|
|
|
|
if(prevProps.current_user!=this.props.current_user){
|
|
|
|
|
if(this.props.current_user!=undefined){
|
|
|
|
|
if (prevProps.current_user != this.props.current_user) {
|
|
|
|
|
if (this.props.current_user != undefined) {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_name:this.props.current_user.real_name
|
|
|
|
|
contact_name: this.props.current_user.real_name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//获取验证码;
|
|
|
|
|
getverificationcode =()=>{
|
|
|
|
|
getverificationcode = () => {
|
|
|
|
|
// if (this.state.logins&&this.state.logins.length === 0) {
|
|
|
|
|
// // 判断没有输入手机号
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
if(this.state.getverificationcodes === undefined){
|
|
|
|
|
if (this.state.getverificationcodes === undefined) {
|
|
|
|
|
console.log("undefined");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -188,22 +186,22 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
}
|
|
|
|
|
//短信验证
|
|
|
|
|
SMSverification = () => {
|
|
|
|
|
let {contact_phone,code}=this.state;
|
|
|
|
|
let { contact_phone, code } = this.state;
|
|
|
|
|
var url = `/accounts/get_verification_code.json`;
|
|
|
|
|
axios.get((url), {
|
|
|
|
|
params: {
|
|
|
|
|
login: contact_phone,
|
|
|
|
|
type: 5,
|
|
|
|
|
smscode:setmiyah(contact_phone)
|
|
|
|
|
smscode: setmiyah(contact_phone)
|
|
|
|
|
}
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
//验证有问题{"status":1,"message":"success"}
|
|
|
|
|
// console.log(result);
|
|
|
|
|
// this.openNotification("验证码已发送,请注意查收");
|
|
|
|
|
|
|
|
|
|
if(result.data.status===1){
|
|
|
|
|
if (result.data.status === 1) {
|
|
|
|
|
this.openNotification("验证码已发送,请注意查收");
|
|
|
|
|
}else if(result.data.status===-2){
|
|
|
|
|
} else if (result.data.status === -2) {
|
|
|
|
|
this.openNotification(result.data.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
@ -214,27 +212,27 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onChangeTimePicker = (value, dateString) => {
|
|
|
|
|
if(value===null){
|
|
|
|
|
if (value === null) {
|
|
|
|
|
this.setState({
|
|
|
|
|
deadline_at:""
|
|
|
|
|
deadline_at: ""
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
if(moment(handleDateString(dateString))===undefined||moment(handleDateString(dateString))===null||moment(handleDateString(dateString))===""){
|
|
|
|
|
} else {
|
|
|
|
|
if (moment(handleDateString(dateString)) === undefined || moment(handleDateString(dateString)) === null || moment(handleDateString(dateString)) === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
deadline_attypes:true
|
|
|
|
|
deadline_attypes: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
deadline_attypes:false
|
|
|
|
|
deadline_attypes: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(moment(handleDateString(dateString))<moment(new Date())){
|
|
|
|
|
if (moment(handleDateString(dateString)) < moment(new Date())) {
|
|
|
|
|
this.setState({
|
|
|
|
|
deadline_attypexy:true
|
|
|
|
|
deadline_attypexy: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
deadline_attypexy:false
|
|
|
|
|
deadline_attypexy: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -246,21 +244,21 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setcheckoutcontent=()=>{
|
|
|
|
|
setcheckoutcontent = () => {
|
|
|
|
|
const content = this.contentMdRef.current.getValue().trim();
|
|
|
|
|
if(content===undefined||content===null||content===""){
|
|
|
|
|
if (content === undefined || content === null || content === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
contenttypes:true
|
|
|
|
|
contenttypes: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
contenttypes:false
|
|
|
|
|
contenttypes: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setcheckout=(min_price,max_price)=>{
|
|
|
|
|
setcheckout = (min_price, max_price) => {
|
|
|
|
|
// if(min_price===undefined){
|
|
|
|
|
// this.setState({
|
|
|
|
|
// min_pricetype:true
|
|
|
|
@ -295,24 +293,24 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if(parseInt(min_price)<=0){
|
|
|
|
|
if (parseInt(min_price) <= 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
smallstype:true
|
|
|
|
|
smallstype: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
smallstype:false
|
|
|
|
|
smallstype: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(parseInt(max_price)<parseInt(min_price)){
|
|
|
|
|
if (parseInt(max_price) < parseInt(min_price)) {
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
minmaxtype:true
|
|
|
|
|
minmaxtype: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
minmaxtype:false
|
|
|
|
|
minmaxtype: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -320,52 +318,52 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setPublication=(type)=>{
|
|
|
|
|
setPublication = (type) => {
|
|
|
|
|
const content = this.contentMdRef.current.getValue().trim();
|
|
|
|
|
// console.log(content)
|
|
|
|
|
// console.log(this.state.deadline_at._i)
|
|
|
|
|
this.setState({
|
|
|
|
|
publish:type
|
|
|
|
|
publish: type
|
|
|
|
|
})
|
|
|
|
|
let types=type;
|
|
|
|
|
let {category,title,attachment_ids,deadline_at,min_price,max_price,contact_name,contact_phone,code,modalCancel}=this.state;
|
|
|
|
|
let types = type;
|
|
|
|
|
let { category, title, attachment_ids, deadline_at, min_price, max_price, contact_name, contact_phone, code, modalCancel } = this.state;
|
|
|
|
|
|
|
|
|
|
if(category===undefined||category===null||category===""){
|
|
|
|
|
if (category === undefined || category === null || category === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
categorytypes:true
|
|
|
|
|
categorytypes: true
|
|
|
|
|
})
|
|
|
|
|
this.scrollToAnchor("publishtimestart");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(title===undefined||title===null||title===""){
|
|
|
|
|
if (title === undefined || title === null || title === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
titletypes:true
|
|
|
|
|
titletypes: true
|
|
|
|
|
})
|
|
|
|
|
this.scrollToAnchor("publishtimestart");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(content===undefined||content===null||content===""){
|
|
|
|
|
if (content === undefined || content === null || content === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
contenttypes:true
|
|
|
|
|
contenttypes: true
|
|
|
|
|
})
|
|
|
|
|
this.scrollToAnchor("publishtimestart");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(deadline_at===undefined||deadline_at===null||deadline_at===""){
|
|
|
|
|
if (deadline_at === undefined || deadline_at === null || deadline_at === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
deadline_attypes:true
|
|
|
|
|
deadline_attypes: true
|
|
|
|
|
})
|
|
|
|
|
this.scrollToAnchor("publishtime");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(moment(deadline_at)<moment(new Date())){
|
|
|
|
|
if (moment(deadline_at) < moment(new Date())) {
|
|
|
|
|
this.setState({
|
|
|
|
|
deadline_attypexy:true
|
|
|
|
|
deadline_attypexy: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -394,24 +392,24 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if(parseInt(min_price)<=0){
|
|
|
|
|
if (parseInt(min_price) <= 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
smallstype:true
|
|
|
|
|
smallstype: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(parseInt(max_price)<parseInt(min_price)){
|
|
|
|
|
if (parseInt(max_price) < parseInt(min_price)) {
|
|
|
|
|
this.setState({
|
|
|
|
|
minmaxtype:true
|
|
|
|
|
minmaxtype: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(contact_name===undefined||contact_name===""||contact_name===null){
|
|
|
|
|
if (contact_name === undefined || contact_name === "" || contact_name === null) {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_nametype:true
|
|
|
|
|
contact_nametype: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -426,33 +424,33 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.props.current_user&&this.props.current_user.phone===null||modalCancel===true){
|
|
|
|
|
if(contact_phone===undefined||contact_phone===null||contact_phone===""){
|
|
|
|
|
if (this.props.current_user && this.props.current_user.phone === null || modalCancel === true) {
|
|
|
|
|
if (contact_phone === undefined || contact_phone === null || contact_phone === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_phonetype:true
|
|
|
|
|
contact_phonetype: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(checkPhone(contact_phone)===false){
|
|
|
|
|
if (checkPhone(contact_phone) === false) {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_phonetypes:true
|
|
|
|
|
contact_phonetypes: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(code===undefined||code===""||code===null){
|
|
|
|
|
if (code === undefined || code === "" || code === null) {
|
|
|
|
|
this.setState({
|
|
|
|
|
codeypes:true
|
|
|
|
|
codeypes: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:true
|
|
|
|
|
springtype: true
|
|
|
|
|
})
|
|
|
|
|
if(this.props.match.params.id===undefined){
|
|
|
|
|
if (this.props.match.params.id === undefined) {
|
|
|
|
|
const url = `/project_packages.json`;
|
|
|
|
|
|
|
|
|
|
axios.post(url, {
|
|
|
|
@ -460,44 +458,44 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
title: title,
|
|
|
|
|
content: content,
|
|
|
|
|
attachment_ids: attachment_ids,
|
|
|
|
|
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.real_name:contact_name,
|
|
|
|
|
contact_phone: contact_phone===undefined?this.props.current_user&&this.props.current_user.phone:contact_phone,
|
|
|
|
|
code:code,
|
|
|
|
|
publish:types
|
|
|
|
|
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.real_name : contact_name,
|
|
|
|
|
contact_phone: contact_phone === undefined ? this.props.current_user && this.props.current_user.phone : contact_phone,
|
|
|
|
|
code: code,
|
|
|
|
|
publish: types
|
|
|
|
|
}
|
|
|
|
|
).then((response) => {
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
if(type===true){
|
|
|
|
|
if (response.data.status === 0) {
|
|
|
|
|
if (type === true) {
|
|
|
|
|
this.props.setPublicationfun(response.data.id)
|
|
|
|
|
}else{
|
|
|
|
|
window.location.href="/crowdsourcing/"+response.data.id
|
|
|
|
|
} else {
|
|
|
|
|
window.location.href = "/crowdsourcing/" + response.data.id
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:false
|
|
|
|
|
springtype: false
|
|
|
|
|
})
|
|
|
|
|
}else if(response.data.status===-1){
|
|
|
|
|
if(response.data.message==="无效的验证码"){
|
|
|
|
|
} else if (response.data.status === -1) {
|
|
|
|
|
if (response.data.message === "无效的验证码") {
|
|
|
|
|
this.setState({
|
|
|
|
|
codeypesno:true,
|
|
|
|
|
springtype:false
|
|
|
|
|
codeypesno: true,
|
|
|
|
|
springtype: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:false
|
|
|
|
|
springtype: false
|
|
|
|
|
})
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:false
|
|
|
|
|
springtype: false
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
// edit
|
|
|
|
|
|
|
|
|
@ -508,39 +506,39 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
title: title,
|
|
|
|
|
content: content,
|
|
|
|
|
attachment_ids: attachment_ids,
|
|
|
|
|
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.real_name:contact_name,
|
|
|
|
|
contact_phone: contact_phone===undefined?this.props.current_user&&this.props.current_user.phone:contact_phone,
|
|
|
|
|
code:code,
|
|
|
|
|
publish:types
|
|
|
|
|
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.real_name : contact_name,
|
|
|
|
|
contact_phone: contact_phone === undefined ? this.props.current_user && this.props.current_user.phone : contact_phone,
|
|
|
|
|
code: code,
|
|
|
|
|
publish: types
|
|
|
|
|
}
|
|
|
|
|
).then((response) => {
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
if(type===true){
|
|
|
|
|
if (response.data.status === 0) {
|
|
|
|
|
if (type === true) {
|
|
|
|
|
this.props.setPublicationfun(response.data.id)
|
|
|
|
|
}else{
|
|
|
|
|
window.location.href="/crowdsourcing/"+response.data.id
|
|
|
|
|
} else {
|
|
|
|
|
window.location.href = "/crowdsourcing/" + response.data.id
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:false
|
|
|
|
|
springtype: false
|
|
|
|
|
})
|
|
|
|
|
}else if(response.data.status===-1){
|
|
|
|
|
if(response.data.message==="无效的验证码"){
|
|
|
|
|
} else if (response.data.status === -1) {
|
|
|
|
|
if (response.data.message === "无效的验证码") {
|
|
|
|
|
this.setState({
|
|
|
|
|
codeypesno:true,
|
|
|
|
|
springtype:false
|
|
|
|
|
codeypesno: true,
|
|
|
|
|
springtype: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:false
|
|
|
|
|
springtype: false
|
|
|
|
|
})
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:false
|
|
|
|
|
springtype: false
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -551,92 +549,92 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
modalCancel=()=>{
|
|
|
|
|
modalCancel = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
modalCancel:false,
|
|
|
|
|
contact_phone:undefined,
|
|
|
|
|
code:undefined,
|
|
|
|
|
modalCancel: false,
|
|
|
|
|
contact_phone: undefined,
|
|
|
|
|
code: undefined,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
editmodels=()=>{
|
|
|
|
|
editmodels = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
modalCancel:true
|
|
|
|
|
modalCancel: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setcategory=(value)=>{
|
|
|
|
|
if(value===undefined||value===null||value===""){
|
|
|
|
|
setcategory = (value) => {
|
|
|
|
|
if (value === undefined || value === null || value === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
categorytypes:true
|
|
|
|
|
categorytypes: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
categorytypes:false
|
|
|
|
|
categorytypes: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
category:value
|
|
|
|
|
category: value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
settitlefun=(e)=>{
|
|
|
|
|
settitlefun = (e) => {
|
|
|
|
|
|
|
|
|
|
if(e.target.value===undefined||e.target.value===null||e.target.value===""){
|
|
|
|
|
if (e.target.value === undefined || e.target.value === null || e.target.value === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
titletypes:true
|
|
|
|
|
titletypes: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
titletypes:false
|
|
|
|
|
titletypes: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
title:e.target.value
|
|
|
|
|
title: e.target.value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onChangemin_prices=(e)=>{
|
|
|
|
|
let{max_price}=this.state;
|
|
|
|
|
onChangemin_prices = (e) => {
|
|
|
|
|
let { max_price } = this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
min_price:e.target.value
|
|
|
|
|
min_price: e.target.value
|
|
|
|
|
})
|
|
|
|
|
this.setcheckout(e.target.value,max_price)
|
|
|
|
|
this.setcheckout(e.target.value, max_price)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
onChangemax_prices=(e)=>{
|
|
|
|
|
let{min_price}=this.state;
|
|
|
|
|
onChangemax_prices = (e) => {
|
|
|
|
|
let { min_price } = this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
max_price:e.target.value
|
|
|
|
|
max_price: e.target.value
|
|
|
|
|
})
|
|
|
|
|
this.setcheckout(min_price,e.target.value)
|
|
|
|
|
this.setcheckout(min_price, e.target.value)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onChangeContact_name=(e)=>{
|
|
|
|
|
onChangeContact_name = (e) => {
|
|
|
|
|
|
|
|
|
|
if(e.target.value===undefined||e.target.value===""||e.target.value===null){
|
|
|
|
|
if (e.target.value === undefined || e.target.value === "" || e.target.value === null) {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_nametype:true
|
|
|
|
|
contact_nametype: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_nametype:false
|
|
|
|
|
contact_nametype: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_name:e.target.value
|
|
|
|
|
contact_name: e.target.value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onChangeContact_phone=(e)=>{
|
|
|
|
|
let {modalCancel}=this.state;
|
|
|
|
|
onChangeContact_phone = (e) => {
|
|
|
|
|
let { modalCancel } = this.state;
|
|
|
|
|
// if(modalCancel===false){
|
|
|
|
|
// if(this.props.current_user.phone===undefined||this.props.current_user.phone===null||this.props.current_user.phone===""){
|
|
|
|
|
// this.setState({
|
|
|
|
@ -648,46 +646,46 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if(this.props.current_user&&this.props.current_user.phone===null||modalCancel===true){
|
|
|
|
|
if(e.target.value===undefined||e.target.value===null||e.target.value===""){
|
|
|
|
|
if (this.props.current_user && this.props.current_user.phone === null || modalCancel === true) {
|
|
|
|
|
if (e.target.value === undefined || e.target.value === null || e.target.value === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_phonetype:true
|
|
|
|
|
contact_phonetype: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_phonetype:false
|
|
|
|
|
contact_phonetype: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(checkPhone(e.target.value)===false){
|
|
|
|
|
if (checkPhone(e.target.value) === false) {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_phonetypes:true
|
|
|
|
|
contact_phonetypes: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_phonetypes:false
|
|
|
|
|
contact_phonetypes: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_phone:e.target.value
|
|
|
|
|
contact_phone: e.target.value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onChangeCode=(e)=>{
|
|
|
|
|
if(e.target.value===undefined||e.target.value===""||e.target.value===null){
|
|
|
|
|
onChangeCode = (e) => {
|
|
|
|
|
if (e.target.value === undefined || e.target.value === "" || e.target.value === null) {
|
|
|
|
|
this.setState({
|
|
|
|
|
codeypes:true
|
|
|
|
|
codeypes: true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
codeypes:false
|
|
|
|
|
codeypes: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
code:e.target.value
|
|
|
|
|
code: e.target.value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -697,21 +695,21 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
// 找到锚点
|
|
|
|
|
let anchorElement = document.getElementById(anchorName);
|
|
|
|
|
// 如果对应id的锚点存在,就跳转到锚点
|
|
|
|
|
if(anchorElement) { anchorElement.scrollIntoView(); }
|
|
|
|
|
if (anchorElement) { anchorElement.scrollIntoView(); }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {modalCancel,seconds,getverificationcodes,attachments,
|
|
|
|
|
category,title}=this.state;
|
|
|
|
|
let categorylist=[
|
|
|
|
|
{name:"前端开发",value:"front"},
|
|
|
|
|
{name:"后端开发",value:"backend"},
|
|
|
|
|
{name:"移动开发",value:"mobile"},
|
|
|
|
|
{name:"数据库",value:"database"},
|
|
|
|
|
{name:"云计算和大数据",value:"cloud_compute_and_big_data"},
|
|
|
|
|
{name:"人工智能",value:"ai"},
|
|
|
|
|
{name:"其他",value:"other"},
|
|
|
|
|
let { modalCancel, seconds, getverificationcodes, attachments,
|
|
|
|
|
category, title } = this.state;
|
|
|
|
|
let categorylist = [
|
|
|
|
|
{ name: "前端开发", value: "front" },
|
|
|
|
|
{ name: "后端开发", value: "backend" },
|
|
|
|
|
{ name: "移动开发", value: "mobile" },
|
|
|
|
|
{ name: "数据库", value: "database" },
|
|
|
|
|
{ name: "云计算和大数据", value: "cloud_compute_and_big_data" },
|
|
|
|
|
{ name: "人工智能", value: "ai" },
|
|
|
|
|
{ name: "其他", value: "other" },
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -733,27 +731,27 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
|
|
|
|
|
<p className="clearfix mb20 shaiContent" >
|
|
|
|
|
<div className="fl pr shaiAllItem pagetype">
|
|
|
|
|
{this.state.categories.map((item,key)=>{
|
|
|
|
|
return(
|
|
|
|
|
<li key={key} className={category===item.id?"shaiItem shixun_repertoire active borderccc":"shaiItem shixun_repertoire borderccc"} value={item.id} onClick={()=>this.setcategory(item.id)}>{item.name}</li>
|
|
|
|
|
{this.state.categories.map((item, key) => {
|
|
|
|
|
return (
|
|
|
|
|
<li key={key} className={category === item.id ? "shaiItem shixun_repertoire active borderccc" : "shaiItem shixun_repertoire borderccc"} value={item.id} onClick={() => this.setcategory(item.id)}>{item.name}</li>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
{this.state.categorytypes===true?<div className={"color-red mb10"}>请选择类型</div>:""}
|
|
|
|
|
{this.state.categorytypes === true ? <div className={"color-red mb10"}>请选择类型</div> : ""}
|
|
|
|
|
|
|
|
|
|
<div className="ant-form-item-label mb15">
|
|
|
|
|
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16" >需求标题和详情</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Input placeholder="请输入需求标题,示例:美食类APP开发,最大限制60个字符" maxLength="60" className="input-100-40s mt5 fafafas"
|
|
|
|
|
value={title} onInput={this.settitlefun}/>
|
|
|
|
|
{this.state.titletypes===true?<div className={"color-red mt10"}>不能为空</div>:""}
|
|
|
|
|
value={title} onInput={this.settitlefun} />
|
|
|
|
|
{this.state.titletypes === true ? <div className={"color-red mt10"}>不能为空</div> : ""}
|
|
|
|
|
<MDEditors ref={this.contentMdRef} placeholder="请填写清晰完整的需求内容" mdID={'courseContentMD'} refreshTimeout={1500}
|
|
|
|
|
watch={false} className="courseMessageMD" initValue={this.state.content} setcheckoutcontent={()=>this.setcheckoutcontent()}></MDEditors>
|
|
|
|
|
watch={false} className="courseMessageMD" initValue={this.state.content} setcheckoutcontent={() => this.setcheckoutcontent()}></MDEditors>
|
|
|
|
|
{/* 请求status 422 */}
|
|
|
|
|
{this.state.contenttypes===true?<div className={"color-red"}>不能为空</div>:""}
|
|
|
|
|
{this.state.contenttypes === true ? <div className={"color-red"}>不能为空</div> : ""}
|
|
|
|
|
{/*<div className="df uploadBtn">*/}
|
|
|
|
|
{/*<a href="javascript:void(0);" className="fl" onClick={() => window.$('#_file').click()}*/}
|
|
|
|
|
{/*data-tip-down="请选择文件上传">*/}
|
|
|
|
@ -801,7 +799,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className={"stud-class-set padding30 coursenavbox edu-back-white"} style={{borderTop: '1px solid #EAEAEA'}} id={"publishtime"}>
|
|
|
|
|
<div className={"stud-class-set padding30 coursenavbox edu-back-white"} style={{ borderTop: '1px solid #EAEAEA' }} id={"publishtime"}>
|
|
|
|
|
<div className={"ant-row contentbox mdInForm "}>
|
|
|
|
|
<div className="ant-form-item-label mb10">
|
|
|
|
|
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16">工期与预算</label>
|
|
|
|
@ -812,7 +810,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
showToday={false}
|
|
|
|
|
showTime={{ format: 'HH:mm' }}
|
|
|
|
|
locale={locale}
|
|
|
|
|
style={{"width": "260px"}}
|
|
|
|
|
style={{ "width": "260px" }}
|
|
|
|
|
format="YYYY-MM-DD HH:mm"
|
|
|
|
|
placeholder="请选择任务的竞标截止日期"
|
|
|
|
|
className={"fafas"}
|
|
|
|
@ -823,18 +821,18 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
onChange={this.onChangeTimePicker}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{this.state.deadline_attypes===true?<div className={"color-red ml100"}>不能为空</div>:""}
|
|
|
|
|
{this.state.deadline_attypes === true ? <div className={"color-red ml100"}>不能为空</div> : ""}
|
|
|
|
|
|
|
|
|
|
{this.state.deadline_attypexy===true?<div className={"color-red ml100"}>不能早于当前时间</div>:""}
|
|
|
|
|
{this.state.deadline_attypexy === true ? <div className={"color-red ml100"}>不能早于当前时间</div> : ""}
|
|
|
|
|
</p>
|
|
|
|
|
<p className="clearfix mb20 shaiContent">
|
|
|
|
|
<span className="shaiTitle fl mt5 ml10">支付费用:</span>
|
|
|
|
|
<Input
|
|
|
|
|
className={"fafas"}
|
|
|
|
|
style={{"width": "260px"}}
|
|
|
|
|
style={{ "width": "260px" }}
|
|
|
|
|
value={this.state.min_price}
|
|
|
|
|
placeholder="支付多少费用(最低)"
|
|
|
|
|
onInput={(e)=>this.onChangemin_prices(e)}
|
|
|
|
|
onInput={(e) => this.onChangemin_prices(e)}
|
|
|
|
|
suffix={
|
|
|
|
|
<span >¥</span>
|
|
|
|
|
}
|
|
|
|
@ -842,17 +840,17 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
<span className={"ml10 mr10"}>~</span>
|
|
|
|
|
<Input
|
|
|
|
|
className={"fafas"}
|
|
|
|
|
style={{"width": "260px"}}
|
|
|
|
|
style={{ "width": "260px" }}
|
|
|
|
|
value={this.state.max_price}
|
|
|
|
|
placeholder="支付多少费用(最高)"
|
|
|
|
|
onInput={(e)=>this.onChangemax_prices(e)}
|
|
|
|
|
onInput={(e) => this.onChangemax_prices(e)}
|
|
|
|
|
suffix={
|
|
|
|
|
<span>¥</span>
|
|
|
|
|
}
|
|
|
|
|
/><span className={"pagenoedits"}>不填,则表示可议价</span>
|
|
|
|
|
{this.state.min_pricetype===true?<div className={"color-red ml100"}>不能为空</div>:""}
|
|
|
|
|
{this.state.smallstype===true?<div className={"color-red ml100"}>不能小于零</div>:""}
|
|
|
|
|
{this.state.minmaxtype===true?<div className={"color-red ml100"}>最高费用不能小于最低费用</div>:""}
|
|
|
|
|
{this.state.min_pricetype === true ? <div className={"color-red ml100"}>不能为空</div> : ""}
|
|
|
|
|
{this.state.smallstype === true ? <div className={"color-red ml100"}>不能小于零</div> : ""}
|
|
|
|
|
{this.state.minmaxtype === true ? <div className={"color-red ml100"}>最高费用不能小于最低费用</div> : ""}
|
|
|
|
|
</p>
|
|
|
|
|
<div className="ant-form-item-label mb10">
|
|
|
|
|
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16" >联系方式</label>
|
|
|
|
@ -861,29 +859,29 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
<span className="shaiTitle fl mt5 ml40">姓名:</span>
|
|
|
|
|
<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.real_name:this.state.contact_name}
|
|
|
|
|
style={{ "width": "260px" }}
|
|
|
|
|
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)}
|
|
|
|
|
onInput={(e) => this.onChangeContact_name(e)}
|
|
|
|
|
/>
|
|
|
|
|
{this.state.contact_nametype===true?<div className={"color-red ml100"}>不能为空</div>:""}
|
|
|
|
|
{this.state.contact_nametype === true ? <div className={"color-red ml100"}>不能为空</div> : ""}
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
{this.props.current_user&&this.props.current_user.phone!=null&&modalCancel===false?<p className="clearfix mb20 shaiContent">
|
|
|
|
|
{this.props.current_user && this.props.current_user.phone != null && modalCancel === false ? <p className="clearfix mb20 shaiContent">
|
|
|
|
|
<span className="shaiTitle fl mt5 ml25">手机号:</span>
|
|
|
|
|
<Input
|
|
|
|
|
className={"fafafas fl"}
|
|
|
|
|
style={{"width": "260px"}}
|
|
|
|
|
value={this.state.phones===undefined?this.props.current_user&&this.props.current_user.phone:this.state.phones}
|
|
|
|
|
style={{ "width": "260px" }}
|
|
|
|
|
value={this.state.phones === undefined ? this.props.current_user && this.props.current_user.phone : this.state.phones}
|
|
|
|
|
placeholder="请输入手机号"
|
|
|
|
|
disabled={true}
|
|
|
|
|
/>
|
|
|
|
|
<a className="fl ml20 mt10">
|
|
|
|
|
<i className="iconfont icon-bianjidaibeijing font-20 color-blue" onClick={()=>this.editmodels()}></i>
|
|
|
|
|
<i className="iconfont icon-bianjidaibeijing font-20 color-blue" onClick={() => this.editmodels()}></i>
|
|
|
|
|
</a>
|
|
|
|
|
</p>:""}
|
|
|
|
|
</p> : ""}
|
|
|
|
|
{/*{this.state.current_userphonetype===true?<div className={"color-red ml100"}>不能为空</div>:""}*/}
|
|
|
|
|
{this.props.current_user&&this.props.current_user.phone===null||modalCancel===true?<p className="clearfix mb20 shaiContent">
|
|
|
|
|
{this.props.current_user && this.props.current_user.phone === null || modalCancel === true ? <p className="clearfix mb20 shaiContent">
|
|
|
|
|
<span className="shaiTitle mt5 fl">
|
|
|
|
|
<span className="shaiTitle fl mt5 ml25">
|
|
|
|
|
{/*未注册才显示!*/}
|
|
|
|
@ -891,13 +889,13 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
手机号:</span>
|
|
|
|
|
<Input
|
|
|
|
|
className={"fafafas fl"}
|
|
|
|
|
style={{"width": "260px"}}
|
|
|
|
|
style={{ "width": "260px" }}
|
|
|
|
|
value={this.state.contact_phone}
|
|
|
|
|
placeholder="请输入手机号码"
|
|
|
|
|
onInput={(e)=>this.onChangeContact_phone(e)}
|
|
|
|
|
onInput={(e) => this.onChangeContact_phone(e)}
|
|
|
|
|
/>
|
|
|
|
|
{this.state.contact_phonetype===true?<div className={"color-red ml100"}>不能为空</div>:""}
|
|
|
|
|
{this.state.contact_phonetypes===true?<div className={"color-red ml100"}>请输入正确的手机号</div>:""}
|
|
|
|
|
{this.state.contact_phonetype === true ? <div className={"color-red ml100"}>不能为空</div> : ""}
|
|
|
|
|
{this.state.contact_phonetypes === true ? <div className={"color-red ml100"}>请输入正确的手机号</div> : ""}
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span className="shaiTitle mt5 ml17 fl">
|
|
|
|
@ -908,21 +906,21 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
className="fafas"
|
|
|
|
|
placeholder="请输入验证码"
|
|
|
|
|
enterButton={
|
|
|
|
|
getverificationcodes === undefined ? <span>重新发送 ({seconds}s)</span>: getverificationcodes === true ?<span >获取验证码</span> :<span >重新发送</span>}
|
|
|
|
|
onSearch={()=>this.getverificationcode()}
|
|
|
|
|
onInput={(e)=>this.onChangeCode(e)}
|
|
|
|
|
getverificationcodes === undefined ? <span>重新发送 ({seconds}s)</span> : getverificationcodes === true ? <span >获取验证码</span> : <span >重新发送</span>}
|
|
|
|
|
onSearch={() => this.getverificationcode()}
|
|
|
|
|
onInput={(e) => this.onChangeCode(e)}
|
|
|
|
|
/>
|
|
|
|
|
{this.state.codeypes===true?<div className={"color-red"}>验证码不能为空</div>:""}
|
|
|
|
|
{this.state.codeypesno===true?<div className={"color-red"}>验证码不正确</div>:""}
|
|
|
|
|
{this.state.codeypes === true ? <div className={"color-red"}>验证码不能为空</div> : ""}
|
|
|
|
|
{this.state.codeypesno === true ? <div className={"color-red"}>验证码不正确</div> : ""}
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
|
|
|
|
{/*<Button type="primary" className="defalutSubmitbtn ml10 defalutSubmitbtnmodels">重新发送()</Button>*/}
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
<a className="fl mt8 mt15">
|
|
|
|
|
<span className="font-18 color-blue" onClick={()=>this.modalCancel()}>X</span>
|
|
|
|
|
<span className="font-18 color-blue" onClick={() => this.modalCancel()}>X</span>
|
|
|
|
|
</a>
|
|
|
|
|
</p>:""}
|
|
|
|
|
</p> : ""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -930,8 +928,8 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<div className="clearfix mt30 mb30">
|
|
|
|
|
<Button type="primary" className="defalutSubmitbtn fl mr20 defalutSubmitbtns" onClick={()=>this.setPublication(true)}>申请发布</Button>
|
|
|
|
|
<a className="defalutCancelbtns fl" onClick={()=>this.setPublication(false)}>保存</ a>
|
|
|
|
|
<Button type="primary" className="defalutSubmitbtn fl mr20 defalutSubmitbtns" onClick={() => this.setPublication(true)}>申请发布</Button>
|
|
|
|
|
<a className="defalutCancelbtns fl" onClick={() => this.setPublication(false)}>保存</ a>
|
|
|
|
|
</div>
|
|
|
|
|
</Spin>
|
|
|
|
|
</div>
|
|
|
|
|