Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
da36abd7
Commit
da36abd7
authored
Jun 11, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理永中的标题显示
parent
df301fc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/modules/resource-disk/components/FolderList.jsx
+6
-5
No files found.
src/modules/resource-disk/components/FolderList.jsx
View file @
da36abd7
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment