Commit 00bef69c by xiexiaoqin

fix:文件预览

parent c958cc49
......@@ -292,6 +292,6 @@ export function setRead(meetingId) {
export function previewOssFile(fileId) {
return $http({
method: 'get',
url: `meet/fileDetail?objectName=${fileId}`
url: `/meet/fileDetail?objectName=${fileId}`
})
}
\ No newline at end of file
......@@ -112,11 +112,11 @@
background: url(../../assests/pdf.png) center /100% 100% !important;
}
.png, .jpg, .svg, .jpeg {
.png, .jpg, .svg, .jpeg, .picture {
background: url(../../assests/image.png) center /100% 100% !important;
}
.docx, .txt, .doc, .pages, .wps {
.docx, .txt, .doc, .pages, .wps, .file {
background: url(../../assests/docx.png) center /100% 100% !important;
}
......
......@@ -4,7 +4,8 @@
</view>
<view class="file-list {{customClass}}" a:for="{{fileList}}">
<view class="file-box {{isCanDelete ? 'file-box-close': ''}}" catchTap="preview" data-file="{{item}}">
<view class="file-icon {{item.mimeType}}"></view>
<view a:if="{{item.platform === 'oss'}}" class="file-icon {{item.fileType}}"></view>
<view a:else class="file-icon {{item.mimeType}}"></view>
<view class="file-title">
<text>{{item.name.slice(0, item.name.length - 5)}}</text>
<text>{{item.name.slice(-5)}}</text>
......
......@@ -71,9 +71,9 @@ create.Component({
});
} else {
// 预览文件
previewOssFile(file.fileId).then(res => {
previewOssFile(encodeURIComponent(file.fileId)).then(res => {
openLink({
url: res.data.webUrl
url: res.data.data.webUrl
});
})
}
......
......@@ -7,6 +7,7 @@ class Store {
roomId: '',
startTime: '',
endTime: '',
shouldUpdateShowTime: false,
currentPeople: '',
originUsers: [],
originalData: null,
......
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