bug: 我的收藏 取消收藏
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
<el-col :span="4" :offset="3">创建时间:{{getDate(item.creationTime)}}</el-col>
|
||||
</div>
|
||||
<el-col :span="4">
|
||||
<el-button size="mini" @click="cancelStandard(item.id)" style="margin-top: -5px; border: 1px dashed #dcdee2">取消收藏</el-button>
|
||||
<el-button size="mini" @click="cancelStandard(item)" style="margin-top: -5px; border: 1px dashed #dcdee2">取消收藏</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -150,7 +150,7 @@ export default {
|
||||
}, e => {})
|
||||
},
|
||||
// 取消收藏
|
||||
cancelStandard (id) {
|
||||
cancelStandard (item) {
|
||||
this.$confirm('确定取消收藏此数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -158,16 +158,18 @@ export default {
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
var json = {}
|
||||
json.userId = this.$store.getters.userInfo.userId
|
||||
json.id = id
|
||||
this.$http.postData('/sarPersonalCenter/sar-user-star/delete',json, {
|
||||
// var json = {
|
||||
// id: item.collectId
|
||||
// }
|
||||
// json.userId = this.$store.getters.userInfo.userId
|
||||
this.$http.put('person/personCollect/updateByUserId',{'id': item.id}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.$message.success('已取消收藏')
|
||||
this.contentOpen = false
|
||||
this.pageChange(1)
|
||||
this.selectStandard()
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user