diff --git a/vote-vue/src/components/admin/vote/VoteEdit.vue b/vote-vue/src/components/admin/vote/VoteEdit.vue
index c1abbc5..ec3a40c 100644
--- a/vote-vue/src/components/admin/vote/VoteEdit.vue
+++ b/vote-vue/src/components/admin/vote/VoteEdit.vue
@@ -19,6 +19,11 @@
是
否
+
+
是否开启IP验证
+ 是
+ 否
+
周期设置
投完不能再投
@@ -74,6 +79,7 @@
voteType:'multiple',
cycleType:'false',
verifyCode:'0',
+ ipRestrict:'0',
input3:'',
type:{},
totalVotes:'',
@@ -84,13 +90,13 @@
curActivity:[],
singleType:{
"voteType":'single',
- "cycleType":'',
+ "cycleType":'false',
"totalVotes":'',
"oneVotes":''
},
multipleType:{
"voteType":'multiple',
- "cycleType":'',
+ "cycleType":'false',
"least":'',
"most":''
}
@@ -115,6 +121,9 @@
if(this.curActivity.verifyCode){
this.verifyCode = '1'
}
+ if(this.curActivity.ipRestrict){
+ this.ipRestrict = '1'
+ }
}
})
},
@@ -155,7 +164,11 @@
}
}
let setVerifyCode = this.verifyCode === '1'? true : false
+ let setIpRestrict = this.ipRestrict === '1'? true : false
console.log('verifyCode === 1 == > ',this.verifyCode === '1')
+ console.log('ipRestrict === 1 == > ',this.ipRestrict === '1')
+ console.log(setIpRestriction)
+ debugger
this.$axios.put('/admin/activity/'+this.curActivity.id,{
title:this.curActivity.title,
startTime:this.curActivity.startTime,
@@ -163,6 +176,7 @@
content:this.curActivity.content,
type:JSON.stringify(this.type),
verifyCode: setVerifyCode,
+ ipRestrict: setIpRestrict,
author:this.$store.state.user.userName
}).then(resp =>{
if(resp && resp.data.code === 200){