Commit ae2cbaa7 by xiexiaoqin

merge

parents bc73caf0 e959b906
......@@ -44,7 +44,7 @@ export default function xFetch({ url, method, data, type }) {
} else {
console.log(err)
alertOnce((err && err.errorMsg) || '网络异常,请重试', rejects, err);
alertOnce((err && err.errorMsg) || '网络异常,请重试' + err.status, rejects, err);
}
}
});
......
......@@ -108,7 +108,7 @@
border-left: 16rpx solid rgba(0, 0, 0, 0);
}
.pdf {
.pdf, .apdf {
background: url(../../assests/pdf.png) center /100% 100% !important;
}
......@@ -116,7 +116,7 @@
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;
}
......@@ -124,11 +124,11 @@
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;
}
.xlsx, .numbers {
.xlsx, .axlsx, .axls, .axlsx, .numbers {
background: url(../../assests/xlsx.png) center /100% 100% !important;
}
......
......@@ -10,8 +10,8 @@
<text>{{item.name.slice(0, item.name.length - 5)}}</text>
<text>{{item.name.slice(-5)}}</text>
</view>
<view class="file-size">{{item.sizeShow}}</view>
<view a:if="{{showName}}" class=" color4 file-showName">{{item.userDetail.name}}</view>
<view class="file-size">{{item.sizeShow}} {{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>
</view>
......
......@@ -32,6 +32,9 @@ create.Component({
const fileList = []
for (let i = 0; i < this.props.fileInfos.length; i++) {
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])
}
this.setData({
......@@ -84,7 +87,7 @@ create.Component({
projectName: 'MING_MEETING',
fileIds: file.fileId
}
if (file.spaceId) {
uploadPermissions(data).then(res => {
dd.previewFileInDingTalk({
corpId: dd.corpId,
spaceId: file.spaceId,
......@@ -93,18 +96,7 @@ create.Component({
fileSize: file.size,
fileType: file.mimeType,
})
} 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-beta.mingwork.com";
export const globalUrl2 = "https://third-authentication.mingwork.com";
export const version = 0.0321;
export const version = 0.0322;
export const websocketUrl = 'ws://139.196.213.18:9999';
......@@ -335,40 +335,49 @@ create.Page({
getPages(current, callBack) {
getDynamicList({ before: 'yes' })
.then(res => {
if ((!res.data.data || res.data.data.length === 0) && res.data.msg === 'yes') {
getDynamicList({ before: 'no' }).then(res => {
if (!res.data.data || res.data.data.length === 0) {
this.setData({
listLoading: false,
more: false,
dynamicList: []
});
} else {
const dynamicList = res.data.data.map((item, index) => {
for (let i = 0; i < item.commentListDataModelList.length; i++) {
let itemData = item.commentListDataModelList[i];
if (itemData.updateTime) {
itemData.updateTime = getCreateShowTime(itemData.updateTime);
}
if (itemData.notes) {
itemData.notes = removeHtml(itemData.notes)
}
if (!res.data.data || res.data.data.length === 0) {
if (res.data.msg === 'yes') {
getDynamicList({ before: 'no' }).then(res => {
if (!res.data.data || res.data.data.length === 0) {
this.setData({
listLoading: false,
more: false,
dynamicList: []
});
} else {
const dynamicList = res.data.data.map((item, index) => {
for (let i = 0; i < item.commentListDataModelList.length; i++) {
let itemData = item.commentListDataModelList[i];
if (itemData.updateTime) {
itemData.updateTime = getCreateShowTime(itemData.updateTime);
}
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;
}
const dynamicList = res.data.data.map((item, index) => {
for (let i = 0; i < item.commentListDataModelList.length; i++) {
let itemData = item.commentListDataModelList[i];
......
......@@ -961,7 +961,7 @@ create.Page({
getAffairList(id) {
getMeetingRoomAffairs(id).then(res => {
this.getTaskAndFiles(res.data.data);
const [newAffairList, separate] = this.dealAffairData(res.data.data || []);
const [newAffairList, separate, realSeparate] = this.dealAffairData(res.data.data || []);
this.store.data.affairList = newAffairList;
this.store.data.separateIndex = separate;
......@@ -970,7 +970,7 @@ create.Page({
"loading.dynamic": false
});
// 设置已读
if (separate !== -1) {
if (realSeparate !== -1) {
setRead(id).then(res => {
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
......@@ -1002,9 +1002,11 @@ create.Page({
//处理会议动态数据
dealAffairData(affairList) {
let separate = -1;
let realSeparate = -1;
affairList.forEach((it, index) => {
if (it.readFlag === 0) {
separate = index;
realSeparate = index;
}
if (it.createTime) {
it.updateTime = getCreateShowTime(it.updateTime);
......@@ -1018,9 +1020,9 @@ create.Page({
})
}
})
separate = fixSeperateIndex(separate, affairList);
return [affairList, separate]
separate = fixSeperateIndex(separate, affairList);
return [affairList, separate, realSeparate]
},
// 上传文件
async handleAddFile() {
......
const iphoneModel = ['iPhone10,3', 'iPhone10,6', 'iPhone11,2', 'iPhone11,4', 'iPhone11,6', 'iPhone11,8', 'iPhone12,1', 'iPhone12,3', 'iPhone12,5']
let fullscren = false
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']
export function checkFullScren() {
let systemInfo = dd.getSystemInfoSync()
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