123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- import request from '@/sheep/request';
- const PrizeApi = {
- // 根据活动id获取奖品
- getPrizeByLotteryId: (lotteryId) => {
- return request({
- url: '/promotion/luck-prize/get',
- method: 'GET',
- params: { lotteryId },
- });
- },
- // 根据商品id获取抽奖活动
- getPrizeByGoodsId: (spuId) => {
- return request({
- url: '/promotion/luck-lottery/get/by-spu-id',
- method: 'GET',
- params: { spuId },
- });
- },
- // 据活动id获取用户抽奖次数
- getNumByLotteryId: (lotteryId) => {
- return request({
- url: '/promotion/luck-lottery/get/user-num',
- method: 'GET',
- params: { lotteryId },
- });
- },
- // 抽奖记录分页
- getLuckLotteryRecordPage: (params) => {
- return request({
- url: '/promotion/luck-lottery-record/page',
- method: 'GET',
- params
- })
- },
- // 奖品领取
- luckyLotteryRecordReceive: (data) => {
- return request({
- url: '/promotion/luck-lottery-record/receive',
- method: 'POST',
- data
- })
- },
- // 放弃领取
- luckyLotteryRecordGiveUp: (id) => {
- return request({
- url: '/promotion/luck-lottery-record/give-up?id=' + id,
- method: 'POST'
- })
- },
- // 根据商品id活动对应的奖品区域信息
- getPrizeAreaByGoodsId: (params) => {
- return request({
- url: '/promotion/luck-prize/get/extend/area',
- method: 'GET',
- params,
- });
- },
- // 创建用户期望奖品记录
- luckTargetCreate: (data) => {
- return request({
- url: '/promotion/luck-lottery/user-target/create',
- method: 'POST',
- data,
- });
- },
- // 根据订单id获取中奖记录
- getLuckLotteryRecordByOrderId: (orderId) => {
- return request({
- url: '/promotion/luck-lottery-record/get/by-order-id',
- method: 'GET',
- params: { orderId },
- });
- },
- // 根据订单id组获取中奖记录
- getLuckLotteryRecordByOrderIds: (orderIds) => {
- return request({
- url: '/promotion/luck-lottery-record/get/by-order-ids',
- method: 'GET',
- params: { orderIds },
- });
- },
-
- };
- export default PrizeApi;
|