Feat:寻看点和抽奖
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 商品是否已收藏
|
||||
* */
|
||||
export function checkProduct(productId, uniqueId) {
|
||||
return request.get('/product/hasFavorite', {productId, uniqueId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加收藏商品
|
||||
* */
|
||||
export function addProduct(productId, uniqueId) {
|
||||
return request.post('/collection/product/add', {productId, uniqueId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消收藏商品
|
||||
* */
|
||||
export function removeProduct(productId, uniqueId) {
|
||||
return request.post('/collection/product/remove', {productId, uniqueId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收藏商品列表
|
||||
* */
|
||||
export function getProductList(page = 1, limit = 10) {
|
||||
return request.get('/collection/product/list', {page, limit})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加收藏店铺
|
||||
* */
|
||||
export function addStore(hotelId) {
|
||||
return request.post('/collection/hotel/add', {hotelId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消收藏店铺
|
||||
* */
|
||||
export function removeStore(hotelId){
|
||||
return request.post('/collection/hotel/remove',{hotelId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收藏店铺列表
|
||||
* */
|
||||
export function getStoreList(page = 1, limit = 10) {
|
||||
return request.get('/collection/hotel/list', {page, limit})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加收藏视频
|
||||
* */
|
||||
export function addVideo(videoId) {
|
||||
return request.post('/collection/video/add', {videoId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收藏视频列表
|
||||
* */
|
||||
export function getVideoList(page = 1, limit = 10) {
|
||||
return request.get('/collection/video/list', {page, limit})
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除收藏项目
|
||||
* */
|
||||
export function removeFavorite(ids) {
|
||||
return request.post('/collection/delete', ids)
|
||||
}
|
||||
Reference in New Issue
Block a user