扫码报名的修改
This commit is contained in:
@@ -20,7 +20,9 @@ Page({
|
||||
// 数据
|
||||
dataSource: [],
|
||||
// 是否国际研讨会过来的
|
||||
page: ""
|
||||
page: "",
|
||||
// 是否需要调用无限制接口
|
||||
nolimitBool:false
|
||||
},
|
||||
// 输入查询条件
|
||||
bindInputCompanyName(e) {
|
||||
@@ -48,31 +50,57 @@ Page({
|
||||
},
|
||||
// 加载企业列表
|
||||
loadData() {
|
||||
console.log('1552203698874545454545454545454545');
|
||||
console.log(this.data.nolimitBool,'this.data.nolimitBool');
|
||||
wx.showToast({
|
||||
title: '加载中...',
|
||||
icon: 'loading'
|
||||
})
|
||||
signUpApi.companyList(this.data.searchParams).then(res => {
|
||||
if (res.success) {
|
||||
// 搜索时,把原数据清空,重新筛选
|
||||
if (this.data.searchParams.pageNo === 1) {
|
||||
this.setData({
|
||||
dataSource: []
|
||||
})
|
||||
if(this.data.nolimitBool){
|
||||
signUpApi.companyListNoLimit(this.data.searchParams).then(res => {
|
||||
if (res.success) {
|
||||
// 搜索时,把原数据清空,重新筛选
|
||||
if (this.data.searchParams.pageNo === 1) {
|
||||
this.setData({
|
||||
dataSource: []
|
||||
})
|
||||
}
|
||||
if (res.result.records && res.result.records.length) {
|
||||
this.setData({
|
||||
dataSource: [...this.data.dataSource,...res.result.records]
|
||||
})
|
||||
}
|
||||
}
|
||||
if (res.result.records && res.result.records.length) {
|
||||
this.setData({
|
||||
dataSource: [...this.data.dataSource,...res.result.records]
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
wx.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
}).catch(err => {
|
||||
wx.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
})
|
||||
})
|
||||
}else{
|
||||
signUpApi.companyList(this.data.searchParams).then(res => {
|
||||
if (res.success) {
|
||||
// 搜索时,把原数据清空,重新筛选
|
||||
if (this.data.searchParams.pageNo === 1) {
|
||||
this.setData({
|
||||
dataSource: []
|
||||
})
|
||||
}
|
||||
if (res.result.records && res.result.records.length) {
|
||||
this.setData({
|
||||
dataSource: [...this.data.dataSource,...res.result.records]
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
wx.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 选中的企业
|
||||
selectedItem(e) {
|
||||
@@ -110,12 +138,16 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
console.log(options);
|
||||
if (options.page) {
|
||||
this.setData({
|
||||
page: options.page
|
||||
})
|
||||
}
|
||||
if(options.nolimit){
|
||||
this.setData({
|
||||
nolimitBool: true
|
||||
})
|
||||
}
|
||||
this.loadData()
|
||||
},
|
||||
|
||||
@@ -130,7 +162,15 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
const that = this
|
||||
wx.getStorage({
|
||||
key:'nolimit',
|
||||
success(res){
|
||||
that.setData({
|
||||
nolimitBool:res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,9 @@ Page({
|
||||
// 选择参会人 还是 选择邮寄联系人 1 是参会人 2 是邮寄联系人
|
||||
selectType:"",
|
||||
// 是否是从国际研讨会跳过来的
|
||||
page:''
|
||||
page:'',
|
||||
// 是否调用无权限接口
|
||||
nolimitBool:false
|
||||
},
|
||||
// 输入查询条件
|
||||
bindInputName(e) {
|
||||
@@ -90,32 +92,57 @@ Page({
|
||||
},
|
||||
// 加载联系人列表
|
||||
loadData() {
|
||||
console.log('联系人列表',this.data.nolimitBool);
|
||||
wx.showToast({
|
||||
title: '加载中...',
|
||||
icon: 'loading',
|
||||
duration: 1000
|
||||
})
|
||||
signUpApi.personListNolimit(this.data.queryParam).then(res => {
|
||||
if (res.success) {
|
||||
// 搜索时,把原数据清空,重新筛选
|
||||
if(this.data.queryParam.pageNo === 1) {
|
||||
this.setData({
|
||||
dataSource: []
|
||||
})
|
||||
}
|
||||
if(res.result && res.result.length){
|
||||
this.setData({
|
||||
dataSource: [...this.data.dataSource, ...res.result]
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
wx.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
if(this.data.nolimitBool){
|
||||
signUpApi.personListNolimit(this.data.queryParam).then(res => {
|
||||
if (res.success) {
|
||||
// 搜索时,把原数据清空,重新筛选
|
||||
if(this.data.queryParam.pageNo === 1) {
|
||||
this.setData({
|
||||
dataSource: []
|
||||
})
|
||||
}
|
||||
if(res.result && res.result.length){
|
||||
this.setData({
|
||||
dataSource: [...this.data.dataSource, ...res.result]
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
wx.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
})
|
||||
})
|
||||
}else{
|
||||
signUpApi.personList(this.data.queryParam).then(res => {
|
||||
if (res.success) {
|
||||
// 搜索时,把原数据清空,重新筛选
|
||||
if(this.data.queryParam.pageNo === 1) {
|
||||
this.setData({
|
||||
dataSource: []
|
||||
})
|
||||
}
|
||||
if(res.result && res.result.length){
|
||||
this.setData({
|
||||
dataSource: [...this.data.dataSource, ...res.result]
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
wx.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -123,6 +150,11 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
console.log(options);
|
||||
if(options.nolimit){
|
||||
this.setData({
|
||||
nolimitBool:true
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
'queryParam.companyId':options.companyId,
|
||||
selectType:options.selectType,
|
||||
@@ -142,6 +174,15 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
const that = this
|
||||
wx.getStorage({
|
||||
key:'nolimit',
|
||||
success(res){
|
||||
that.setData({
|
||||
nolimitBool:res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -59,16 +59,25 @@ Page({
|
||||
},
|
||||
// 报名
|
||||
signUp() {
|
||||
const that = this
|
||||
// 企业列表与参会人列表调用的是无权限接口
|
||||
wx.setStorage({
|
||||
key:'nolimit',
|
||||
data:true
|
||||
})
|
||||
// 不同的会议通跳转不同的会议页面
|
||||
let meetingType = this.data.meetingDetailIngfo.meetingType
|
||||
|
||||
wx.setStorage({
|
||||
key:'currentMeetingInfo',
|
||||
data:that.data.meetingDetailIngfo
|
||||
})
|
||||
if (meetingType !== '3') {
|
||||
wx.navigateTo({
|
||||
url: '../signUpPage/signUpPage',
|
||||
url: `../signUpPage/signUpPage?meetingId=${this.data.meetingDetailIngfo.id}&nolimit=nolimit`,
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: '../signUpPageGuoji/signUpPageGuoji',
|
||||
url: `../signUpPageGuoji/signUpPageGuoji?meetingId=${this.data.meetingDetailIngfo.id}&nolimit=nolimit`,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -86,7 +86,8 @@ Page({
|
||||
indexMsgBool:false,
|
||||
// 首页消息
|
||||
indexMsg: '',
|
||||
|
||||
// 扫码报名的 需要调用无限制接口
|
||||
nolimitBool:false
|
||||
},
|
||||
// 是否需要发票的选择
|
||||
needInvoiceChange(e) {
|
||||
@@ -169,7 +170,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 邮寄联系人
|
||||
if (formData.postContactId === undefined) {
|
||||
if (this.data.selectedPostPerson.id && formData.postContactId === undefined) {
|
||||
wx.showToast({
|
||||
title: '请选择邮寄联系人',
|
||||
icon: 'none',
|
||||
@@ -237,16 +238,23 @@ Page({
|
||||
},
|
||||
// 选择参会单位
|
||||
selectCompany() {
|
||||
wx.navigateTo({
|
||||
url: '../companyList/companyList',
|
||||
})
|
||||
console.log('选择参会单位',this.data.nolimitBool);
|
||||
if(this.data.nolimitBool){
|
||||
wx.navigateTo({
|
||||
url: `../companyList/companyList?nolimit=nolimt`,
|
||||
})
|
||||
}else{
|
||||
wx.navigateTo({
|
||||
url: `../companyList/companyList`,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 选择参会人
|
||||
selectPerson(e) {
|
||||
console.log(this.data.selectedCompany);
|
||||
const that = this
|
||||
if (!!this.data.selectedCompany.id) {
|
||||
wx.navigateTo({
|
||||
url: `../personList/personList?companyId=${this.data.selectedCompany.id}&selectType=${e.currentTarget.dataset.selecttype}`,
|
||||
url: `../personList/personList?companyId=${this.data.selectedCompany.id}&selectType=${e.currentTarget.dataset.selecttype}&nolimit=${that.data.nolimitBool}`,
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
@@ -265,27 +273,40 @@ Page({
|
||||
selectedMeeting:res.result
|
||||
})
|
||||
}
|
||||
}).catch( () => {
|
||||
wx.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
if(options.type){
|
||||
this.setData({
|
||||
indexMsg: options.type,
|
||||
})
|
||||
}
|
||||
if(options.nolimit){
|
||||
this.setData({
|
||||
nolimitBool:true
|
||||
})
|
||||
}
|
||||
|
||||
this.setData({
|
||||
indexMsg: options.type,
|
||||
})
|
||||
// this.setData({
|
||||
// selectedCompany:JSON.parse(options.company)
|
||||
// })
|
||||
if(options.meetingId){
|
||||
|
||||
this.queryMeetingInfo(options.meetingId)
|
||||
}
|
||||
const that = this
|
||||
// 是否是从首页消息进来的报名
|
||||
if (options.type === 'indexMsg') {
|
||||
this.setData({
|
||||
indexMsgBool:true
|
||||
})
|
||||
// 查询会议信息
|
||||
this.queryMeetingInfo(options.meetingId)
|
||||
|
||||
// 默认填写个人信息
|
||||
// 从缓存中拿个人信息
|
||||
wx.getStorage({
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
<!-- 如果是小程序消息进入的报名页面 需要回显企业与参会人 参会企业不可更改 -->
|
||||
<view class="form-item">
|
||||
<text class="item-label flex-1">参会单位:</text>
|
||||
<input placeholder-class="text-right" bindfocus="selectCompany" name="selectedCompany.companyName" bindinput="bindInputPhone" value="{{selectedCompany.companyName}}" placeholder="请选择参会单位" />
|
||||
<input placeholder-class="text-right" bindfocus="selectCompany" name="selectedCompany.companyName" data-nolimit="{{nolimitBool}}" value="{{selectedCompany.companyName}}" placeholder="请选择参会单位" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="item-label flex-1">参会人:</text>
|
||||
<input placeholder-class="text-right" bindfocus="selectPerson" data-selectType='1' bindinput="bindInputPhone" value="{{selectedPerson.name}}" placeholder="请选择参会人" />
|
||||
<input placeholder-class="text-right" data-nolimit="{{nolimitBool}}" bindfocus="selectPerson" data-selectType='1' value="{{selectedPerson.name}}" placeholder="请选择参会人" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<view class="form-item" wx:if="{{selectedIdentity === '2' && index !== '0' && paymentMethod !== '3' && selectedMeeting.meetingCosts !== '0.00'}}">
|
||||
<text class="item-label flex-1 validate">邮寄联系人:</text>
|
||||
<input placeholder-class="text-right" data-selectType='2' name="phone" bindfocus="selectPerson" value="{{selectedPostPerson.name}}" placeholder="请选择邮寄联系人" />
|
||||
<input placeholder-class="text-right" data-selectType='2' data-nolimit="{{nolimitBool}}" name="phone" bindfocus="selectPerson" value="{{selectedPostPerson.name}}" placeholder="请选择邮寄联系人" />
|
||||
</view>
|
||||
|
||||
<view class="form-item" wx:if="{{selectedIdentity === '2' && index !== '0' && paymentMethod !== '3' && selectedMeeting.meetingCosts !== '0.00'}}">
|
||||
|
||||
@@ -108,7 +108,9 @@ Page({
|
||||
name: '否'
|
||||
},
|
||||
],
|
||||
flag:false
|
||||
flag:false,
|
||||
// 是否调用无限制接口
|
||||
nolimitBool:false
|
||||
},
|
||||
// 抵达时间选择
|
||||
bindDateChangeArriveTime(e) {
|
||||
@@ -143,14 +145,24 @@ Page({
|
||||
// 选择参会单位
|
||||
selectCompany(e) {
|
||||
wx.navigateTo({
|
||||
url: `../companyList/companyList?page=${e.currentTarget.dataset.page}`,
|
||||
|
||||
})
|
||||
if(this.data.nolimitBool){
|
||||
wx.navigateTo({
|
||||
url: `../companyList/companyList?page=${e.currentTarget.dataset.page}&nolimit=nolimit`,
|
||||
})
|
||||
}else{
|
||||
wx.navigateTo({
|
||||
url: `../companyList/companyList?page=${e.currentTarget.dataset.page}`,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 选择参会人
|
||||
selectPerson(e) {
|
||||
const that = this
|
||||
if (!!this.data.selectedCompany.id) {
|
||||
wx.navigateTo({
|
||||
url: `../personList/personList?companyId=${this.data.selectedCompany.id}&selectType=${e.currentTarget.dataset.selecttype}&page=${e.currentTarget.dataset.page}`,
|
||||
url: `../personList/personList?companyId=${this.data.selectedCompany.id}&selectType=${e.currentTarget.dataset.selecttype}&page=${e.currentTarget.dataset.page}&nolimit=${that.data.nolimitBool}`,
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
@@ -485,7 +497,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 会议id
|
||||
formData.meetingId = '1449638073563172866'
|
||||
formData.meetingId = this.meetingDetailInfo.id
|
||||
// 参会人id
|
||||
formData.companyContactId = this.data.selectedPerson.id
|
||||
// 邮寄联系人id
|
||||
@@ -530,12 +542,18 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
|
||||
// 这个id 可能是是会议活动进来的 或者消息 或者扫码的
|
||||
if(options.meetingId){
|
||||
this.queryMeetingDetail(options.meetingId)
|
||||
}
|
||||
if(options.nolimit){
|
||||
this.setData({
|
||||
nolimitBool:true
|
||||
})
|
||||
}
|
||||
// 从缓存中拿选中的企业
|
||||
const that = this
|
||||
// 这个id 可能是是会议活动进来的 或者消息 或者扫码的
|
||||
this.queryMeetingDetail('1449638073563172866')
|
||||
|
||||
wx.getStorage({
|
||||
key: 'selectedCompany',
|
||||
success(res) {
|
||||
|
||||
@@ -5,15 +5,14 @@
|
||||
<!-- 如果是小程序消息进入的报名页面 需要回显企业与参会人 参会企业不可更改 -->
|
||||
<view class="form-item">
|
||||
<text class="item-label flex-1">参会单位:</text>
|
||||
<input placeholder-class="text-right" data-page='guoji' bindfocus="selectCompany"
|
||||
name="selectedCompany.companyName" bindinput="bindInputPhone" value="{{selectedCompany.companyName}}"
|
||||
<input placeholder-class="text-right" data-page='guoji' data-nolimit="{{nolimitBool}}" bindfocus="selectCompany"
|
||||
name="selectedCompany.companyName" value="{{selectedCompany.companyName}}"
|
||||
placeholder="请选择参会单位" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="item-label flex-1">参会人:</text>
|
||||
<input placeholder-class="text-right" data-page='guoji' bindfocus="selectPerson" data-selectType='1'
|
||||
bindinput="bindInputPhone" value="{{selectedPerson.name}}" placeholder="请选择参会人" />
|
||||
<input placeholder-class="text-right" data-nolimit="{{nolimitBool}}" data-page='guoji' bindfocus="selectPerson" data-selectType='1' value="{{selectedPerson.name}}" placeholder="请选择参会人" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
@@ -74,7 +73,7 @@
|
||||
|
||||
<view class="form-item">
|
||||
<text class="item-label flex-1 validate">邮寄联系人:</text>
|
||||
<input placeholder-class="text-right" data-page='guoji' data-selectType='2' name="phone"
|
||||
<input placeholder-class="text-right" data-page='guoji' data-nolimit="{{nolimitBool}}" data-selectType='2' name="phone"
|
||||
bindfocus="selectPerson" value="{{selectedPostPerson.name}}" placeholder="请选择邮寄联系人" />
|
||||
</view>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user