|
@@ -178,6 +178,7 @@ class ArticleManage extends React.Component {
|
|
|
let list = []
|
|
|
let obj = {}
|
|
|
obj.url = imgUrlMini
|
|
|
+ obj.status = "done",
|
|
|
obj.uid = '-2'
|
|
|
list.push(obj)
|
|
|
this.setState({
|
|
@@ -734,6 +735,19 @@ class ArticleManage extends React.Component {
|
|
|
<Icon type='plus' />
|
|
|
</div>
|
|
|
);
|
|
|
+ let SsoToken = util.auth.getToken();
|
|
|
+ let fileProps = {
|
|
|
+ action: WXMpAPI + "/wx/content/upload/",
|
|
|
+ listType: 'picture-card',
|
|
|
+ fileList: this.state.headImgList,
|
|
|
+ showUploadList: true,
|
|
|
+ onChange: result => this.handleChange(result),
|
|
|
+ onPreview:result => this.onPreview(result),
|
|
|
+ onRemove:result => this.removeImg(result),
|
|
|
+ headers:{
|
|
|
+ 'Sso-Token': SsoToken
|
|
|
+ },
|
|
|
+ };
|
|
|
return (
|
|
|
<div className="ArticleManage">
|
|
|
{/* <Modal
|
|
@@ -866,15 +880,7 @@ class ArticleManage extends React.Component {
|
|
|
</Form.Item>
|
|
|
|
|
|
<Form.Item label="封面图片">
|
|
|
- <Upload
|
|
|
- listType="picture-card"
|
|
|
- fileList={this.state.headImgList}
|
|
|
- showUploadList={{ showPreviewIcon: true }}
|
|
|
- onPreview={file => this.onPreview(file)}// 预览
|
|
|
- onRemove={file => this.removeImg("headImgList")}
|
|
|
- onChange={result => this.handleChange(result, "headImgList")}
|
|
|
- action={WXMpAPI + "/wx/content/upload "}
|
|
|
- >
|
|
|
+ <Upload {...fileProps}>
|
|
|
{this.state.headImgList.length >= 1 ? null : uploadButton}
|
|
|
</Upload>
|
|
|
</Form.Item>
|