我的问答

This commit is contained in:
宋伟佳
2022-06-07 13:51:30 +08:00
parent dd0fb9d595
commit 03bc4faef6
3 changed files with 24 additions and 3 deletions
@@ -24,7 +24,7 @@
</div>
</div>
<div>
<el-checkbox @change="answerChang" v-model="answer.checked">归档</el-checkbox>
<el-checkbox v-if="answer.checkedShow" @change="answerChang" v-model="answer.checked">归档</el-checkbox>
</div>
</div>
<!-- <div class="footer-box">-->
@@ -1536,7 +1536,16 @@ export default {
},{
_this: this
}, res => {
this.answerList = res.data
if(this.activeName === 'myAns'){
if(res.data.length){
res.data.forEach(item => {
item.checkedShow = true
})
}
this.answerList = res.data
}else{
this.answerList = res.data
}
}, e => {
})
},
@@ -2,7 +2,7 @@
<template>
<div id="questions-item">
<div>
<el-button class="dybtn" size="mini" type="primary">订阅</el-button>
<el-button class="dybtn" size="mini" type="primary" @click.stop="subscribe">订阅</el-button>
</div>
<div>
<div class="row">
@@ -34,6 +34,18 @@ export default {
userName: this.$store.getters.userInfo.userName,
}
},
methods:{
subscribe(){
this.$http.postData('lawss/Subscription/insertSubscription',{
askId: this.question.id,
usId: this.$store.getters.userInfo.userId,
},{
_this: this
}, res => {
console.log(res);
})
},
},
watch:{
question: {
immediate: true,