一些问题的修复

This commit is contained in:
xiaowang
2026-03-19 14:43:57 +08:00
parent 3527e248d1
commit b09c3432d3
22 changed files with 1760 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
import api from './index'
export const productLikeApi = {
/**
* 点赞作品
* @param productId 作品ID
*/
likeProduct: (productId: number) => {
return api.post<boolean>(`/product-like/like/${productId}`)
},
/**
* 取消点赞作品
* @param productId 作品ID
*/
unlikeProduct: (productId: number) => {
return api.post<boolean>(`/product-like/unlike/${productId}`)
},
/**
* 检查用户是否已点赞作品
* @param productId 作品ID
*/
checkLikeStatus: (productId: number) => {
return api.get<boolean>(`/product-like/check/${productId}`)
}
}