[本时生活h5端]
This commit is contained in:
79
apis/interfaces/draw.js
Normal file
79
apis/interfaces/draw.js
Normal file
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
* 抽奖活动
|
||||
*/
|
||||
import request from '../request'
|
||||
|
||||
// 首页
|
||||
const index = (data) => {
|
||||
return request({
|
||||
url: 'activity/exchanges'
|
||||
})
|
||||
}
|
||||
|
||||
// 抽奖
|
||||
const result = (exchange_id) => {
|
||||
return request({
|
||||
url: 'activity/exchanges/' + exchange_id + '/draw'
|
||||
})
|
||||
}
|
||||
|
||||
// 抽奖默认信息(抽奖次数)
|
||||
const awards = (exchange_id, data) => {
|
||||
return request({
|
||||
url: 'activity/exchanges/' + exchange_id + "/awards",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 我的订单
|
||||
const orders = (data) => {
|
||||
return request({
|
||||
url: 'activity/exchanges/orders',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 我的优惠券
|
||||
const coupons = (data) => {
|
||||
return request({
|
||||
url: 'activity/exchanges/coupons',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 产品选择
|
||||
const exchanges = (log_id) => {
|
||||
return request({
|
||||
url: 'activity/exchanges/log/' + log_id
|
||||
})
|
||||
}
|
||||
|
||||
// 兑换产品
|
||||
const exchangesBuy = (data) => {
|
||||
return request({
|
||||
url: 'activity/exchanges/buy',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 兑换产品
|
||||
const activityBuy = (data) => {
|
||||
return request({
|
||||
url: 'activity/exchanges/buy',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
index,
|
||||
result,
|
||||
awards,
|
||||
orders,
|
||||
coupons,
|
||||
exchanges,
|
||||
exchangesBuy,
|
||||
activityBuy
|
||||
}
|
||||
Reference in New Issue
Block a user