|
@@ -1,4 +1,5 @@
|
|
-const HOST = 'https://lottery-wxa-api.duowan.com'
|
|
|
|
|
|
+const HOST = 'https://lottery-wxa-api.duowan.com' // prod
|
|
|
|
+// const HOST = 'https://test-lottery-wxa-api.duowan.com/' // test
|
|
const HEADER = { 'content-type': 'application/x-www-form-urlencoded' }
|
|
const HEADER = { 'content-type': 'application/x-www-form-urlencoded' }
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -95,13 +96,14 @@ function getLotteryDetail(id) {
|
|
* @param {*} id 抽奖ID
|
|
* @param {*} id 抽奖ID
|
|
* @returns
|
|
* @returns
|
|
*/
|
|
*/
|
|
-function drawLottery(id) {
|
|
|
|
|
|
+function drawLottery(id, formId) {
|
|
const { token } = wx.getStorageSync('USER_INFO')
|
|
const { token } = wx.getStorageSync('USER_INFO')
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
wx.request({
|
|
wx.request({
|
|
url: HOST + '/lotteries/draw/' + id ,
|
|
url: HOST + '/lotteries/draw/' + id ,
|
|
data: {
|
|
data: {
|
|
- token
|
|
|
|
|
|
+ token,
|
|
|
|
+ formId
|
|
},
|
|
},
|
|
header: HEADER,
|
|
header: HEADER,
|
|
method: 'POST',
|
|
method: 'POST',
|