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)
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 抽奖活动信息
|
||||
* */
|
||||
export function getDetail() {
|
||||
return request.get('/lottery/dice/detail')
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖
|
||||
* */
|
||||
export function getPrize() {
|
||||
return request.post('/lottery/dice/draw')
|
||||
}
|
||||
|
||||
/**
|
||||
* 领奖
|
||||
* */
|
||||
export function takePrize(lotteryRecordId){
|
||||
return request.post('/lottery/takePrize',{lotteryRecordId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖记录
|
||||
* @param page 页码
|
||||
* @param limit 每页条数
|
||||
* */
|
||||
export function getLogs(page = 1, limit = 10) {
|
||||
return request.get('/lottery/dice/records',{page,limit})
|
||||
}
|
||||
+2
-2
@@ -8,9 +8,9 @@ import request from "@/utils/request";
|
||||
* @param cartId
|
||||
* @returns {*}
|
||||
*/
|
||||
export function postOrderConfirm(cartId) {
|
||||
export function postOrderConfirm(cartId,lotteryRecordId='') {
|
||||
return request.post("/order/confirm", {
|
||||
cartId
|
||||
cartId,lotteryRecordId
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,13 @@ export function getProductPoster(id) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 购物车分组列表
|
||||
* */
|
||||
export function getCartGroup() {
|
||||
return request.get('/cart/listGroup')
|
||||
}
|
||||
|
||||
/*
|
||||
* 购物车 添加
|
||||
* */
|
||||
|
||||
@@ -393,6 +393,12 @@ export function getWithdrawalRecordList(q) {
|
||||
return request.get("/list", q);
|
||||
}
|
||||
|
||||
export function payoutLog(page, limit = 3, status) {
|
||||
let param = {page,limit}
|
||||
if (status) param.status = status
|
||||
return request.get('/extract/listGroup', param)
|
||||
}
|
||||
|
||||
/*
|
||||
* 提现银行
|
||||
* */
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 寻看点获取随机视频
|
||||
* */
|
||||
export function randomList(param) {
|
||||
return request.get('/video/random', param)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市列表
|
||||
* */
|
||||
export function getVideoCity() {
|
||||
return request.get('/video/cityList')
|
||||
}
|
||||
|
||||
/**
|
||||
* 视频点赞
|
||||
* */
|
||||
export function likeVideo(videoId) {
|
||||
return request.post('/video/like', {videoId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 视频取消点赞
|
||||
* */
|
||||
export function removeLikeVideo(videoId) {
|
||||
return request.post('/video/removeLike', {videoId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 视频取消收藏
|
||||
* */
|
||||
export function removeFavoriteVideo(videoId) {
|
||||
return request.post('/video/removeFavorite', {videoId})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取评论
|
||||
* */
|
||||
export function getReplyList(id, page, limit = 10) {
|
||||
return request.get(`/video/replyList/${id}`, {page, limit})
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布评论
|
||||
* */
|
||||
export function submitReply(videoId, comment) {
|
||||
return request.post('/video/reply', {videoId, comment})
|
||||
}
|
||||
Reference in New Issue
Block a user