Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
schedule
Commits
2f541571
Commit
2f541571
authored
Dec 01, 2020
by
xiexiaoqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:file preview in dingtalk
parent
a8c02daf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
19 deletions
+15
-19
fileList.axml
components/fileList/fileList.axml
+2
-2
fileList.js
components/fileList/fileList.js
+11
-14
config.js
config.js
+1
-1
checkFullScren.js
utils/checkFullScren.js
+1
-2
No files found.
components/fileList/fileList.axml
View file @
2f541571
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
<text>{{item.name.slice(0, item.name.length - 5)}}</text>
<text>{{item.name.slice(0, item.name.length - 5)}}</text>
<text>{{item.name.slice(-5)}}</text>
<text>{{item.name.slice(-5)}}</text>
</view>
</view>
<view class="file-size">{{item.sizeShow}}</view>
<view class="file-size">{{item.sizeShow}}
{{showName ? item.userDetail.name : ''}}
</view>
<view a:if="{{
showName}}" class=" color4 file-showName">{{item.userDetail.name}}
</view>
<view a:if="{{
item.platform === 'dingTalk'}}" class=" color4 file-showName">来自钉盘
</view>
<view a:if="{{isCanDelete}}" class="iconfont iconicon_noAgreed1" catchTap="removeFile" data-id="{{item.fileId}}"></view>
<view a:if="{{isCanDelete}}" class="iconfont iconicon_noAgreed1" catchTap="removeFile" data-id="{{item.fileId}}"></view>
</view>
</view>
</view>
</view>
...
...
components/fileList/fileList.js
View file @
2f541571
...
@@ -87,27 +87,24 @@ create.Component({
...
@@ -87,27 +87,24 @@ create.Component({
projectName
:
'MING_MEETING'
,
projectName
:
'MING_MEETING'
,
fileIds
:
file
.
fileId
fileIds
:
file
.
fileId
}
}
if
(
file
.
spaceId
)
{
uploadPermissions
(
data
).
then
(
res
=>
{
dd
.
previewFileInDingTalk
({
dd
.
previewFileInDingTalk
({
corpId
:
dd
.
corpId
,
corpId
:
dd
.
corpId
,
spaceId
:
file
.
spaceId
,
spaceId
:
file
.
spaceId
,
fileId
:
file
.
fileId
,
fileId
:
file
.
fileId
,
fileName
:
file
.
name
,
fileName
:
file
.
name
,
fileSize
:
file
.
size
,
fileSize
:
parseInt
(
file
.
size
)
,
fileType
:
file
.
mimeType
,
fileType
:
file
.
mimeType
,
success
:
function
(
res
)
{
console
.
log
(
res
);
//无,直接在native显示文件详细信息
},
fail
:
function
(
err
)
{
console
.
log
(
err
);
// 无,直接在native页面显示具体的错误
}
})
})
}
else
{
})
uploadPermissions
(
data
).
then
(
res
=>
{
dd
.
previewFileInDingTalk
({
corpId
:
dd
.
corpId
,
spaceId
:
res
.
data
.
data
,
fileId
:
file
.
fileId
,
fileName
:
file
.
name
,
fileSize
:
file
.
size
,
fileType
:
file
.
mimeType
,
})
})
}
}
}
},
},
//显示操作框
//显示操作框
...
...
config.js
View file @
2f541571
export
const
globalUrl
=
"https://gateway-ding.mingwork.com"
;
export
const
globalUrl
=
"https://gateway-ding.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication.mingwork.com"
;
export
const
version
=
0.05
0
;
export
const
version
=
0.05
1
;
export
const
websocketUrl
=
'wss://gateway-ding.mingwork.com'
;
export
const
websocketUrl
=
'wss://gateway-ding.mingwork.com'
;
utils/checkFullScren.js
View file @
2f541571
const
iphoneModel
=
[
'iPhone10,3'
,
'iPhone10,6'
,
'iPhone11,2'
,
'iPhone11,4'
,
'iPhone11,6'
,
'iPhone11,8'
,
'iPhone12,1'
,
'iPhone12,3'
,
'iPhone12,5'
]
const
iphoneModel
=
[
'iPhone10,3'
,
'iPhone10,6'
,
'iPhone11,2'
,
'iPhone11,4'
,
'iPhone11,6'
,
'iPhone11,8'
,
'iPhone12,1'
,
'iPhone12,3'
,
'iPhone12,5'
,
'iPhone13,1'
,
'iPhone13,2'
,
'iPhone13,3'
,
'iPhone13,4'
]
let
fullscren
=
false
export
function
checkFullScren
()
{
export
function
checkFullScren
()
{
let
systemInfo
=
dd
.
getSystemInfoSync
()
let
systemInfo
=
dd
.
getSystemInfoSync
()
if
(
iphoneModel
.
includes
(
systemInfo
.
model
))
{
if
(
iphoneModel
.
includes
(
systemInfo
.
model
))
{
...
...
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