套餐详情-收藏

parent f8bb17e0
...@@ -202,15 +202,28 @@ function getProdDetailFn(prodId) { ...@@ -202,15 +202,28 @@ function getProdDetailFn(prodId) {
* 获取收藏 * 获取收藏
*/ */
function getCollectFn(shopId) { function getCollectFn(shopId) {
getCollect(shopId).then((res) => { if (shopInfo.value.isCollect === 0) {
if (res.code === 0) { shopInfo.value.privateIntFcount++;
console.log('111'); shopInfo.value.isCollect = 1;
} } else {
}); shopInfo.value.privateIntFcount--;
shopInfo.value.isCollect = 0;
}
shopInfo.value.console.log('111');
// getCollect(shopId).then((res) => {
// if (res.code === 0) {
// if (shopInfo.value.isCollect === 0) {
// shopInfo.value.privateIntFcount++;
// shopInfo.value.isCollect = 1;
// } else {
// shopInfo.value.privateIntFcount--;
// shopInfo.value.isCollect = 0;
// }
// shopInfo.value.console.log('111');
// }
// });
} }
function collectionFn() { function collectionFn() {
console.log('shopInfo.value', shopId.value);
getCollectFn(shopId.value); getCollectFn(shopId.value);
} }
function getLocationFn() { function getLocationFn() {
......
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