【修改】 会议详情加入可签到按钮

This commit is contained in:
fengachen
2021-12-14 11:49:10 +08:00
parent 4018763671
commit f0c90cbd89
3 changed files with 63 additions and 9 deletions
@@ -45,6 +45,7 @@ Page({
signImgSrc: '',
userId: '',
form: {},
showSignInBtn:false, // 是否显示签到按钮
},
// 获取图片的id
@@ -276,6 +277,13 @@ Page({
previewFile(fileObj.id, fileObj.name)
}
},
// 去签到
toSignUp(){
let meetingId = this.data.meetingInfo.id
wx.navigateTo({
url: `../scanSign/scanSign?type=meetingDetail&meetingId=${meetingId}`,
})
},
/**
* 生命周期函数--监听页面加载
@@ -290,6 +298,16 @@ Page({
meetingInfo: meetingInfo,
paymentQrCodeSrc:baseUrl + URL_CONFIG + 'sys/common/download/' + meetingInfo.paymentQrCode
})
// 如果会议的报名状态是待签到则显示去签到按钮 这里暂时写个5 不知道待签到的报名状态是几
if(this.data.meetingInfo.signUpStatus === 4){
this.setData({
showSignInBtn:true
})
}else{
this.setData({
showSignInBtn:false
})
}
wx.getStorage({
key: 'userInfo',
@@ -84,8 +84,10 @@
</view>
<!-- 报名信息begin -->
<view class="basic-info" style="margin-top: 10px;" wx:if="{{!(meetingInfo.meetingType == 3 && singInPersonInfo.identity === 1)}}">
<view class="title">
<view class="title to-signup">
<text>报名信息</text>
<!-- 不需要花钱的会议、打包的会议 报名完显示 花钱的会议 现场缴费需要审核凭证通过显示 汇款的报完名显示 -->
<view style="color:#069f99" bindtap="toSignUp" wx:if="{{showSignInBtn}}">去签到</view>
</view>
<view>
<text>参会单位</text>
+42 -8
View File
@@ -88,10 +88,6 @@ Page({
UserApi.scanCode({
meetingId
}).then(res => {
wx.showToast({
title: '获取签到信息...',
icon: 'loading'
})
if (res.success) {
that.setData({
form:res.result
@@ -113,10 +109,6 @@ Page({
that.setData({
form:res.result
})
wx.showToast({
title: '未查到报名信息...',
icon: 'loading'
})
// 未查到报名信息
that.setData({
isSigned: 0,
@@ -125,6 +117,48 @@ Page({
}).catch(err => {})
})
}
// 这里是会议详情的跳转签到
if(options.type === 'meetingDetail'){
let meetingId = options.meetingId
UserApi.scanCode({
meetingId
}).then(res => {
wx.showToast({
title: '获取签到信息...',
icon: 'loading'
})
if (res.success) {
that.setData({
form:res.result
})
let src
if(res.result.checkFile){ // 签到名回显
src = baseUrl + URL_CONFIG + 'sys/common/download/' + res.result.checkFile
}else{
src = ''
}
this.setData({
isSigned: 1,
src
})
// wx.navigateTo({ // 已报名
// url: `../scanSign/scanSign?signed=1&meeting=${result}`,
// })
} else {
that.setData({
form:res.result
})
wx.showToast({
title: '未查到报名信息...',
icon: 'loading'
})
// 未查到报名信息
that.setData({
isSigned: 0,
})
}
}).catch(err => {})
}
// 这里是小程序内部的扫码签到
if(options.meeting){