Commit da36abd7 by zhangleyuan

feat:处理永中的标题显示

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