2、报名活动时的报名人的管理报名人的信息管理的的提交按钮的逻辑,在页面信息没有填完,按钮置灰
This commit is contained in:
parent
0ed7d1e926
commit
aa6d9a2c1b
@ -3,7 +3,7 @@
|
|||||||
<view v-for="item in list" style="padding:0rpx 30rpx;">
|
<view v-for="item in list" style="padding:0rpx 30rpx;">
|
||||||
<view style="display: flex;align-items: center;justify-content: space-between;">
|
<view style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
<view>
|
<view>
|
||||||
<view style="font-size: 28rpx;color: #323232;">{{ item.name }} {{item.mobile}}</view>
|
<view style="font-size: 28rpx;color: #323232;">{{ item.name }} {{item.mobile}}</view>
|
||||||
<view style="color: #9C9C9C;font-size: 24rpx;margin-top: 10rpx;">
|
<view style="color: #9C9C9C;font-size: 24rpx;margin-top: 10rpx;">
|
||||||
<text>身份证</text>
|
<text>身份证</text>
|
||||||
<text style="margin-left: 10rpx;">{{ item.idnum }}</text>
|
<text style="margin-left: 10rpx;">{{ item.idnum }}</text>
|
||||||
@ -17,7 +17,8 @@
|
|||||||
<view style="height: 1px;background-color: #F0F0F0;width: 100%;margin: 30rpx 0px;"></view>
|
<view style="height: 1px;background-color: #F0F0F0;width: 100%;margin: 30rpx 0px;"></view>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 100%;height: 200rpx;"></view>
|
<view style="width: 100%;height: 200rpx;"></view>
|
||||||
<view style="padding: 30rpx;position: fixed;bottom: 0rpx;left: 0;width: 92%;z-index: 10;background-color: #ffffff;">
|
<view
|
||||||
|
style="padding: 30rpx;position: fixed;bottom: 0rpx;left: 0;width: 92%;z-index: 10;background-color: #ffffff;">
|
||||||
<view class="btn_2" @click="show = true;isAdd = 1;">
|
<view class="btn_2" @click="show = true;isAdd = 1;">
|
||||||
<view>
|
<view>
|
||||||
<u-icon name="plus" color="#BBFC5B" size="15"></u-icon>
|
<u-icon name="plus" color="#BBFC5B" size="15"></u-icon>
|
||||||
@ -36,7 +37,8 @@
|
|||||||
姓名
|
姓名
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 75%;">
|
<view style="width: 75%;">
|
||||||
<input :cursor-spacing="300" type="text" placeholder="请填写真实姓名" class="input" v-model="form.name" />
|
<input :cursor-spacing="300" type="text" placeholder="请填写真实姓名" class="input"
|
||||||
|
v-model="form.name" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 1px;background-color: #eeeeee;width: 100%;margin-top: 20rpx;"></view>
|
<view style="height: 1px;background-color: #eeeeee;width: 100%;margin-top: 20rpx;"></view>
|
||||||
@ -45,7 +47,8 @@
|
|||||||
身份证号
|
身份证号
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 75%;">
|
<view style="width: 75%;">
|
||||||
<input :cursor-spacing="300" type="idcard" placeholder="请填写身份证号" class="input" v-model="form.idnum" />
|
<input :cursor-spacing="300" type="idcard" placeholder="请填写身份证号" class="input"
|
||||||
|
v-model="form.idnum" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 1px;background-color: #eeeeee;width: 100%;"></view>
|
<view style="height: 1px;background-color: #eeeeee;width: 100%;"></view>
|
||||||
@ -54,17 +57,19 @@
|
|||||||
手机号
|
手机号
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 75%;">
|
<view style="width: 75%;">
|
||||||
<input :cursor-spacing="300" type="number" placeholder="请填写手机号" class="input" v-model="form.mobile" />
|
<input :cursor-spacing="300" type="number" placeholder="请填写手机号" class="input"
|
||||||
|
v-model="form.mobile" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 1px;background-color: #eeeeee;width: 100%;"></view>
|
<view style="height: 1px;background-color: #eeeeee;width: 100%;"></view>
|
||||||
|
|
||||||
<view style="display: flex;justify-content: flex-start;align-items: center;margin-top: 30rpx;">
|
<view style="display: flex;justify-content: flex-start;align-items: center;margin-top: 30rpx;">
|
||||||
<image v-if="privacyShow == false" src="../../static/fabu/nocheck.png"
|
<image v-if="privacyShow == false" src="../../static/fabu/nocheck.png"
|
||||||
style="width: 34rpx;height: 34rpx;border-radius: 63rpx;" @click="privacyShow = true"></image>
|
style="width: 34rpx;height: 34rpx;border-radius: 63rpx;" @click="privacyShow = true"></image>
|
||||||
<image v-else src="../../static/fabu/check.png" @click="privacyShow = false"
|
<image v-else src="../../static/fabu/check.png" @click="privacyShow = false"
|
||||||
style="width: 34rpx;height: 34rpx;border-radius: 63rpx;"></image>
|
style="width: 34rpx;height: 34rpx;border-radius: 63rpx;"></image>
|
||||||
<view style="color: #3D3D3D;font-size: 22rpx;line-height: 33rpx;margin-left: 15rpx;">隐私报名(报名信息仅对我和组织者公开)</view>
|
<view style="color: #3D3D3D;font-size: 22rpx;line-height: 33rpx;margin-left: 15rpx;">
|
||||||
|
隐私报名(报名信息仅对我和组织者公开)</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="font-size: 24rpx;color: #9C9C9C;margin-top: 40rpx;">
|
<view style="font-size: 24rpx;color: #9C9C9C;margin-top: 40rpx;">
|
||||||
<text>你的个人信息我们将严格保密并仅用于投保使用,详情可查看</text>
|
<text>你的个人信息我们将严格保密并仅用于投保使用,详情可查看</text>
|
||||||
@ -74,219 +79,247 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-top: 40rpx;">
|
<view style="margin-top: 40rpx;">
|
||||||
<view class="btn_1" @click="save">确认</view>
|
<view class="btn_1" @click="save" v-if="form.name != '' && form.idnum != '' && form.mobile != ''">确认
|
||||||
|
</view>
|
||||||
|
<view class="btn_3" v-else @click="unSave">确认</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
privacyShow: false,
|
privacyShow: false,
|
||||||
show: false,
|
show: false,
|
||||||
form: {
|
form: {
|
||||||
name: '',
|
name: '',
|
||||||
idnum: '',
|
idnum: '',
|
||||||
mobile: ''
|
mobile: ''
|
||||||
|
},
|
||||||
|
isAdd: 1,
|
||||||
|
list: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
edit(item) {
|
||||||
|
this.isAdd = 0;
|
||||||
|
this.form.name = item.name;
|
||||||
|
this.form.idnum = item.idnum;
|
||||||
|
this.form.ids = item.id;
|
||||||
|
this.form.mobile = item.mobile;
|
||||||
|
this.show = true;
|
||||||
},
|
},
|
||||||
isAdd:1,
|
del(item) {
|
||||||
list: []
|
var that = this;
|
||||||
}
|
//确定要删除吗?
|
||||||
},
|
uni.showModal({
|
||||||
onLoad() {
|
title: '提示',
|
||||||
this.getList()
|
content: '确定要删除吗?',
|
||||||
},
|
success: (res) => {
|
||||||
methods: {
|
if (res.confirm) {
|
||||||
edit(item){
|
that.delData(item);
|
||||||
this.isAdd=0;
|
}
|
||||||
this.form.name=item.name;
|
|
||||||
this.form.idnum=item.idnum;
|
|
||||||
this.form.ids=item.id;
|
|
||||||
this.form.mobile = item.mobile;
|
|
||||||
this.show=true;
|
|
||||||
},
|
|
||||||
del(item){
|
|
||||||
var that=this;
|
|
||||||
//确定要删除吗?
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '确定要删除吗?',
|
|
||||||
success: (res) => {
|
|
||||||
if (res.confirm) {
|
|
||||||
that.delData(item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
delData(item){
|
|
||||||
uni.$u.http.post('/api/school.newactivity.activity_join/del',{ids:item.id}).then(res=>{
|
|
||||||
console.log(res)
|
|
||||||
if(res.code==1){
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getList();
|
|
||||||
}else{
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
uni.$u.http.get('/api/school.newactivity.activity_join/people_list').then(res => {
|
|
||||||
console.log(res)
|
|
||||||
if (res.code == 1) {
|
|
||||||
this.list = res.data.list
|
|
||||||
} else {
|
|
||||||
this.list = [];
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
save() {
|
|
||||||
if (this.form.name == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写真实姓名',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.form.idnum == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写身份证号',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.form.mobile == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请填写手机号',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//正则判断身份证
|
|
||||||
const reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
|
||||||
if(!reg.test(this.form.idnum)){
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入正确的身份证号',
|
|
||||||
icon: "none",
|
|
||||||
duration: 1500,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!/^1[3-9]\d{9}$/.test(this.form.mobile)) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入正确的手机号',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
})
|
||||||
return;
|
},
|
||||||
}
|
delData(item) {
|
||||||
console.log('privacyShow',this.privacyShow);
|
uni.$u.http.post('/api/school.newactivity.activity_join/del', {
|
||||||
if(this.privacyShow == true) {
|
ids: item.id
|
||||||
this.form.open = 0
|
}).then(res => {
|
||||||
}else {
|
console.log(res)
|
||||||
this.form.open = 1
|
if (res.code == 1) {
|
||||||
}
|
uni.showToast({
|
||||||
var url="/api/school.newactivity.activity_join/add";
|
title: res.msg,
|
||||||
if(this.isAdd==0){
|
icon: 'success',
|
||||||
url="/api/school.newactivity.activity_join/edit";
|
duration: 2000
|
||||||
}
|
});
|
||||||
uni.$u.http.post(url, this.form).then(res => {
|
this.getList();
|
||||||
console.log(res)
|
} else {
|
||||||
if (res.code == 1) {
|
uni.showToast({
|
||||||
uni.showToast({
|
title: res.msg,
|
||||||
title: res.msg,
|
icon: 'none',
|
||||||
icon: 'success',
|
duration: 2000
|
||||||
duration: 2000
|
});
|
||||||
});
|
|
||||||
this.getList()
|
|
||||||
this.show = false;
|
|
||||||
this.privacyShow = false;
|
|
||||||
this.form = {
|
|
||||||
name: '',
|
|
||||||
idnum: ''
|
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
uni.$u.http.get('/api/school.newactivity.activity_join/people_list').then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.list = res.data.list
|
||||||
|
} else {
|
||||||
|
this.list = [];
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
if (this.form.name == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: '请填写真实姓名',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
})
|
if (this.form.idnum == '') {
|
||||||
},
|
uni.showToast({
|
||||||
close() {
|
title: '请填写身份证号',
|
||||||
this.show = false
|
icon: 'none',
|
||||||
},
|
duration: 2000
|
||||||
go(url){
|
});
|
||||||
uni.navigateTo({
|
return;
|
||||||
url: url
|
}
|
||||||
})
|
if (this.form.mobile == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请填写手机号',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//正则判断身份证
|
||||||
|
const reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
||||||
|
if (!reg.test(this.form.idnum)) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入正确的身份证号',
|
||||||
|
icon: "none",
|
||||||
|
duration: 1500,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!/^1[3-9]\d{9}$/.test(this.form.mobile)) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入正确的手机号',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log('privacyShow', this.privacyShow);
|
||||||
|
if (this.privacyShow == true) {
|
||||||
|
this.form.open = 0
|
||||||
|
} else {
|
||||||
|
this.form.open = 1
|
||||||
|
}
|
||||||
|
var url = "/api/school.newactivity.activity_join/add";
|
||||||
|
if (this.isAdd == 0) {
|
||||||
|
url = "/api/school.newactivity.activity_join/edit";
|
||||||
|
}
|
||||||
|
uni.$u.http.post(url, this.form).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
this.getList()
|
||||||
|
this.show = false;
|
||||||
|
this.privacyShow = false;
|
||||||
|
this.form = {
|
||||||
|
name: '',
|
||||||
|
idnum: ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
unSave() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '填完全部信息后,才能提交',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
|
go(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.team-container {
|
.team-container {
|
||||||
font-family: PingFang SC, PingFang SC;
|
font-family: PingFang SC, PingFang SC;
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn_2 {
|
.btn_2 {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
background: #323232;
|
background: #323232;
|
||||||
border-radius: 198rpx 198rpx 198rpx 198rpx;
|
border-radius: 198rpx 198rpx 198rpx 198rpx;
|
||||||
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
|
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #BBFC5B;
|
color: #BBFC5B;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn_1 {
|
.btn_1 {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
background: #323232;
|
background: #323232;
|
||||||
border-radius: 198rpx 198rpx 198rpx 198rpx;
|
border-radius: 198rpx 198rpx 198rpx 198rpx;
|
||||||
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
|
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #BBFC5B;
|
color: #BBFC5B;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.btn_3 {
|
||||||
text-align: right;
|
width: 95%;
|
||||||
}
|
height: 90rpx;
|
||||||
</style>
|
background: #f0f0f0;
|
||||||
|
border-radius: 198rpx 198rpx 198rpx 198rpx;
|
||||||
|
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #9c9c9c;
|
||||||
|
line-height: 90rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user