78 lines
1.6 KiB
JavaScript
78 lines
1.6 KiB
JavaScript
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)
|
|
}
|
|
|
|
/**
|
|
* 收藏千县名品县城列表
|
|
* */
|
|
export function getCountyFamousList(page = 1, limit = 10) {
|
|
return request.get('/collection/countyFamous/list', {page, limit})
|
|
} |