diff --git a/assets/css/common.wxss b/assets/css/common.wxss index 2718991..12aa3a4 100644 --- a/assets/css/common.wxss +++ b/assets/css/common.wxss @@ -839,6 +839,10 @@ color: #2A2A2A; .form-item .count{ background-color: #aaa; } + +.color-green { + color: #069F99; +} .no-data{ width: 100%; height:200px; @@ -846,4 +850,4 @@ color: #2A2A2A; justify-content: center; align-items: center; color: #999; -} \ No newline at end of file +} diff --git a/assets/js/preview.js b/assets/js/preview.js index 41852d5..086992c 100644 --- a/assets/js/preview.js +++ b/assets/js/preview.js @@ -1,3 +1,4 @@ +import MeetingApi from '../js/http/meetingApi' /** * 预览文件的方法 * @param fileId 文件id @@ -5,8 +6,8 @@ */ // 文件下载的地址 后期上线需要修改地址 - const downFileUrl = `http://localhost:3000/jero-boot/sys/common/download/` + // 预览 export function previewFile(fileId,fileName) { @@ -50,3 +51,32 @@ export function previewFile(fileId,fileName) { // 截取文件类型 return fileName.slice(index+1) } + + // 通过文件id获取文件的相关信息 + export function getFileInfo(id) { + return new Promise(resolve => { + let result = {} + MeetingApi.queryFileInfoById({ id: id }).then(res => { + if (res.success) { + result = res.result + } + }).finally(() => { + resolve(result) + }) + }) + } + // 获取一个或多个文件信息 +export async function initFileList(fileIds) { + if (fileIds) { + const fileList = [] + let arr = fileIds.split(',') + for (let i = 0; i < arr.length; i++) { + let fileObj = {} + fileObj = await getFileInfo(arr[i]) + fileList.push({ id: fileObj.id, name: fileObj.fileName }) + } + return fileList + } else{ + return [] + } + } diff --git a/pages/meetingDetailSigned/meetingDetailSigned.js b/pages/meetingDetailSigned/meetingDetailSigned.js index e689f1c..8e1ab50 100644 --- a/pages/meetingDetailSigned/meetingDetailSigned.js +++ b/pages/meetingDetailSigned/meetingDetailSigned.js @@ -76,11 +76,10 @@ Page({ fileList.push({ id: fileObj.id, name: fileObj.fileName }) } return fileList - } + } }, // 预览 previewFile(e) { - console.log(e); const fileObj = e.currentTarget.dataset.file previewFile(fileObj.id,fileObj.name) }, @@ -94,7 +93,7 @@ Page({ this.setData({ meetingInfo:meetingInfo }) - // + // let {meetingFiles,meetingData} = meetingInfo // 获取参会人信息 this.queryPeronInfo(meetingInfo.id) @@ -163,4 +162,4 @@ Page({ onShareAppMessage: function () { } -}) \ No newline at end of file +}) diff --git a/pages/project/project.js b/pages/project/project.js index e3ec9b3..ec6987d 100644 --- a/pages/project/project.js +++ b/pages/project/project.js @@ -152,4 +152,4 @@ Page({ this.data.pageNo++ this.loadData() }, -}) \ No newline at end of file +}) diff --git a/pages/project/project.wxss b/pages/project/project.wxss index 809b31c..d36c073 100644 --- a/pages/project/project.wxss +++ b/pages/project/project.wxss @@ -71,6 +71,19 @@ page { justify-content: space-between; align-items: center; } + +/* 字体颜色 */ +.color-gray { + color:#999 +} + +.color-green { + color:#069F99 +} + +.color-orange { + color: orange; +} .half{ color: burlywood; }