feat: There is no way the, 56904 问答库-订阅 程序异常 api/lawss/Subscription/insertSubscription 这个接口 , 添加 取消订阅功能
This commit is contained in:
@@ -59,7 +59,8 @@
|
|||||||
<i class="iconfont"></i>
|
<i class="iconfont"></i>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item :command="[scope.row, '查看']">查看</el-dropdown-item>
|
<el-dropdown-item :command="[scope.row, '查看']">查看</el-dropdown-item>
|
||||||
<el-dropdown-item :command="[scope.row, '订阅']">订阅</el-dropdown-item>
|
<el-dropdown-item v-if="!scope.row.subState || scope.row.subState === 'n'" :command="[scope.row, '订阅']">订阅</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-if="scope.row.subState === 'y'" :command="[scope.row, '取消订阅']">取消订阅</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
@@ -673,7 +674,10 @@ export default {
|
|||||||
this.handleDetail(command[0])
|
this.handleDetail(command[0])
|
||||||
break
|
break
|
||||||
case '订阅':
|
case '订阅':
|
||||||
this.subscribe(command[0])
|
this.subscribe(command[0],'y')
|
||||||
|
break
|
||||||
|
case '取消订阅':
|
||||||
|
this.subscribe(command[0],'n')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -690,14 +694,15 @@ export default {
|
|||||||
}, e => {
|
}, e => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
subscribe(row){
|
subscribe(row,subState){
|
||||||
this.$http.postData('lawss/Subscription/insertSubscription',{
|
this.$http.postData('lawss/Subscription/insertSubscription',{
|
||||||
askId: row.id,
|
askId: row.id,
|
||||||
usId: this.$store.getters.userInfo.userId,
|
usId: this.$store.getters.userInfo.userId,
|
||||||
|
subState: subState,
|
||||||
},{
|
},{
|
||||||
_this: this
|
_this: this
|
||||||
}, res => {
|
}, res => {
|
||||||
console.log(res);
|
row.subState = subState
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
refreshStandMap(){
|
refreshStandMap(){
|
||||||
|
|||||||
Reference in New Issue
Block a user