project_pack
杨树明 6 years ago
parent 8fa638e0d6
commit a8e252f41e

@ -144,22 +144,23 @@ class PackageIndexNEIBannerConcent extends Component {
content: content,
attachment_ids: attachment_ids,
deadline_at:deadline_at._i,
min_price:parseInt(min_price).toFixed(2),
max_price:parseInt(max_price).toFixed(2),
min_price:min_price,
max_price:max_price,
contact_name: contact_name,
contact_phone: contact_phone,
code:code,
publish:types
}
).then((response) => {
debugger
if(response.data.status===0){
this.props.setPublicationfun(response.data.id)
}
}).catch((error) => {
console.log(error)
})
this.props.setPublicationfun()
}
modalCancel=()=>{
@ -221,7 +222,7 @@ class PackageIndexNEIBannerConcent extends Component {
}
render() {
let {modalCancel,seconds,getverificationcodes,
let {modalCancel,seconds,getverificationcodes,attachments_url,
category,title}=this.state;
let categorylist=[
{name:"前端开发",value:"front"},
@ -269,31 +270,52 @@ class PackageIndexNEIBannerConcent extends Component {
{/* 请求status 422 */}
<form className="newForm newFormbox mt10 mb20">
<span id={`attachments_fields`} className="attachments_fields"
xmlns="http://www.w3.org/1999/html">
</span>
<span className="add_attachment">
<input className="file_selector"
data-are-you-sure="您确定要删除吗?"
data-delete-all-files="您确定要删除所有文件吗"
data-description-placeholder="可选的描述"
data-field-is-public="公开"
data-file-count="个文件已上传"
data-lebel-file-uploding="个文件正在上传"
data-max-concurrent-uploads="2"
data-max-file-size-message="该文件无法上传。超过文件大小限制 (10 MB)建议上传到百度云等其他共享工具里然后在txt文档里给出链接以及共享密码并上传"
data-max-file-size="10485760" data-upload-path="/uploads.js"
id="_file"
multiple="multiple" name="attachments[dummy][file]"
onChange={() => {
debugger;
console.log(window.$('.file_selector')[0])
window.addInputFiles(window.$('.file_selector')[0])
}}
style={{'display': 'none'}} type="file">
</input>
</span>
{/*<form className="newForm newFormbox mt10 mb20">*/}
{/*<span id={`attachments_fields`} className="attachments_fields"*/}
{/*xmlns="http://www.w3.org/1999/html">*/}
{/*</span>*/}
{/*<span className="add_attachment">*/}
{/*<input className="file_selector"*/}
{/*data-are-you-sure="您确定要删除吗?"*/}
{/*data-delete-all-files="您确定要删除所有文件吗"*/}
{/*data-description-placeholder="可选的描述"*/}
{/*data-field-is-public="公开"*/}
{/*data-file-count="个文件已上传"*/}
{/*data-lebel-file-uploding="个文件正在上传"*/}
{/*data-max-concurrent-uploads="2"*/}
{/*data-max-file-size-message="该文件无法上传。超过文件大小限制 (10 MB)建议上传到百度云等其他共享工具里然后在txt文档里给出链接以及共享密码并上传"*/}
{/*data-max-file-size="10485760" data-upload-path="/uploads.js"*/}
{/*id="_file"*/}
{/*multiple="multiple" name="attachments[dummy][file]"*/}
{/*onChange={() => {*/}
{/*debugger;*/}
{/*console.log(window.$('.file_selector')[0])*/}
{/*window.addInputFiles(window.$('.file_selector')[0])*/}
{/*}}*/}
{/*style={{'display': 'none'}} type="file">*/}
{/*</input>*/}
{/*</span>*/}
{/*</form>*/}
<form className="newForm">
<span id={`attachments_fields`} className="attachments_fields"
xmlns="http://www.w3.org/1999/html">
{ attachments_url && !!attachments_url.length &&
this.renderAttachment()
}
</span>
<span className="add_attachment">
<input className="file_selector" data-are-you-sure="您确定要删除吗?"
data-delete-all-files="您确定要删除所有文件吗" data-description-placeholder="可选的描述"
data-field-is-public="公开" data-file-count="个文件已上传"
data-lebel-file-uploding="个文件正在上传" data-max-concurrent-uploads="2"
data-max-file-size-message="该文件无法上传。超过文件大小限制 (50 MB)建议上传到百度云等其他共享工具里然后在txt文档里给出链接以及共享密码并上传"
data-max-file-size="52428800" data-upload-path="/uploads.js" id="_file"
multiple="multiple" name="attachments[dummy][file]"
onChange={()=>{debugger;window.addInputFiles( window.$('.file_selector')[0] ) }}
style={{'display':'none'}} type="file">
</input>
</span>
</form>
<div className="df uploadBtn">
@ -364,7 +386,7 @@ class PackageIndexNEIBannerConcent extends Component {
onInput={this.onChangeContact_name}
/>
</p>
<p className="clearfix mb20 shaiContent">
{modalCancel===false?<p className="clearfix mb20 shaiContent">
<span className="shaiTitle fl mt5 ml25">手机号</span>
<Input
className={"fafafas fl"}
@ -376,7 +398,7 @@ class PackageIndexNEIBannerConcent extends Component {
<a className="fl ml20">
<i className="iconfont icon-bianjidaibeijing font-26 color-blue" onClick={()=>this.editmodels()}></i>
</a>
</p>
</p>:""}
{modalCancel===true?<p className="clearfix mb20 shaiContent">
<span className="shaiTitle mt5 fl">

@ -34,7 +34,7 @@ class PackageIndexNEISubmit extends Component {
<div className={"sumbtongs mb5"}>提交成功</div>
<div className={"terraces mb5"}>平台正在审核您的申请审核结果将以平台消息的形式通知您</div>
<div className="clearfix mt30 mb30 padding251">
<a className="defalutCancelbtns fl" onClick={()=>this.setageload(1)}>查看发布需求</ a>
<a className="defalutCancelbtns fl" onClick={()=>this.setageload(this.props.id)}>查看发布需求</ a>
<Button type="primary" className="defalutSubmitbtn fl ml40 defalutSubmitbtns" onClick={()=>this.setageload()}>继续发布</Button>
</div>
</div>

@ -12,16 +12,18 @@ class PackageIndexNewandEditIndex extends Component{
constructor(props) {
super(props)
this.state = {
setPublication:false
setPublication:false,
id:undefined
}
}
componentDidMount(){
console.log(this.props)
}
setPublicationfun=()=>{
setPublicationfun=(ids)=>{
this.setState({
setPublication:true
setPublication:true,
id:ids
})
}
render() {
@ -46,6 +48,7 @@ class PackageIndexNewandEditIndex extends Component{
<div className={"educontent mt30 mb50"}>
<PackageIndexNEISubmit
{...this.props}
id={this.state.id}
/>
</div>}
</div>

Loading…
Cancel
Save