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

@ -222,7 +222,7 @@ export default class MDEditors extends Component {
const _placeholder = placeholder || ""; const _placeholder = placeholder || "";
// amp; // amp;
// 编辑时要传memoId // 编辑时要传memoId
const imageUrl = `/api/attachments.json`; const imageUrl = `/upload_with_markdown?container_id=&container_type=Memo`;
// 创建editorMd // 创建editorMd
let react_id = `react_${_id}`; 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> <span className=" item-group-text">{moment(item.deadline_at).endOf('day').fromNow()}竞标截止</span>
</div> </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-icon"><i className="fa fa-user" ></i></span>
<span className=" item-group-text">{item.bidding_users_count}人竞标</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> watch={false} className="courseMessageMD" initValue={this.state.content} setcheckoutcontent={()=>this.setcheckoutcontent()}></MDEditors>
{/* 请求status 422 */} {/* 请求status 422 */}
{this.state.contenttypes===true?<div className={"color-red"}>不能为空</div>:""} {this.state.contenttypes===true?<div className={"color-red"}>不能为空</div>:""}
<div className="df uploadBtn"> {/*<div className="df uploadBtn">*/}
<a href="javascript:void(0);" className="fl" onClick={() => window.$('#_file').click()} {/*<a href="javascript:void(0);" className="fl" onClick={() => window.$('#_file').click()}*/}
data-tip-down="请选择文件上传"> {/*data-tip-down="请选择文件上传">*/}
{/*<i className="fa fa-upload mr5 color-blue"></i>*/} {/*/!*<i className="fa fa-upload mr5 color-blue"></i>*!/*/}
<span className="color-blue">上传附件</span> {/*<span className="color-blue">上传附件</span>*/}
</a> {/*</a>*/}
<span style={{ fontSize: "14px"}}>(最多可添加 <span className={"color-orange06"}>5</span> / <span className={"color-orange06"}>10MB</span>)</span> {/*<span style={{ fontSize: "14px"}}>(最多可添加 <span className={"color-orange06"}>5</span> 个图片/文件,每个大小不超过 <span className={"color-orange06"}>10MB</span>)</span>*/}
</div> {/*</div>*/}
{attachments&&attachments.map((item,key)=>{ {/*{attachments&&attachments.map((item,key)=>{*/}
return( {/*return(*/}
<div className={"newForm newFormbox mt10 "}> {/*<div className={"newForm newFormbox mt10 "}>*/}
<i className="color-green iconfont icon-fujian mr5 fl font-14 mt4"></i> {/*<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> {/*<a className="upload_filename color-grey readonly hidden fl mtf3 mr10 ml5" href={item.url}>{item.title} &nbsp; &nbsp;{bytesToSize(item.filesize)}</a>*/}
</div> {/*</div>*/}
)})} {/*)})}*/}
<form className="newForm newFormbox mt10 "> {/*<form className="newForm newFormbox mt10 ">*/}
<span id={`attachments_fields`} className="attachments_fields" {/*<span id={`attachments_fields`} className="attachments_fields"*/}
xmlns="http://www.w3.org/1999/html"> {/*xmlns="http://www.w3.org/1999/html">*/}
</span> {/*</span>*/}
<span className="add_attachment"> {/*<span className="add_attachment">*/}
<input className="file_selector" {/*<input className="file_selector"*/}
data-are-you-sure="您确定要删除吗?" {/*data-are-you-sure="您确定要删除吗?"*/}
data-delete-all-files="您确定要删除所有文件吗" {/*data-delete-all-files="您确定要删除所有文件吗"*/}
data-description-placeholder="可选的描述" {/*data-description-placeholder="可选的描述"*/}
data-field-is-public="公开" {/*data-field-is-public="公开"*/}
data-file-count="个文件已上传" {/*data-file-count="个文件已上传"*/}
data-lebel-file-uploding="个文件正在上传" {/*data-lebel-file-uploding="个文件正在上传"*/}
data-max-concurrent-uploads="2" {/*data-max-concurrent-uploads="2"*/}
data-max-file-size-message="该文件无法上传。超过文件大小限制 (10 MB)建议上传到百度云等其他共享工具里然后在txt文档里给出链接以及共享密码并上传" {/*data-max-file-size-message="该文件无法上传。超过文件大小限制 (10 MB)建议上传到百度云等其他共享工具里然后在txt文档里给出链接以及共享密码并上传"*/}
data-max-file-size="10485760" data-upload-path="/uploads.js" {/*data-max-file-size="10485760" data-upload-path="/uploads.js"*/}
id="_file" {/*id="_file"*/}
multiple="multiple" name="attachments[dummy][file]" {/*multiple="multiple" name="attachments[dummy][file]"*/}
onChange={() => { {/*onChange={() => {*/}
debugger; {/*debugger;*/}
console.log(window.$('.file_selector')[0]) {/*console.log(window.$('.file_selector')[0])*/}
window.addInputFiles(window.$('.file_selector')[0]) {/*window.addInputFiles(window.$('.file_selector')[0])*/}
}} {/*}}*/}
style={{'display': 'none'}} {/*style={{'display': 'none'}}*/}
type="file"> {/*type="file">*/}
</input> {/*</input>*/}
</span> {/*</span>*/}
</form> {/*</form>*/}
</div> </div>

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