我的问答
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user