登录逻辑修改,扫码签到逻辑完善
This commit is contained in:
+30
-47
@@ -5,8 +5,8 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
isSigned: false, // 默认未报名
|
||||
meetingId: '', // 会议id
|
||||
form: {},
|
||||
isSigned: 0, // 默认未报名
|
||||
fileId: '', // 图片id
|
||||
src: null // 签名之后,保存签名的图片地址
|
||||
},
|
||||
@@ -18,19 +18,43 @@ Page({
|
||||
},
|
||||
// 确定签到
|
||||
sureSign(){
|
||||
|
||||
let params = {
|
||||
fileId: this.data.fileId,
|
||||
meetingId: this.data.form.meetingId
|
||||
}
|
||||
UserApi.scanSure(params).then(res=>{
|
||||
if(res.success){
|
||||
this.setData({
|
||||
isSigned: !this.data.isSigned
|
||||
})
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 去报名
|
||||
goSignUp(){
|
||||
wx.navigateTo({
|
||||
url: 'url',
|
||||
url: `../signUpPage/signUpPage?id=${meetingId}`,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
console.log(options)
|
||||
this.setData({
|
||||
isSigned: options.signed
|
||||
})
|
||||
let form = JSON.parse(options.meeting)
|
||||
console.log(form)
|
||||
this.setData({
|
||||
form
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -44,47 +68,6 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
let params = {
|
||||
fileId: this.data.fileId,
|
||||
meetingId: this.data.meetingId
|
||||
}
|
||||
// UserApi.scanCode(params).then(res=>{
|
||||
|
||||
// })
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,35 +1,39 @@
|
||||
<view class="basic-info">
|
||||
<view>
|
||||
<text>会议名称</text>
|
||||
<text>会议名称会议名称</text>
|
||||
<text>{{form.meetingName}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>会议类型</text>
|
||||
<text>arff4ds8a3s6651</text>
|
||||
<text wx:if="{{form.meetingType == 1}}">工作组会议</text>
|
||||
<text wx:if="{{form.meetingType == 2}}">标协会议</text>
|
||||
<text wx:if="{{form.meetingType == 3}}">国际研讨会</text>
|
||||
<text wx:if="{{form.meetingType == 4}}">其他会议</text>
|
||||
<text wx:if="{{form.meetingType == 5}}">分标委会议</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>召开时间</text>
|
||||
<text>找找</text>
|
||||
<text>{{form.startTime}}</text>
|
||||
</view>
|
||||
<!-- 已报名信息显示的内容start -->
|
||||
<view wx:if="{{isSigned}}">
|
||||
<text>参会单位</text>
|
||||
<text>张三张三张三张三张三张三张三张三张三张三张三张三张三</text>
|
||||
<text>{{form.companyName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{isSigned}}">
|
||||
<text>参会人</text>
|
||||
<text>500元</text>
|
||||
<text>{{form.companyContactName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{isSigned}}">
|
||||
<text>是否签到</text>
|
||||
<text>500元</text>
|
||||
<text>{{form.checkIn_dictText}}</text>
|
||||
</view>
|
||||
<view wx:if="{{isSigned}}">
|
||||
<text>手动签到</text>
|
||||
<text style="color: #069F99;" bindtap="scanSign">签到</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="imageBox" hidden="{{isSigned ? false : true}}">
|
||||
<view class="imageBox" wx:if="{{src}}">
|
||||
<image src="{{src}}" ></image>
|
||||
</view>
|
||||
<view class="scanSign" wx:if="{{isSigned}}">
|
||||
|
||||
Reference in New Issue
Block a user