123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- import request from '../utils/request.js'
- class LuckDraw extends request {
- static getActivityDetail(id) {
- let params = {
- id
- }
- return this.postRequest(`${this.BASE_URL}open/luck-draw/detail`, params, true)
- }
- static drawPrize(activityId, mobile) {
- const params = {
- activityId,
- mobile
- }
- return this.postRequest(`${this.BASE_URL}open/luck-draw/draw-prize`, params, true)
- }
- static getHitList(activityId) {
- const params = {
- activityId
- }
- return this.postRequest(`${this.BASE_URL}open/luck-draw/hit-list`, params, true)
- }
- static getActivityList(params) {
- return this.postRequest(`${this.BASE_URL}open/luck-draw/activity-list`, params)
- }
- /**
- * 用户抽奖记录
- * @param {} params
- */
- static getUserDrawRecord(params) {
- return this.postRequest(`${this.BASE_URL}open/luck-draw/user-draw-record`, params)
- }
- /**
- * @param {*} params
- */
- static getUserPrizeList(params) {
- return this.postRequest(`${this.BASE_URL}open/luck-draw/user-prize-list`, params)
- }
- /**
- * 分享回调
- */
- static shareActivity(activityId, mobile) {
- const params = {
- activityId,
- mobile
- }
- return this.postRequest(`${this.BASE_URL}open/luck-draw/share-activity`, params, true)
- }
- static getTimes(activityId, mobile) {
- const params = {
- activityId,
- mobile
- }
- return this.postRequest(`${this.BASE_URL}open/luck-draw/get-times`, params, true)
- }
- }
- export default LuckDraw;
- // 示例
- // LuckDraw.drawPrize(3, "16602120168").then(res => {
- // }).catch(_ => {})
- // LuckDraw.getHitList(3).then(res => {
- // }).catch(_ => {})
- // LuckDraw.getActivityList({
- // page: 1,
- // pageSize: 20
- // }).then(res => {
- // }).catch(_ => {})
- // LuckDraw.getUserDrawRecord({
- // mobile: "16602120168",
- // activityId: 3,
- // page: 1,
- // pageSize: 20
- // }).then(res => {
- // }).catch(_ => {})
- // LuckDraw.getUserPrizeList({
- // mobile: "16602120168",
- // goodsType: 1,
- // page: 1,
- // pageSize: 20
- // }).then(res => {
- // }).catch(_ => {})
- // LuckDraw.shareActivity(3, "16602120168").then(res => {
- // }).catch(_ => {})
- // LuckDraw.getTimes(3, "16602120168").then(res => {
- // }).catch(_ => {})
|