Commit 48a9af4a authored by yaya's avatar yaya

feat:去除删除强提醒

parent 08f0075d
......@@ -392,30 +392,24 @@ export default {
},
// 删除
handleDelete() {
this.$confirm('删除后不可恢复!', '是否要删除该藏品?', {
confirmButtonText: '删除',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const params = {
id: this.goodsParams.id
}
deleteGood(params).then(response => {
this.$message.success('删除成功')
console.log('===原来=list ===', this.goodIdList)
this.goodIdList = this.goodIdList.filter((item) => {
if (item !== this.goodsParams.id) {
return item
}
})
this.currentIndex -= 1
this.handleNext()
console.log('===现在=list ===', this.goodIdList)
}).catch(response => {
this.$notify.error({
title: '失败',
message: response.data.errmsg || '请求失败'
})
const params = {
id: this.goodsParams.id
}
deleteGood(params).then(response => {
this.$message.success('删除成功')
console.log('===原来=list ===', this.goodIdList)
this.goodIdList = this.goodIdList.filter((item) => {
if (item !== this.goodsParams.id) {
return item
}
})
this.currentIndex -= 1
this.handleNext()
console.log('===现在=list ===', this.goodIdList)
}).catch(response => {
this.$notify.error({
title: '失败',
message: response.data.errmsg || '请求失败'
})
})
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment