|
|
@ -19,6 +19,11 @@ |
|
|
|
<el-radio v-model="verifyCode" label="1">是</el-radio> |
|
|
|
<el-radio v-model="verifyCode" label="0">否</el-radio> |
|
|
|
</div> |
|
|
|
<div style="width: 30%;float: left"> |
|
|
|
<h4>是否开启IP验证</h4> |
|
|
|
<el-radio v-model="ipRestrict" label="1">是</el-radio> |
|
|
|
<el-radio v-model="ipRestrict" label="0">否</el-radio> |
|
|
|
</div> |
|
|
|
<div style="width: 30%;float: left"> |
|
|
|
<h4>周期设置</h4> |
|
|
|
<el-radio v-model="cycleType" label="false">投完不能再投</el-radio> |
|
|
@ -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){ |
|
|
|