Commit dc38ad1b by zhangleyuan

feat;上传图片增加时间戳

parent f816e177
...@@ -67,6 +67,7 @@ class ImgCutModalNew extends React.Component { ...@@ -67,6 +67,7 @@ class ImgCutModalNew extends React.Component {
}) })
} }
}; };
if (!photoclip) { if (!photoclip) {
const _photoclip = new PhotoClip('#imgCutModalNew', options); const _photoclip = new PhotoClip('#imgCutModalNew', options);
_photoclip.load(imageFile); _photoclip.load(imageFile);
......
...@@ -150,15 +150,16 @@ class AddLiveBasic extends React.Component { ...@@ -150,15 +150,16 @@ class AddLiveBasic extends React.Component {
}, },
}; };
const imgUrl = `${imageFile.ossUrl}?${new Date().getTime()}`
if (!this.state.photoclip) { if (!this.state.photoclip) {
const _photoclip = new PhotoClip("#headPicModal", options); const _photoclip = new PhotoClip("#headPicModal", options);
_photoclip.load(imageFile.ossUrl); _photoclip.load(imgUrl);
this.setState({ this.setState({
photoclip: _photoclip, photoclip: _photoclip,
}); });
} else { } else {
this.state.photoclip.clear(); this.state.photoclip.clear();
this.state.photoclip.load(imageFile.ossUrl); this.state.photoclip.load(imgUrl);
} }
}, 200); }, 200);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment