diff --git a/f/web-kboss/src/api/ncmatch/index.js b/f/web-kboss/src/api/ncmatch/index.js index 86a39d5..7050981 100644 --- a/f/web-kboss/src/api/ncmatch/index.js +++ b/f/web-kboss/src/api/ncmatch/index.js @@ -219,4 +219,23 @@ export function reqSupplyAndDemandSecondCategory(data){ headers: { 'Content-Type': 'application/json' }, data }) +} + +//收藏 /product/publish_product_collect.dspy +export function reqPublishProductCollect(data){ + return request({ + url: '/user/favorite_add.dspy', + method: 'post', + headers: { 'Content-Type': 'application/json' }, + data + }) +} +//取消收藏 /user/favorite_delete.dspy +export function reqFavoriteDelete(data){ + return request({ + url: '/user/favorite_delete.dspy', + method: 'post', + headers: { 'Content-Type': 'application/json' }, + data + }) } \ No newline at end of file diff --git a/f/web-kboss/src/views/homePage/ncmatch/mainPage/productCard/index.vue b/f/web-kboss/src/views/homePage/ncmatch/mainPage/productCard/index.vue index 3be6828..3bc3664 100644 --- a/f/web-kboss/src/views/homePage/ncmatch/mainPage/productCard/index.vue +++ b/f/web-kboss/src/views/homePage/ncmatch/mainPage/productCard/index.vue @@ -52,13 +52,29 @@
¥{{ item.discount_price }} - {{ item.unit }} {{ item.short_term === '1' ? '(可短租)' : '' }} + {{ item.unit }} {{ item.short_term === '1' ? '(可短租)' : '' }} 已收藏 +
+
+ 立即咨询 + + 详情 >> + + + {{ item.favorite === '1' ? '取消收藏' : '收藏' }} + + +
-
-立即咨询 详情 >> -
@@ -94,10 +110,25 @@ ¥{{ item.discount_price }} {{ item.unit }} {{ item.short_term === '1' ? '(可短租)' : '' }} -
- - 立即咨询 详情 >> +
+ 立即咨询 + + 详情 >> + + + {{ item.favorite === '1' ? '取消收藏' : '收藏' }} + + +
@@ -107,7 +138,7 @@