Fix(我的收藏):我的收藏--千县店铺,有多个店铺时,选择删除某个店铺,删除后会显示“undefined”或”您还没有收藏“,刷新后显示正常
This commit is contained in:
@@ -456,6 +456,7 @@ export default {
|
|||||||
const res = await removeFavorite(ids)
|
const res = await removeFavorite(ids)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
_this.isAll = false
|
_this.isAll = false
|
||||||
|
_this.page = 1
|
||||||
_this.fetchData()
|
_this.fetchData()
|
||||||
_this.removeAfter()
|
_this.removeAfter()
|
||||||
}
|
}
|
||||||
@@ -463,6 +464,11 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
computedIsManage(arr) {
|
||||||
|
if(this.isManage && arr.length === 0) {
|
||||||
|
this.isManage = false
|
||||||
|
}
|
||||||
|
},
|
||||||
removeAfter() {
|
removeAfter() {
|
||||||
switch (this.tabsIndex) {
|
switch (this.tabsIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -490,6 +496,7 @@ export default {
|
|||||||
item.state = false
|
item.state = false
|
||||||
_this.productList.push(item)
|
_this.productList.push(item)
|
||||||
})
|
})
|
||||||
|
_this.computedIsManage(_this.productList)
|
||||||
_this.page++
|
_this.page++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -505,6 +512,7 @@ export default {
|
|||||||
item.state = false
|
item.state = false
|
||||||
_this.storeList.push(item)
|
_this.storeList.push(item)
|
||||||
})
|
})
|
||||||
|
_this.computedIsManage(_this.storeList)
|
||||||
_this.page++
|
_this.page++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -519,6 +527,7 @@ export default {
|
|||||||
item.state = false
|
item.state = false
|
||||||
_this.videoList.push(item)
|
_this.videoList.push(item)
|
||||||
})
|
})
|
||||||
|
_this.computedIsManage(_this.videoList)
|
||||||
_this.page++
|
_this.page++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -533,6 +542,7 @@ export default {
|
|||||||
item.state = false
|
item.state = false
|
||||||
_this.countyFamousList.push(item)
|
_this.countyFamousList.push(item)
|
||||||
})
|
})
|
||||||
|
_this.computedIsManage(_this.countyFamousList)
|
||||||
_this.page++
|
_this.page++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user