Commit beae7475 authored by 涂伟's avatar 涂伟

fix: '图片预览逻辑优化'

parent 52ac5165
Pipeline #73048 passed with stages
......@@ -265,7 +265,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
// })
// }
getImageUrl(path: string) {
getImageUrl(path: string,previewFlag: boolean) {
// return new Promise<string>((resolve, reject) => {
// DownLoadFiles({ module: '图库', filePath: path }).then(res=> {
// let reader = new FileReader();
......@@ -284,6 +284,9 @@ class PicturesWall extends React.Component<PicturesWallType> {
if (path && path.indexOf('assets') === 0) {
return `${window.location.origin}/civweb4/${path}`.replace(/\\/g, '/')
}
if (previewFlag) {
return path
}
return `/PandaOMS/OMS/FileCenter/DownLoadFiles?module=图库&filePath=${path}`
// return `${window.location.origin}/${path}`.replace(/\\/g, '/')
......@@ -476,7 +479,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
footer={null}
onCancel={this.handleCancel}
>
<img alt="预览图片" className={styles.svgBg} style={{ width: '100%' }} src={this.getImageUrl(previewImage)} />
<img alt="预览图片" className={styles.svgBg} style={{ width: '100%' }} src={this.getImageUrl(previewImage,true)} />
</Modal>
<Modal
visible={wallModalVisible}
......
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