|
@@ -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' }
|
|
|
|
|
|
/**
|
|
@@ -95,13 +96,14 @@ function getLotteryDetail(id) {
|
|
|
* @param {*} id 抽奖ID
|
|
|
* @returns
|
|
|
*/
|
|
|
-function drawLottery(id) {
|
|
|
+function drawLottery(id, formId) {
|
|
|
const { token } = wx.getStorageSync('USER_INFO')
|
|
|
return new Promise((resolve, reject) => {
|
|
|
wx.request({
|
|
|
url: HOST + '/lotteries/draw/' + id ,
|
|
|
data: {
|
|
|
- token
|
|
|
+ token,
|
|
|
+ formId
|
|
|
},
|
|
|
header: HEADER,
|
|
|
method: 'POST',
|