Commit f816e177 by wufan

fix:修复banner图跨域问题

parent d77af3a5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wufan * @Author: wufan
* @Date: 2020-11-30 10:47:38 * @Date: 2020-11-30 10:47:38
* @LastEditors: wufan * @LastEditors: wufan
* @LastEditTime: 2021-01-03 22:37:32 * @LastEditTime: 2021-01-18 14:53:17
* @Description: web店铺banner页面 * @Description: web店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -269,15 +269,18 @@ class StoreH5Decoration extends React.Component { ...@@ -269,15 +269,18 @@ class StoreH5Decoration 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);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wufan * @Author: wufan
* @Date: 2020-11-30 10:47:38 * @Date: 2020-11-30 10:47:38
* @LastEditors: wufan * @LastEditors: wufan
* @LastEditTime: 2021-01-04 11:11:38 * @LastEditTime: 2021-01-18 14:59:57
* @Description: web店铺banner页面 * @Description: web店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -268,15 +268,17 @@ class StoreWebDecoration extends React.Component { ...@@ -268,15 +268,17 @@ class StoreWebDecoration 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