【bug】会议文件的附件发送的提示

This commit is contained in:
fengachen
2021-11-04 14:44:18 +08:00
parent 719e7e132e
commit 3e1f8b683d
3 changed files with 52 additions and 3 deletions
@@ -165,6 +165,55 @@ Page({
return fileList
}
},
// 会议文件的预览
previewFileMeetingData(e) {
// 只有审核通过的才可以去下载
if(this.data.singInPersonInfo.checkResult !== 1){
wx.showToast({
title: '您的信息尚未审核通过,请等待审核通过',
icon:'none',
duration:3000
})
return
}
const fileObj = e.currentTarget.dataset.file
let fileType = sliceFileTypeByFileName(fileObj.name)
// 文件类型不是docx,doc,pdf时,已邮件形式发送到参会人的邮箱
if (fileType !== 'docx' && fileType !== 'doc' && fileType !== 'pdf') {
wx.showModal({
title: '提示',
content: '将附件发送到您的邮箱',
success: function (res) {
if (res.confirm) {
//这里是点击了确定以后
let params = {
fileId: fileObj.id,
userId: this.data.userId
}
UserApi.sendEmail(params).then(res => {
if (res.success) {
wx.showToast({
title: '文件已发送到您的邮箱',
icon: 'none'
})
} else {
wx.showToast({
title: res.message,
icon: "none"
})
}
})
} else {
//这里是点击了取消以后
}
}
})
} else {
previewFile(fileObj.fileId, fileObj.name)
}
},
// 预览
previewFile(e) {
const fileObj = e.currentTarget.dataset.file
@@ -73,7 +73,7 @@
<image src="../../assets/images/pdf.png"></image>
<text>{{item.name}}</text>
</view>
<text class="look-file" bindtap="previewFile" data-file='{{item}}'>查看</text>
<text class="look-file" bindtap="previewFileMeetingData" data-file='{{item}}'>查看</text>
</view>
<view class="center" wx:if="{{ meetingDataList.length === 0 }}" > <text style="color:#999">暂无</text></view>
</view>
+2 -2
View File
@@ -80,7 +80,7 @@
<view class="file-name">
<view>
<image src="../../assets/images/pdf.png"></image>
<text>{{item.name}}会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知会议通知</text>
<text>{{item.name}}</text>
</view>
<text style="color:#999;flex-shrink: 0;" bindtap='preview' data-file="{{item}}">暂无</text>
</view>
@@ -119,4 +119,4 @@
<view class="sign-up" wx:if="{{isMoreBool}}">
<button class="sign-up-btn" bindtap='signUp'>报名</button>
</view>
</view>
</view>