【bug】会议不是pdf的分发邮箱 缴费凭证的显示

This commit is contained in:
fengachen
2021-10-27 17:02:22 +08:00
parent fbf5a0fd0e
commit b3d45d14f6
4 changed files with 48 additions and 9 deletions
+8 -3
View File
@@ -35,10 +35,15 @@ Component({
lifetimes: {
attached: function() {
console.log(' this.data.initImgsList', this.data.initImgsList);
let initImgArr = this.data.initImgsList.split(',')
let initImgArr
if(!!this.data.initImgsList){
initImgArr = this.data.initImgsList.split(',')
}
const arr = []
for (let index = 0; index < initImgArr.length; index++) {
arr.push( baseUrl + URL_CONFIG + 'sys/common/download/' + initImgArr[index])
if(initImgArr && initImgArr.length > 0){
for (let index = 0; index < initImgArr.length; index++) {
arr.push( baseUrl + URL_CONFIG + 'sys/common/download/' + initImgArr[index])
}
}
this.setData({
tempFilePaths:arr
+1 -1
View File
@@ -1,6 +1,6 @@
<!--components/imageUpload/imageUpload.wxml-->
<view class="img_box">
<view class="imgs" wx:for="{{tempFilePaths}}" wx:key="index">
<view class="imgs" wx:for="{{tempFilePaths}}" wx:key="index" wx:if="{{tempFilePaths.length > 0}}">
<image src='{{item}}' bindlongpress="deleteImage" bindtap="previewImage" data-index="{{index}}" mode='widthFix' />
</view>
<view class="imgs">
@@ -1,10 +1,11 @@
// pages/meeting/meeting.js
import {
previewFile
previewFile,sliceFileTypeByFileName
} from '../../assets/js/preview'
import MeetingApi from '../../assets/js/http/meetingApi'
import signUpApi from '../../assets/js/http/signUp'
import UserApi from '../../assets/js/http/userApi'
import {
baseUrl,
URL_CONFIG
@@ -31,7 +32,8 @@ Page({
// 缴费凭证的回显
payRecordImgSrc: '',
// 签到图片的回显
signImgSrc: ''
signImgSrc: '',
userId:''
},
// 获取图片的id
@@ -73,7 +75,7 @@ Page({
} else {
wx.showToast({
title: res.message,
icon: "error",
icon: "none",
duration: 800,
});
}
@@ -141,8 +143,31 @@ Page({
// 预览
previewFile(e) {
const fileObj = e.currentTarget.dataset.file
previewFile(fileObj.id, fileObj.name)
let fileType = sliceFileTypeByFileName(fileObj.name)
// 文件类型不是docx,doc,pdf时,已邮件形式发送到参会人的邮箱
if(fileType !== 'docx' && fileType !== 'doc' && fileType !== 'pdf') {
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 {
previewFile(fileObj.fileId, fileObj.name)
}
},
/**
* 生命周期函数--监听页面加载
*/
@@ -155,6 +180,15 @@ Page({
this.setData({
meetingInfo: meetingInfo
})
wx.getStorage({
key: 'userInfo',
success(res){
that.setData({
userId: res.data.id
})
}
})
//
let {
meetingFiles,
@@ -135,7 +135,7 @@
<!-- 缴费方式为线上的显示 -->
<view class="p-20" wx:if="{{singInPersonInfo.payMode === 2 && singInPersonInfo.checkResult !== 1 }}">
<text class="validate">缴费订单号后四位数</text>
<input class="input" placeholder="请输入订单号后四位数" value="{{ordeCode}}" bindblur="setOrdeCode" />
<input class="input" maxlength="4" placeholder="请输入缴费订单号后四位数" value="{{ordeCode}}" bindblur="setOrdeCode" />
</view>
<!-- 审核通过后的订单后四位 -->
<view class="p-20" wx:if="{{ singInPersonInfo.checkResult === 1 }}">