优化拼团与秒杀商品详情tab 修复收藏不显示问题

This commit is contained in:
hupeng
2023-12-29 15:47:38 +08:00
parent e69d31e5ad
commit 49d7079d6c
4 changed files with 28 additions and 20 deletions

View File

@ -612,13 +612,14 @@ export default {
setCollect: function() {
let that = this,
id = that.storeInfo.id,
category = 'collect'
category = 'product',
type = 'collect'
if (that.storeInfo.userCollect) {
getCollectDel(id, category).then(function() {
getCollectDel(id, category,type).then(function() {
that.storeInfo.userCollect = !that.storeInfo.userCollect
})
} else {
getCollectAdd(id, category).then(function() {
getCollectAdd(id, category,type).then(function() {
that.storeInfo.userCollect = !that.storeInfo.userCollect
})
}