diff --git a/assets/images/sign-success.png b/assets/images/sign-success.png new file mode 100644 index 0000000..ebc071f Binary files /dev/null and b/assets/images/sign-success.png differ diff --git a/pages/personList/personList.js b/pages/personList/personList.js index 2d61381..48dc87f 100644 --- a/pages/personList/personList.js +++ b/pages/personList/personList.js @@ -13,9 +13,11 @@ Page({ companyId: '' }, // 数据 - dataSource: [] + dataSource: [], + // 选择参会人 还是 选择邮寄联系人 1 是参会人 2 是邮寄联系人 + selectType:"" }, - // 输入查询条件 + // 输入查询条件 bindInputName(e) { this.setData({ name: e.detail.value @@ -44,6 +46,8 @@ Page({ }, // 选中联系人 selectedItem(e) { + console.log(this.data.selectType,'this.data.selectType'); + const that = this // 带过去的信息 let selectedPerson = e.currentTarget.dataset.person wx.showModal({ @@ -51,17 +55,36 @@ Page({ content: '是否选中该联系人', success: function (res) { if (res.confirm) { + + debugger //这里是点击了确定以后 - // 将选中的联系人存入缓存中 - wx.setStorage({ - key:'selectedPerson', - data:selectedPerson, - success() { - wx.navigateTo({ - url: `../signUpPage/signUpPage`, - }) - } - }) + // 将选中的参会人存入缓存中 + if(that.data.selectType === '1'){ + debugger + wx.setStorage({ + key:'selectedPerson', + data:selectedPerson, + success() { + wx.navigateTo({ + url: `../signUpPage/signUpPage`, + }) + } + }) + }else if(that.data.selectType === '2' ){ + // 选中的邮寄联系人 存入缓存中 + wx.setStorage({ + key:'selectedPostPerson', + data:selectedPerson, + success() { + wx.navigateTo({ + url: `../signUpPage/signUpPage`, + }) + } + }) + }else{ + // selectType不存在的情况 + console.log('这里应该写什么么 '); + } } else { //这里是点击了取消以后 } @@ -89,8 +112,10 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + console.log(options); this.setData({ - 'queryParam.companyId':options.companyId + 'queryParam.companyId':options.companyId, + selectType:options.selectType }) this.loadData(this.data.queryParam) }, @@ -143,4 +168,4 @@ Page({ onShareAppMessage: function () { } -}) \ No newline at end of file +}) diff --git a/pages/signUpPage/signUpPage.js b/pages/signUpPage/signUpPage.js index 092f754..8344e75 100644 --- a/pages/signUpPage/signUpPage.js +++ b/pages/signUpPage/signUpPage.js @@ -38,8 +38,11 @@ Page({ selectedCompany:{}, // 选中的联系人 selectedPerson:{}, + // 选中的邮寄联系人 + selectedPostPerson:{}, // 选中的会议 selectedMeeting:{} + }, // 是否需要发票的选择 needInvoiceChange(e){ @@ -64,7 +67,7 @@ Page({ const formData = Object.assign({},e.detail.value) // 会议id - formData.meetingId = '1448213074467938306' + formData.meetingId = this.data.selectedMeeting.id // 参会人id formData.companyContactId = this.data.selectedPerson.id // 邮寄联系人id 暂时写一样的 测试用 @@ -73,7 +76,6 @@ Page({ formData.companyId = this.data.selectedCompany.id // 会议类型 formData.meetingType = this.data.selectedMeeting.meetingType - console.log(formData); signUpApi.signUpMeeting(formData).then(res => { @@ -85,6 +87,9 @@ Page({ wx.removeStorage({ key: 'selectedPerson', }) + wx.removeStorage({ + key: 'selectedPostPerson', + }) wx.removeStorage({ key: 'currentMeetingInfo', success(){ @@ -104,11 +109,11 @@ Page({ }) }, // 选择参会人 - selectPerson(){ + selectPerson(e){ console.log(this.data.selectedCompany); if(!!this.data.selectedCompany.id){ wx.navigateTo({ - url: `../personList/personList?companyId=${this.data.selectedCompany.id}`, + url: `../personList/personList?companyId=${this.data.selectedCompany.id}&selectType=${e.currentTarget.dataset.selecttype}`, }) }else{ wx.showToast({ @@ -146,6 +151,16 @@ Page({ }) } }) + + // 从缓存中拿选中的邮寄联系人 + wx.getStorage({ + key:'selectedPostPerson', + success(res) { + that.setData({ + selectedPostPerson:res.data + }) + } + }) // 从缓存中拿选中的会议的信息 wx.getStorage({ diff --git a/pages/signUpPage/signUpPage.wxml b/pages/signUpPage/signUpPage.wxml index 69a098b..a146456 100644 --- a/pages/signUpPage/signUpPage.wxml +++ b/pages/signUpPage/signUpPage.wxml @@ -2,7 +2,7 @@
- + 参会单位: @@ -10,7 +10,7 @@ 参会人: - + @@ -56,7 +56,7 @@ 邮寄联系人: - + @@ -102,7 +102,8 @@ 费用合计: - 200元 + + {{selectedMeeting.meetingCosts}}元 diff --git a/pages/signUpPageGuoji/signUpPageGuoji.js b/pages/signUpPageGuoji/signUpPageGuoji.js new file mode 100644 index 0000000..d425bd9 --- /dev/null +++ b/pages/signUpPageGuoji/signUpPageGuoji.js @@ -0,0 +1,219 @@ +// pages/signUpPageGuoji/signUpPageGuoji.js +import MeetingApi from "../../assets/js/http/meetingApi" +Page({ + + /** + * 页面的初始数据 + */ + data: { + // 会议详情 + meetingDetailInfo: {}, + // 参会身份 + identifyList: [{ + value: '2', + name: '参会人' + }, + { + value: '1', + name: '嘉宾' + }, + { + value: '3', + name: '内部企业' + }, + ], + // 邀请码数组 + inviteCodeArr: [], + // 是否出现输入邀请码 参会身份选择嘉宾才出现 + inviteCodeShowBool: false, + // 表单的邀请码值 + inviteCode: "", + // vip的表单显示 + vipBool: false, + // 演讲嘉宾的表单显示 + speakerBool: false, + // 合作伙伴的表单显示 + cooperatieBool: false, + // 特邀嘉宾的显示 + guestBool: false + + }, + // 改变参会身份 + changeIdentify(e) { + let value = e.detail.value + if (value === '1') { + this.setData({ + inviteCodeShowBool: true, + inviteCode:'' + }) + } else { + this.setData({ + inviteCodeShowBool: false + }) + } + }, + // 设置邀请码的值 + bindInputInviteCode(e) { + // 在这里将所有控制表单都设为false 防止显示出问题 + this.setData({ + inviteCode: e.detail.value, + vipBool: false, + speakerBool: false, + cooperatieBool: false, + guestBool: false, + }) + }, + // 校验邀请码 + validateCode() { + if (this.data.inviteCode === '' || this.data.inviteCode === undefined) { + wx.showToast({ + title: '请输入邀请码', + icon: "none", + duration: 800, + }); + return + } else { + console.log(this.data.inviteCodeArr); + let validateArr = this.data.inviteCodeArr.filter(item => { + return this.data.inviteCode === item.code + }) + if (validateArr.length === 0) { + wx.showToast({ + title: '邀请码输入有误', + icon: "error", + duration: 800, + }); + } else { + wx.showToast({ + title: '邀请码输入正确', + icon: "success", + duration: 800, + }); + console.log(validateArr[0].type); + switch (validateArr[0].type) { + case '1': + this.setData({ + vipBool: true, + inviteCodeShowBool:false + }) + break + case '2': + this.setData({ + speakerBool: true, + inviteCodeShowBool:false + }) + break + case '3': + this.setData({ + guestBool: true, + inviteCodeShowBool:false + }) + break + case '4': + this.setData({ + cooperatieBool: true, + inviteCodeShowBool:false + }) + break + } + } + } + }, + + // 返回一一个邀请码的数组用于校验输入的邀请码显示不同的字段 1VIP 2演讲嘉宾 3特邀嘉宾 4 合作伙伴 + validateCodeArr(obj) { + let { + vipInvitationCode, + speakerInvitationCode, + guestInvitationCode, + cooperativeInvitationCode + } = obj + return [{ + type: '1', + code: vipInvitationCode + }, + { + type: '2', + code: speakerInvitationCode + }, + { + type: '3', + code: guestInvitationCode + }, + { + type: '4', + code: cooperativeInvitationCode + } + ] + }, + // 获取会议的详情 + queryMeetingDetail(id) { + const that = this + MeetingApi.meetingDetail({ + id: id + }).then(res => { + if (res.success) { + this.setData({ + meetingDetailInfo: res.result, + inviteCodeArr: that.validateCodeArr(res.result) + }) + } + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + // 这个id 可能是是会议活动进来的 或者消息 或者扫码的 + this.queryMeetingDetail('1448107789464113154') + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/signUpPageGuoji/signUpPageGuoji.json b/pages/signUpPageGuoji/signUpPageGuoji.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/signUpPageGuoji/signUpPageGuoji.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxml b/pages/signUpPageGuoji/signUpPageGuoji.wxml new file mode 100644 index 0000000..eff80e8 --- /dev/null +++ b/pages/signUpPageGuoji/signUpPageGuoji.wxml @@ -0,0 +1,153 @@ + + + + + + + 参会单位: + + + + + 参会人: + + + + + 手机号: + + + + + + 参会身份: + + + + + + + + + + 邀请码: + + + + + + + + + + + + + + 缴费方式: + + + + + + + + + + + 是否需要发票: + + + {{index === -1 ? '请选择' :needInvoiceList[index].name }} + + + + + + 邮寄联系人: + + + + + 邮寄地址: + + + + + 邮编: + + + + + + 是否住酒店: + + + + + + + + + + 抵达时间: + + + {{arrivalTime}} + + + + + + 离开时间: + + + {{departureTime}} + + + + + + 费用合计: + + {{selectedMeeting.meetingCosts}}元 + + + + + + + + + + vip显示 + + + + 演讲嘉宾显示 + + + + 特邀嘉宾显示 + + + + 合作伙伴显示 + + + + + \ No newline at end of file diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxss b/pages/signUpPageGuoji/signUpPageGuoji.wxss new file mode 100644 index 0000000..d424eb2 --- /dev/null +++ b/pages/signUpPageGuoji/signUpPageGuoji.wxss @@ -0,0 +1,74 @@ +/* pages/signUpPageGuoji/signUpPageGuoji.wxss */ + +/* 报名页面 */ +.form-wrap { + width: 100wh; + height: 20px; + background-color: #fff; +} + +.form-item { + width: 100%; + display: flex; + justify-content: space-between; + height: 40px; + padding: 10rpx 20rpx; + box-sizing: border-box; +} +.form-item input { + text-align: right; +} +.form-item-radio { + margin-top: 20px; + width: 100%; + display: flex; + flex-direction: column; + padding: 10rpx 20rpx; + box-sizing: border-box; +} +.radio-label { + margin-bottom: 20px; +} + +.item-label { + width:100px; +} + +.text-right { + text-align: right; +} + +.btn-wrap { + padding: 0 20rpx; + margin: 20rpx 0; + line-height: 80rpx; +} +.btn-ok { + width: 100%!important; + height: 80rpx; + border-radius: 4px; + background-color: #069F99; + font-weight: 400; + color: #fff; + font-size: 16px; + letter-spacing: 1px; +} + +.radio-item { + margin-right: 20rpx; +} +/* 红* */ +.validate::before{ + content: '*'; + font-size: 18px; + color: red; + position: absolute; + left: 2rpx; +} +/* 校验邀请码 */ +.validate-btn { + color: #fff; + background-color: #069F99; + font-weight: 500; + letter-spacing: 2px; +} diff --git a/pages/signUpSuccess/signUpSuccess.js b/pages/signUpSuccess/signUpSuccess.js index 18fa8c0..a153937 100644 --- a/pages/signUpSuccess/signUpSuccess.js +++ b/pages/signUpSuccess/signUpSuccess.js @@ -5,7 +5,8 @@ Page({ * 页面的初始数据 */ data: { - + // 是否是需要审核的参会人 + isAuditBool:false }, /** @@ -63,4 +64,4 @@ Page({ onShareAppMessage: function () { } -}) \ No newline at end of file +}) diff --git a/pages/signUpSuccess/signUpSuccess.json b/pages/signUpSuccess/signUpSuccess.json index 8835af0..3f4492c 100644 --- a/pages/signUpSuccess/signUpSuccess.json +++ b/pages/signUpSuccess/signUpSuccess.json @@ -1,3 +1,4 @@ { - "usingComponents": {} -} \ No newline at end of file + "usingComponents": {}, + "navigationBarTitleText":"报名完成" +} diff --git a/pages/signUpSuccess/signUpSuccess.wxml b/pages/signUpSuccess/signUpSuccess.wxml index e65d766..b91e17d 100644 --- a/pages/signUpSuccess/signUpSuccess.wxml +++ b/pages/signUpSuccess/signUpSuccess.wxml @@ -1,2 +1,30 @@ -报名成功 + + + + + + + 报名成功,请按时参会 + + + + + 报名成功,请等待管理员审核 + 审核通过后会发送短信提醒通知报名成功,即可参会。 + + + + + + 我知道了 + + + + + + + 报名成功后可微信搜索来款项目小程序登录查看会议以及项目 + + + diff --git a/pages/signUpSuccess/signUpSuccess.wxss b/pages/signUpSuccess/signUpSuccess.wxss index 46f7a5b..3394995 100644 --- a/pages/signUpSuccess/signUpSuccess.wxss +++ b/pages/signUpSuccess/signUpSuccess.wxss @@ -1 +1,51 @@ -/* pages/signUpSuccess/signUpSuccess.wxss */ \ No newline at end of file +/* pages/signUpSuccess/signUpSuccess.wxss */ + + +/* 不需要审核的报名提示样式 */ +.audit { + text-align: center; + width: 100%; + margin-top: 100px; + font-size: 16px; +} +.audit image.img { + width: 60px; + height: 60px; + max-width: 100%; + margin-bottom: 10px; +} +/* 需要审核的样式 */ + +/* 我知道了的样式 */ + +.exit-wrap { + position: absolute; + top: 50%; + left: 50%; + margin-left: -50px; +} + +.exit { + margin: 0 auto; + text-align: center; + color: #fff; + width: 100px; + height: 30px; + line-height: 30px; + border-radius: 4px; + letter-spacing: 2px; + background: #069F99; +} + +/* 底部详情的样式 */ +.detail-wrap { + position: fixed; + bottom: 40rpx; +} + +.detail { + margin: 0 auto; + text-align: center; + width:70% ; + white-space: pre-wrap; +}