Commit 2f541571 by xiexiaoqin

fix:file preview in dingtalk

parent a8c02daf
...@@ -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>
......
...@@ -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,
})
})
}
} }
}, },
//显示操作框 //显示操作框
......
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.050; export const version = 0.051;
export const websocketUrl = 'wss://gateway-ding.mingwork.com'; export const websocketUrl = 'wss://gateway-ding.mingwork.com';
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)) {
......
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