Commit da36abd7 by zhangleyuan

feat:处理永中的标题显示

parent df301fc6
......@@ -121,7 +121,7 @@ class FolderList extends React.Component {
break;
}
}
getYoZoSign = (data,type)=>{
getYoZoSign = (data,type,folderName)=>{
return new Promise((resolve) => {
let uploadParams;
if(type==="UPLOAD"){
......@@ -134,7 +134,8 @@ class FolderList extends React.Component {
uploadParams ={
fileVersionId:data,
instId:window.currentUserInstInfo.instId,
yoZoTypeEnum:'VIEW'
yoZoTypeEnum:'VIEW',
htmlTitle:folderName
}
}
Service.Apollo('public/apollo/getYoZoSign', uploadParams).then(res => {
......@@ -160,7 +161,7 @@ class FolderList extends React.Component {
const {currentRootDisk } = this.props;
//如果是公共文件且只有查看的权限的用户的预览对接的三方是永中
const that = this;
if(currentRootDisk.disk==="COMMON" && rights==="LOOK"){
if(currentRootDisk.disk==="COMMON"){
switch (folderFormat) {
case 'PDF':
case 'WORD':
......@@ -182,7 +183,7 @@ class FolderList extends React.Component {
that.saveYoZoFileVersionId(response.data.data.fileVersionId,id);
const { previewing } = that.state;
if(previewing){
const previewSign = await that.getYoZoSign(response.data.data.fileVersionId,"VIEW");
const previewSign = await that.getYoZoSign(response.data.data.fileVersionId,"VIEW",folderName);
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',
......@@ -192,7 +193,7 @@ class FolderList extends React.Component {
})
})
}else{
const previewSign = await that.getYoZoSign(fileVersionId,"VIEW");
const previewSign = await that.getYoZoSign(fileVersionId,"VIEW",folderName);
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);
......
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