我的问答
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<!-- <div class="footer-box">-->
|
<!-- <div class="footer-box">-->
|
||||||
|
|||||||
@@ -1536,7 +1536,16 @@ export default {
|
|||||||
},{
|
},{
|
||||||
_this: this
|
_this: this
|
||||||
}, res => {
|
}, 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 => {
|
}, e => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="questions-item">
|
<div id="questions-item">
|
||||||
<div>
|
<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>
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -34,6 +34,18 @@ export default {
|
|||||||
userName: this.$store.getters.userInfo.userName,
|
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:{
|
watch:{
|
||||||
question: {
|
question: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user