Commit df301fc6 by zhangleyuan

feat:设置永中预览页面标题

parent 08b1b5a8
......@@ -156,7 +156,7 @@ class FolderList extends React.Component {
}
// 预览文件
handleScanFile = async (folder) => {
const { folderFormat, folderSize, ossUrl,rights,fileVersionId,id} = folder;
const { folderFormat, folderSize, ossUrl,rights,fileVersionId,id,folderName} = folder;
const {currentRootDisk } = this.props;
//如果是公共文件且只有查看的权限的用户的预览对接的三方是永中
const that = this;
......@@ -183,7 +183,7 @@ class FolderList extends React.Component {
const { previewing } = that.state;
if(previewing){
const previewSign = await that.getYoZoSign(response.data.data.fileVersionId,"VIEW");
const url = `https://eic.yozocloud.cn/api/view/file?fileVersionId=${response.data.data.fileVersionId}&appId=${appId}&sign=${previewSign}`
const url = `https://eic.yozocloud.cn/api/view/file?fileVersionId=${response.data.data.fileVersionId}&appId=${appId}&sign=${previewSign}&htmlTitle=${folderName}`
that.setState({
previewStatus:'UPLOAD_SUCCESS',
url
......@@ -193,7 +193,7 @@ class FolderList extends React.Component {
})
}else{
const previewSign = await that.getYoZoSign(fileVersionId,"VIEW");
const url = `http://eic.yozocloud.cn/api/view/file?fileVersionId=${fileVersionId}&appId=${appId}&sign=${previewSign}`
const url = `http://eic.yozocloud.cn/api/view/file?fileVersionId=${fileVersionId}&appId=${appId}&sign=${previewSign}&htmlTitle=${folderName}`
const a = document.createElement('a');
document.body.appendChild(a);
a.setAttribute('href', url);
......@@ -277,8 +277,6 @@ class FolderList extends React.Component {
this.handleDataDot(folderFormat);
}
cancelPreview = ()=>{
const rightDom = document.querySelector('.right-container');
rightDom.style.zIndex = 1;
this.setState({
previewing:false,
showPreviewModal:false,
......
import React from 'react';
import { Modal} from 'antd';
import "./PreviewFileModal.less";
import { Spin } from 'antd'
class PreviewFileModal extends React.Component {
constructor(props) {
super(props);
......@@ -26,7 +25,7 @@ class PreviewFileModal extends React.Component {
<div className="preview-modal-content">
<div className="load-img-box">
{previewStatus === "UPLOAD" &&
<img className="load-img" src="https://image.xiaomaiketang.com/xm/3j32ashQst.png"></img>
<Spin size="large"/>
}
{previewStatus === "UPLOAD_SUCCESS" &&
<img className="load-img" src="https://image.xiaomaiketang.com/xm/jJRK3bTEdc.png"></img>
......
......@@ -15,6 +15,9 @@
text-align:center;
width:266px;
height:174px;
.ant-spin-dot-item{
background-color: #FFF;
}
.load-img-box{
.load-img{
width:44px;
......
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