From e7b0b6df00f287184388ea6e9eae50d20122dd14 Mon Sep 17 00:00:00 2001
From: ssl <1151868461@qq.com>
Date: Tue, 9 May 2023 23:34:13 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0ip=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/admin/vote/VoteEdit.vue | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
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){