1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- 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'
- })
- }
- };
- export default PrizeApi;
|