dev_aliyun
杨树明 6 years ago
parent 236a4a9134
commit 544b898082

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

@ -253,7 +253,7 @@ class PackageConcent extends Component {
<span className=" item-group-text">{moment(item.deadline_at).endOf('day').fromNow()}竞标截止</span>
</div>
<div className=" item-group item-other-bidding">
<div className=" item-group item-other-bidding pd35">
<span className=" item-group-icon"><i className="fa fa-user" ></i></span>
<span className=" item-group-text">{item.bidding_users_count}人竞标</span>

@ -734,48 +734,48 @@ class PackageIndexNEIBannerConcent extends Component {
watch={false} className="courseMessageMD" initValue={this.state.content} setcheckoutcontent={()=>this.setcheckoutcontent()}></MDEditors>
{/* 请求status 422 */}
{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="请选择文件上传">
{/*<i className="fa fa-upload mr5 color-blue"></i>*/}
<span className="color-blue">上传附件</span>
</a>
<span style={{ fontSize: "14px"}}>(最多可添加 <span className={"color-orange06"}>5</span> / <span className={"color-orange06"}>10MB</span>)</span>
</div>
{attachments&&attachments.map((item,key)=>{
return(
<div className={"newForm newFormbox mt10 "}>
<i className="color-green iconfont icon-fujian mr5 fl font-14 mt4"></i>
<a className="upload_filename color-grey readonly hidden fl mtf3 mr10 ml5" href={item.url}>{item.title} &nbsp; &nbsp;{bytesToSize(item.filesize)}</a>
</div>
)})}
<form className="newForm newFormbox mt10 ">
<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>
{/*<div className="df uploadBtn">*/}
{/*<a href="javascript:void(0);" className="fl" onClick={() => window.$('#_file').click()}*/}
{/*data-tip-down="请选择文件上传">*/}
{/*/!*<i className="fa fa-upload mr5 color-blue"></i>*!/*/}
{/*<span className="color-blue">上传附件</span>*/}
{/*</a>*/}
{/*<span style={{ fontSize: "14px"}}>(最多可添加 <span className={"color-orange06"}>5</span> 个图片/文件,每个大小不超过 <span className={"color-orange06"}>10MB</span>)</span>*/}
{/*</div>*/}
{/*{attachments&&attachments.map((item,key)=>{*/}
{/*return(*/}
{/*<div className={"newForm newFormbox mt10 "}>*/}
{/*<i className="color-green iconfont icon-fujian mr5 fl font-14 mt4"></i>*/}
{/*<a className="upload_filename color-grey readonly hidden fl mtf3 mr10 ml5" href={item.url}>{item.title} &nbsp; &nbsp;{bytesToSize(item.filesize)}</a>*/}
{/*</div>*/}
{/*)})}*/}
{/*<form className="newForm newFormbox mt10 ">*/}
{/*<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>*/}
</div>

@ -308,4 +308,8 @@
.pagemancenter{
text-align: center;
}
.pd35{
padding-left: 35px;
}
Loading…
Cancel
Save