【bug】消息报名的参会单位不可更改
This commit is contained in:
+63
-41
@@ -9,13 +9,26 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
date: '',
|
date: '',
|
||||||
list: [], // 消息列表
|
selectArr: [{
|
||||||
selectArr: [
|
path: '../../assets/images/laikuan.png',
|
||||||
{ path: '../../assets/images/laikuan.png', text: '项目' },
|
text: '项目'
|
||||||
{ path: '../../assets/images/gongzuozu.png', text: '工作组' },
|
},
|
||||||
{ path: '../../assets/images/fenbiaowei.png', text: '分标委' },
|
{
|
||||||
{ path: '../../assets/images/huiyi.png', text: '会议活动' },
|
path: '../../assets/images/gongzuozu.png',
|
||||||
{ path: '../../assets/images/ziliao.png', text: '资料网员' },
|
text: '工作组'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '../../assets/images/fenbiaowei.png',
|
||||||
|
text: '分标委'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '../../assets/images/huiyi.png',
|
||||||
|
text: '会议活动'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '../../assets/images/ziliao.png',
|
||||||
|
text: '资料网员'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
titleList: [
|
titleList: [
|
||||||
'会议通知',
|
'会议通知',
|
||||||
@@ -33,25 +46,25 @@ Page({
|
|||||||
endTime: '' // 结束日期
|
endTime: '' // 结束日期
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadData(){
|
loadData() {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
icon: 'loading'
|
icon: 'loading'
|
||||||
})
|
})
|
||||||
UserApi.messageList(this.data.searchParams).then(res=>{
|
UserApi.messageList(this.data.searchParams).then(res => {
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
// 搜索时,把原数据清空,重新筛选
|
// 搜索时,把原数据清空,重新筛选
|
||||||
if(this.data.searchParams.pageNo === 1) {
|
if (this.data.searchParams.pageNo === 1) {
|
||||||
this.setData({
|
this.setData({
|
||||||
list: []
|
list: []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const reg = new RegExp("<p>","g")
|
const reg = new RegExp("<p>", "g")
|
||||||
const reg1 = new RegExp("</p>","g")
|
const reg1 = new RegExp("</p>", "g")
|
||||||
const reg2 = new RegExp("<span>","g")
|
const reg2 = new RegExp("<span>", "g")
|
||||||
const reg3 = new RegExp("</span>","g")
|
const reg3 = new RegExp("</span>", "g")
|
||||||
if(res.result.records && res.result.records.length){
|
if (res.result.records && res.result.records.length) {
|
||||||
res.result.records.forEach(item=>{
|
res.result.records.forEach(item => {
|
||||||
item.msgContent = item.msgContent.replace(reg, "")
|
item.msgContent = item.msgContent.replace(reg, "")
|
||||||
item.msgContent = item.msgContent.replace(reg1, "")
|
item.msgContent = item.msgContent.replace(reg1, "")
|
||||||
item.msgContent = item.msgContent.replace(reg2, "")
|
item.msgContent = item.msgContent.replace(reg2, "")
|
||||||
@@ -71,19 +84,19 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 点击首页的五个选项跳转页面
|
// 点击首页的五个选项跳转页面
|
||||||
clickSelect(e){
|
clickSelect(e) {
|
||||||
let index = e.currentTarget.dataset.index
|
let index = e.currentTarget.dataset.index
|
||||||
let url = ''
|
let url = ''
|
||||||
if(index === 0) { // 来款项目
|
if (index === 0) { // 来款项目
|
||||||
url = '../project/project?type=project'
|
url = '../project/project?type=project'
|
||||||
} else if(index === 1) { // 工作组
|
} else if (index === 1) { // 工作组
|
||||||
// url = '../work/work'
|
// url = '../work/work'
|
||||||
url = '../project/project?type=work'
|
url = '../project/project?type=work'
|
||||||
} else if(index === 2) { // 分标委
|
} else if (index === 2) { // 分标委
|
||||||
url = '../committee/committee'
|
url = '../committee/committee'
|
||||||
} else if(index === 3) { // 会议活动
|
} else if (index === 3) { // 会议活动
|
||||||
url = '../meeting/meeting'
|
url = '../meeting/meeting'
|
||||||
} else{ // 资料网员
|
} else { // 资料网员
|
||||||
// url = '../data/data'
|
// url = '../data/data'
|
||||||
url = '../project/project?type=ziliao'
|
url = '../project/project?type=ziliao'
|
||||||
}
|
}
|
||||||
@@ -92,11 +105,13 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 会议去报名,切换已读状态
|
// 会议去报名,切换已读状态
|
||||||
messageDetail(e){
|
messageDetail(e) {
|
||||||
const readFlag = e.currentTarget.dataset.message.readFlag
|
const readFlag = e.currentTarget.dataset.message.readFlag
|
||||||
const templateCode = e.currentTarget.dataset.message.templateCode
|
const templateCode = e.currentTarget.dataset.message.templateCode
|
||||||
if(readFlag == 0) { // 标记已读
|
if (readFlag == 0) { // 标记已读
|
||||||
UserApi.messageStatus({anntId: e.currentTarget.dataset.message.anntId}).then(res=>{
|
UserApi.messageStatus({
|
||||||
|
anntId: e.currentTarget.dataset.message.anntId
|
||||||
|
}).then(res => {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '已读成功',
|
title: '已读成功',
|
||||||
@@ -105,18 +120,25 @@ Page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const meetingId = JSON.parse(e.currentTarget.dataset.message.busId).id
|
const meetingId = JSON.parse(e.currentTarget.dataset.message.busId).id
|
||||||
if(templateCode == 'QY_1_HYTZ_WORK_GROUP_CREATE'){ // 去报名页
|
if (templateCode == 'QY_1_HYTZ_WORK_GROUP_CREATE') { // 去报名页
|
||||||
// 需要调用会议详情的接口 判断该会议是否还在报名时间内 并跳转不同的页面或者操作
|
// 需要调用会议详情的接口 判断该会议是否还在报名时间内 并跳转不同的页面或者操作
|
||||||
MeetingApi.meetingDetail({id:meetingId}).then(res => {
|
MeetingApi.meetingDetail({
|
||||||
if(res.success){
|
id: meetingId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
let flag = this.judgeCurrentTime(res.result.registerDeadline)
|
let flag = this.judgeCurrentTime(res.result.registerDeadline)
|
||||||
if(flag){
|
if (flag) {
|
||||||
// 超过报名时间了
|
// 超过报名时间了
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
// 这里传入的是会议id
|
// 这里传入的是会议id
|
||||||
url: `../cannotSignUp/cannotSignUp`,
|
url: `../cannotSignUp/cannotSignUp`,
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
|
// 从消息报名的参会单位不可更改
|
||||||
|
wx.setStorage({
|
||||||
|
key: 'companyDisabled',
|
||||||
|
data: true
|
||||||
|
})
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
// 这里传入的是会议id
|
// 这里传入的是会议id
|
||||||
url: `../signUpPage/signUpPage?meetingId=${meetingId}&type=indexMsg`,
|
url: `../signUpPage/signUpPage?meetingId=${meetingId}&type=indexMsg`,
|
||||||
@@ -124,35 +146,35 @@ Page({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 判断当前时间与会议报名截止时间
|
// 判断当前时间与会议报名截止时间
|
||||||
judgeCurrentTime(time){
|
judgeCurrentTime(time) {
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
let compareTime = new Date(time)
|
let compareTime = new Date(time)
|
||||||
if(date.getTime() > compareTime.getTime()){
|
if (date.getTime() > compareTime.getTime()) {
|
||||||
return true
|
return true
|
||||||
}else{
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 类型选中
|
// 类型选中
|
||||||
bindTitleChange(e){
|
bindTitleChange(e) {
|
||||||
this.data.searchParams.pageNo = 1
|
this.data.searchParams.pageNo = 1
|
||||||
if(e.detail.value == 0){
|
if (e.detail.value == 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
"searchParams.titile": 3,
|
"searchParams.titile": 3,
|
||||||
})
|
})
|
||||||
}else if(e.detail.value == 1){
|
} else if (e.detail.value == 1) {
|
||||||
this.setData({
|
this.setData({
|
||||||
"searchParams.titile": 6,
|
"searchParams.titile": 6,
|
||||||
})
|
})
|
||||||
}else if(e.detail.value == 2){
|
} else if (e.detail.value == 2) {
|
||||||
this.setData({
|
this.setData({
|
||||||
"searchParams.titile": 7,
|
"searchParams.titile": 7,
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
this.setData({
|
this.setData({
|
||||||
"searchParams.titile": 8,
|
"searchParams.titile": 8,
|
||||||
})
|
})
|
||||||
@@ -173,7 +195,7 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
|
|
||||||
let searchParams = {
|
let searchParams = {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|||||||
@@ -128,6 +128,11 @@ Page({
|
|||||||
|
|
||||||
// 如果是去报名页面需要在缓存中存储会议信息 当报名结束后 需要清除缓存中的当前会议信息 meetingSignUpType 1 可报名 2报名
|
// 如果是去报名页面需要在缓存中存储会议信息 当报名结束后 需要清除缓存中的当前会议信息 meetingSignUpType 1 可报名 2报名
|
||||||
if (meetingItem.meetingSignUpType === 1) {
|
if (meetingItem.meetingSignUpType === 1) {
|
||||||
|
// 从消息报名的参会单位不可更改
|
||||||
|
wx.setStorage({
|
||||||
|
key:'companyDisabled',
|
||||||
|
data:true
|
||||||
|
})
|
||||||
wx.setStorage({
|
wx.setStorage({
|
||||||
key: "currentMeetingInfo",
|
key: "currentMeetingInfo",
|
||||||
data: e.currentTarget.dataset.meetinginfo,
|
data: e.currentTarget.dataset.meetinginfo,
|
||||||
|
|||||||
@@ -37,6 +37,16 @@
|
|||||||
<text>会议费用(VIP)</text>
|
<text>会议费用(VIP)</text>
|
||||||
<text>{{meetingInfo.meetingCostsVip}}</text>
|
<text>{{meetingInfo.meetingCostsVip}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 分标委会议 -->
|
||||||
|
<view wx:if="{{meetingInfo.meetType === '5' }}">
|
||||||
|
<text>所属分标委</text>
|
||||||
|
<text>{{meetingInfo.caseCommitteeName}}</text>
|
||||||
|
</view>
|
||||||
|
<!-- 工作组会议 -->
|
||||||
|
<view wx:if="{{meetingInfo.meetType === '1' }}">
|
||||||
|
<text>所属工作组</text>
|
||||||
|
<text>{{meetingInfo.workingGroupName}}</text>
|
||||||
|
</view>
|
||||||
<view class="sign-in">
|
<view class="sign-in">
|
||||||
<text>会议内容</text>
|
<text>会议内容</text>
|
||||||
<text class="sign-in-text">{{meetingInfo.meetingContent}}</text>
|
<text class="sign-in-text">{{meetingInfo.meetingContent}}</text>
|
||||||
|
|||||||
@@ -140,6 +140,10 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
|
wx.setStorage({
|
||||||
|
key: 'companyDisabled',
|
||||||
|
data: false
|
||||||
|
})
|
||||||
let url = decodeURIComponent(options.q)
|
let url = decodeURIComponent(options.q)
|
||||||
console.log(options,'options');
|
console.log(options,'options');
|
||||||
console.log(url,'url');
|
console.log(url,'url');
|
||||||
|
|||||||
+124
-104
@@ -65,10 +65,10 @@ Page({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
// 选中的参会身份 默认参会人
|
// 选中的参会身份 默认参会人
|
||||||
selectedIdentity:'2',
|
selectedIdentity: '2',
|
||||||
// 是否选择发票的选中的索引 默认需要
|
// 是否选择发票的选中的索引 默认需要
|
||||||
index: -1,
|
index: -1,
|
||||||
paymentMethod:'1',
|
paymentMethod: '1',
|
||||||
// 抵达时间
|
// 抵达时间
|
||||||
arrivalTime: '请选择抵达时间',
|
arrivalTime: '请选择抵达时间',
|
||||||
// 离开时间
|
// 离开时间
|
||||||
@@ -82,17 +82,17 @@ Page({
|
|||||||
// 选中的会议
|
// 选中的会议
|
||||||
selectedMeeting: {},
|
selectedMeeting: {},
|
||||||
// 会议id
|
// 会议id
|
||||||
meetingId:'',
|
meetingId: '',
|
||||||
// 是否正确填写信息
|
// 是否正确填写信息
|
||||||
flag: false,
|
flag: false,
|
||||||
// 是否是首页消息进来的
|
// 是否是首页消息进来的
|
||||||
indexMsgBool:false,
|
indexMsgBool: false,
|
||||||
// 首页消息
|
// 首页消息
|
||||||
indexMsg: '',
|
indexMsg: '',
|
||||||
// 扫码报名的 需要调用无限制接口
|
// 扫码报名的 需要调用无限制接口
|
||||||
nolimitBool:false,
|
nolimitBool: false,
|
||||||
// 会议费用
|
// 会议费用
|
||||||
meetingCost:''
|
meetingCost: ''
|
||||||
},
|
},
|
||||||
// 是否需要发票的选择
|
// 是否需要发票的选择
|
||||||
needInvoiceChange(e) {
|
needInvoiceChange(e) {
|
||||||
@@ -113,68 +113,70 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选择参会身份
|
// 选择参会身份
|
||||||
changeIdentity(e){
|
changeIdentity(e) {
|
||||||
const that = this
|
const that = this
|
||||||
this.setData({
|
|
||||||
selectedIdentity:e.detail.value
|
|
||||||
})
|
|
||||||
console.log(e.detail.value);
|
|
||||||
// 参会身份选择嘉宾和内部企业 会议费用为 0
|
|
||||||
if(e.detail.value === '2'){
|
|
||||||
// 标协会议需要判断选中的企业是否是标协成员
|
|
||||||
if(this.data.selectedMeeting.meetingType === '2'){
|
|
||||||
signUpApi.validateStandard({companyName:that.data.selectedCompany.companyName}).then(result => {
|
|
||||||
if(result.result){
|
|
||||||
that.setData({
|
|
||||||
meetingCost:that.data.selectedMeeting.meetingCostsVip
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
that.setData({
|
|
||||||
meetingCost:that.data.selectedMeeting.meetingCosts
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.setData({
|
|
||||||
meetingCost:that.data.selectedMeeting.meetingCosts
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
this.setData({
|
this.setData({
|
||||||
meetingCost:'0.00'
|
selectedIdentity: e.detail.value
|
||||||
})
|
})
|
||||||
}
|
console.log(e.detail.value);
|
||||||
|
// 参会身份选择嘉宾和内部企业 会议费用为 0
|
||||||
|
if (e.detail.value === '2') {
|
||||||
|
// 标协会议需要判断选中的企业是否是标协成员
|
||||||
|
if (this.data.selectedMeeting.meetingType === '2') {
|
||||||
|
signUpApi.validateStandard({
|
||||||
|
companyName: that.data.selectedCompany.companyName
|
||||||
|
}).then(result => {
|
||||||
|
if (result.result) {
|
||||||
|
that.setData({
|
||||||
|
meetingCost: that.data.selectedMeeting.meetingCostsVip
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.setData({
|
||||||
|
meetingCost: that.data.selectedMeeting.meetingCosts
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.setData({
|
||||||
|
meetingCost: that.data.selectedMeeting.meetingCosts
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.setData({
|
||||||
|
meetingCost: '0.00'
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 缴费方式的选择
|
// 缴费方式的选择
|
||||||
paymentMethodRadioChange(e){
|
paymentMethodRadioChange(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
paymentMethod:e.detail.value
|
paymentMethod: e.detail.value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 确定
|
// 确定
|
||||||
formSubmit(e) {
|
formSubmit(e) {
|
||||||
const formData = Object.assign({}, e.detail.value)
|
const formData = Object.assign({}, e.detail.value)
|
||||||
// 会议id
|
// 会议id
|
||||||
if( this.data.selectedMeeting.id){
|
if (this.data.selectedMeeting.id) {
|
||||||
formData.meetingId = this.data.selectedMeeting.id
|
formData.meetingId = this.data.selectedMeeting.id
|
||||||
}else{
|
} else {
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key:"meetingId",
|
key: "meetingId",
|
||||||
success(res){
|
success(res) {
|
||||||
formData.meetingId = res.data
|
formData.meetingId = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 参会人id
|
// 参会人id
|
||||||
formData.companyContactId = this.data.selectedPerson.id
|
formData.companyContactId = this.data.selectedPerson.id
|
||||||
// 邮寄联系人id
|
// 邮寄联系人id
|
||||||
formData.postContactId = this.data.selectedPostPerson.id
|
formData.postContactId = this.data.selectedPostPerson.id
|
||||||
// 参会企业id
|
// 参会企业id
|
||||||
formData.companyId = this.data.selectedCompany.id
|
formData.companyId = this.data.selectedCompany.id
|
||||||
// 会议类型
|
// 会议类型
|
||||||
formData.meetingType = this.data.selectedMeeting.meetingType
|
formData.meetingType = this.data.selectedMeeting.meetingType
|
||||||
console.log(formData);
|
console.log(formData);
|
||||||
if (this.data.flag) {
|
if (this.data.flag) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '信息输入有误',
|
title: '信息输入有误',
|
||||||
@@ -193,7 +195,7 @@ Page({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 手机号验证
|
// 手机号验证
|
||||||
if(formData.phone === '' || formData.phone === undefined ){
|
if (formData.phone === '' || formData.phone === undefined) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请输入手机号',
|
title: '请输入手机号',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -247,32 +249,32 @@ Page({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 校验时间
|
// 校验时间
|
||||||
if(formData.arrivalTime && formData.departureTime){
|
if (formData.arrivalTime && formData.departureTime) {
|
||||||
let flag = compareDate(formData.arrivalTime,formData.departureTime)
|
let flag = compareDate(formData.arrivalTime, formData.departureTime)
|
||||||
if(flag){
|
if (flag) {
|
||||||
// 抵达时间大于离开时间
|
// 抵达时间大于离开时间
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '抵达时间不能大于离开时间',
|
title: '抵达时间不能大于离开时间',
|
||||||
icon:'none',
|
icon: 'none',
|
||||||
duration:2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
mask:true
|
mask: true
|
||||||
})
|
})
|
||||||
signUpApi.signUpMeeting(formData).then(res => {
|
signUpApi.signUpMeeting(formData).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
wx.hideLoading({
|
wx.hideLoading({
|
||||||
|
|
||||||
})
|
})
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '报名成功',
|
title: '报名成功',
|
||||||
icon:'loading',
|
icon: 'loading',
|
||||||
duration:1500
|
duration: 1500
|
||||||
})
|
})
|
||||||
// 成功 清除缓存 跳转报名成功页面
|
// 成功 清除缓存 跳转报名成功页面
|
||||||
wx.removeStorage({
|
wx.removeStorage({
|
||||||
@@ -285,19 +287,19 @@ Page({
|
|||||||
key: 'currentMeetingInfo',
|
key: 'currentMeetingInfo',
|
||||||
success() {
|
success() {
|
||||||
// 跳转报名成功页面
|
// 跳转报名成功页面
|
||||||
|
|
||||||
if(formData.payMode){
|
if (formData.payMode) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `../signUpSuccess/signUpSuccess?payMode=${formData.payMode}`,
|
url: `../signUpSuccess/signUpSuccess?payMode=${formData.payMode}`,
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `../signUpSuccess/signUpSuccess`,
|
url: `../signUpSuccess/signUpSuccess`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -314,12 +316,26 @@ Page({
|
|||||||
},
|
},
|
||||||
// 选择参会单位
|
// 选择参会单位
|
||||||
selectCompany() {
|
selectCompany() {
|
||||||
console.log('选择参会单位',this.data.nolimitBool);
|
|
||||||
if(this.data.nolimitBool){
|
let flag
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'companyDisabled',
|
||||||
|
success(res) {
|
||||||
|
if (res.data) {
|
||||||
|
flag = res.data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log('选择参会单位', this.data.nolimitBool);
|
||||||
|
if (this.data.nolimitBool) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `../companyList/companyList?nolimit=nolimt`,
|
url: `../companyList/companyList?nolimit=nolimt`,
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `../companyList/companyList`,
|
url: `../companyList/companyList`,
|
||||||
})
|
})
|
||||||
@@ -341,21 +357,23 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 根据会议id查询会议信息
|
// 根据会议id查询会议信息
|
||||||
queryMeetingInfo(id){
|
queryMeetingInfo(id) {
|
||||||
MeetingApi.meetingDetail({id:id}).then(res => {
|
MeetingApi.meetingDetail({
|
||||||
|
id: id
|
||||||
|
}).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
this.setData({
|
this.setData({
|
||||||
selectedMeeting:res.result,
|
selectedMeeting: res.result,
|
||||||
meetingCost:res.result.meetingCosts
|
meetingCost: res.result.meetingCosts
|
||||||
})
|
})
|
||||||
// 存储会议信息
|
// 存储会议信息
|
||||||
wx.setStorage({
|
wx.setStorage({
|
||||||
key:'currentMeetingInfo',
|
key: 'currentMeetingInfo',
|
||||||
data:res.result
|
data: res.result
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch( () => {
|
}).catch(() => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '加载失败',
|
title: '加载失败',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -367,33 +385,33 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
if(options.type){
|
if (options.type) {
|
||||||
this.setData({
|
this.setData({
|
||||||
indexMsg: options.type,
|
indexMsg: options.type,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(options.nolimit){
|
if (options.nolimit) {
|
||||||
this.setData({
|
this.setData({
|
||||||
nolimitBool:true
|
nolimitBool: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// this.queryMeetingInfo('1455359606691979265')
|
// this.queryMeetingInfo('1455359606691979265')
|
||||||
if(options.meetingId){
|
if (options.meetingId) {
|
||||||
console.log(options.meetingId,'options.meetingId');
|
console.log(options.meetingId, 'options.meetingId');
|
||||||
this.queryMeetingInfo(options.meetingId)
|
this.queryMeetingInfo(options.meetingId)
|
||||||
this.setData({
|
this.setData({
|
||||||
meetingId:options.meetingId
|
meetingId: options.meetingId
|
||||||
})
|
})
|
||||||
wx.setStorage({
|
wx.setStorage({
|
||||||
key:'meetingId',
|
key: 'meetingId',
|
||||||
data:options.meetingId
|
data: options.meetingId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const that = this
|
const that = this
|
||||||
// 是否是从首页消息进来的报名
|
// 是否是从首页消息进来的报名
|
||||||
if (options.type === 'indexMsg') {
|
if (options.type === 'indexMsg') {
|
||||||
this.setData({
|
this.setData({
|
||||||
indexMsgBool:true
|
indexMsgBool: true
|
||||||
})
|
})
|
||||||
|
|
||||||
// 默认填写个人信息
|
// 默认填写个人信息
|
||||||
@@ -408,10 +426,10 @@ Page({
|
|||||||
'selectedPerson.id': res.data.id,
|
'selectedPerson.id': res.data.id,
|
||||||
'selectedCompany.id': res.data.companyId,
|
'selectedCompany.id': res.data.companyId,
|
||||||
phone: res.data.phone,
|
phone: res.data.phone,
|
||||||
'selectedPostPerson.id':res.data.id,
|
'selectedPostPerson.id': res.data.id,
|
||||||
'selectedPostPerson.name':res.data.name,
|
'selectedPostPerson.name': res.data.name,
|
||||||
'selectedPostPerson.contactAddress':res.data.contactAddress,
|
'selectedPostPerson.contactAddress': res.data.contactAddress,
|
||||||
'selectedPostPerson.postalCode':res.data.postalCode,
|
'selectedPostPerson.postalCode': res.data.postalCode,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -499,7 +517,7 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
console.log(this.data.selectedMeeting,'this.selectedMeeting');
|
console.log(this.data.selectedMeeting, 'this.selectedMeeting');
|
||||||
const that = this
|
const that = this
|
||||||
// 是否是从首页消息进来的报名
|
// 是否是从首页消息进来的报名
|
||||||
if (this.data.type === 'indexMsg') {
|
if (this.data.type === 'indexMsg') {
|
||||||
@@ -558,15 +576,17 @@ Page({
|
|||||||
selectedMeeting: res.data
|
selectedMeeting: res.data
|
||||||
})
|
})
|
||||||
// 标协会议需要判断单位是否是会员单位
|
// 标协会议需要判断单位是否是会员单位
|
||||||
if(that.data.selectedCompany.companyName && res.data.meetingType+'' === '2' ){
|
if (that.data.selectedCompany.companyName && res.data.meetingType + '' === '2') {
|
||||||
signUpApi.validateStandard({companyName:that.data.selectedCompany.companyName}).then(result => {
|
signUpApi.validateStandard({
|
||||||
if(result.result){
|
companyName: that.data.selectedCompany.companyName
|
||||||
|
}).then(result => {
|
||||||
|
if (result.result) {
|
||||||
that.setData({
|
that.setData({
|
||||||
meetingCost:res.data.meetingCostsVip
|
meetingCost: res.data.meetingCostsVip
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
that.setData({
|
that.setData({
|
||||||
meetingCost:res.data.meetingCosts
|
meetingCost: res.data.meetingCosts
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -610,4 +630,4 @@ Page({
|
|||||||
onShareAppMessage: function () {
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -230,6 +230,19 @@ Page({
|
|||||||
},
|
},
|
||||||
// 选择参会单位
|
// 选择参会单位
|
||||||
selectCompany(e) {
|
selectCompany(e) {
|
||||||
|
let flag
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'companyDisabled',
|
||||||
|
success(res) {
|
||||||
|
if (res.data) {
|
||||||
|
flag = res.data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (this.data.nolimitBool) {
|
if (this.data.nolimitBool) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `../companyList/companyList?page=${e.currentTarget.dataset.page}&nolimit=nolimit`,
|
url: `../companyList/companyList?page=${e.currentTarget.dataset.page}&nolimit=nolimit`,
|
||||||
|
|||||||
Reference in New Issue
Block a user