|
@@ -337,7 +337,7 @@
|
|
|
}
|
|
|
};
|
|
|
function encryptECB(word) {
|
|
|
- var keyHex = CryptoJS.enc.Utf8.parse(keyStr)
|
|
|
+ var keyHex = CryptoJS.enc.Utf8.parse(state.token)
|
|
|
var plaintText = word
|
|
|
var encryptedData = CryptoJS.AES.encrypt(
|
|
|
plaintText,
|
|
@@ -350,14 +350,14 @@
|
|
|
};
|
|
|
// 大转盘抽奖按钮
|
|
|
async function starDraw() {
|
|
|
- const postData = {
|
|
|
+ let postData = {
|
|
|
actId: state.actId,
|
|
|
};
|
|
|
- postData = JSON.stringify(postData)
|
|
|
- postData = encryptECB(postData)
|
|
|
- postData = postData.replace(/[\t\r\f\n\s]*/g,'');
|
|
|
- // let res = await httpAjax('post', '/mall-prize/prize', getFormData(postData));
|
|
|
- let res = await httpAjax('post', '/mall-prize/prize', postData);
|
|
|
+ // postData = JSON.stringify(postData)
|
|
|
+ // postData = encryptECB(postData)
|
|
|
+ // postData = postData.replace(/[\t\r\f\n\s]*/g,'');
|
|
|
+ let res = await httpAjax('post', '/mall-prize/prize', getFormData(postData));
|
|
|
+ // let res = await httpAjax('post', '/mall-prize/prize', postData);
|
|
|
if (res.errno === 0) {
|
|
|
// console.log('抽奖',res.data);
|
|
|
state.prizeId = res.data.index;
|