Commit a8c02daf by xiexiaoqin

fix: file icon, index list

parent 2c2219bb
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
border-left: 16rpx solid rgba(0, 0, 0, 0); border-left: 16rpx solid rgba(0, 0, 0, 0);
} }
.pdf { .pdf, .apdf {
background: url(../../assests/pdf.png) center /100% 100% !important; background: url(../../assests/pdf.png) center /100% 100% !important;
} }
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
background: url(../../assests/image.png) center /100% 100% !important; background: url(../../assests/image.png) center /100% 100% !important;
} }
.docx, .txt, .doc, .pages, .wps, .file { .docx, .txt, .doc, .adoc, .adocx, .pages, .wps, .file {
background: url(../../assests/docx.png) center /100% 100% !important; background: url(../../assests/docx.png) center /100% 100% !important;
} }
...@@ -124,11 +124,11 @@ ...@@ -124,11 +124,11 @@
background: url(../../assests/mp4.png) center /100% 100% !important; background: url(../../assests/mp4.png) center /100% 100% !important;
} }
.pptx, .ppt, .key { .pptx, .ppt, .apptx, .appt, .key {
background: url(../../assests/mp4.png) center /100% 100% !important; background: url(../../assests/mp4.png) center /100% 100% !important;
} }
.xlsx, .numbers { .xlsx, .axlsx, .axls, .axlsx, .numbers {
background: url(../../assests/xlsx.png) center /100% 100% !important; background: url(../../assests/xlsx.png) center /100% 100% !important;
} }
......
...@@ -32,6 +32,9 @@ create.Component({ ...@@ -32,6 +32,9 @@ create.Component({
const fileList = [] const fileList = []
for (let i = 0; i < this.props.fileInfos.length; i++) { for (let i = 0; i < this.props.fileInfos.length; i++) {
this.props.fileInfos[i].sizeShow = renderSize(this.props.fileInfos[i].size) this.props.fileInfos[i].sizeShow = renderSize(this.props.fileInfos[i].size)
if (this.props.fileInfos[i].mimeType === "application/pdf") {
this.props.fileInfos[i].fileType = 'pdf'
}
fileList.push(this.props.fileInfos[i]) fileList.push(this.props.fileInfos[i])
} }
this.setData({ this.setData({
......
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.049; export const version = 0.050;
export const websocketUrl = 'wss://gateway-ding.mingwork.com'; export const websocketUrl = 'wss://gateway-ding.mingwork.com';
...@@ -335,40 +335,49 @@ create.Page({ ...@@ -335,40 +335,49 @@ create.Page({
getPages(current, callBack) { getPages(current, callBack) {
getDynamicList({ before: 'yes' }) getDynamicList({ before: 'yes' })
.then(res => { .then(res => {
if ((!res.data.data || res.data.data.length === 0) && res.data.msg === 'yes') { if (!res.data.data || res.data.data.length === 0) {
getDynamicList({ before: 'no' }).then(res => { if (res.data.msg === 'yes') {
if (!res.data.data || res.data.data.length === 0) { getDynamicList({ before: 'no' }).then(res => {
this.setData({ if (!res.data.data || res.data.data.length === 0) {
listLoading: false, this.setData({
more: false, listLoading: false,
dynamicList: [] more: false,
}); dynamicList: []
} else { });
const dynamicList = res.data.data.map((item, index) => { } else {
for (let i = 0; i < item.commentListDataModelList.length; i++) { const dynamicList = res.data.data.map((item, index) => {
let itemData = item.commentListDataModelList[i]; for (let i = 0; i < item.commentListDataModelList.length; i++) {
if (itemData.updateTime) { let itemData = item.commentListDataModelList[i];
itemData.updateTime = getCreateShowTime(itemData.updateTime); if (itemData.updateTime) {
} itemData.updateTime = getCreateShowTime(itemData.updateTime);
if (itemData.notes) { }
itemData.notes = removeHtml(itemData.notes) if (itemData.notes) {
} itemData.notes = removeHtml(itemData.notes)
}
}
return item;
});
this.setData({
dynamicList,
listLoading: false,
more: false,
});
if (callBack) {
callBack();
} }
return item;
});
this.setData({
dynamicList,
listLoading: false,
more: false,
});
if (callBack) {
callBack();
} }
} })
}) } else {
this.setData({
listLoading: false,
more: false,
dynamicList: []
});
}
return; return;
} }
const dynamicList = res.data.data.map((item, index) => { const dynamicList = res.data.data.map((item, index) => {
for (let i = 0; i < item.commentListDataModelList.length; i++) { for (let i = 0; i < item.commentListDataModelList.length; i++) {
let itemData = item.commentListDataModelList[i]; let itemData = item.commentListDataModelList[i];
......
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