|
@@ -124,6 +124,17 @@ function updateHeaders() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function getXRequestId() {
|
|
|
|
|
+ gTmpRequestSortId++;
|
|
|
|
|
+ return `${gDeviceId}-${gTmpRequsetTimeStamp}-${gTmpRequestSortId}`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function getWillRequestHeaders() {
|
|
|
|
|
+ let headers = gCommonHeaders;
|
|
|
|
|
+ headers['X-REQUEST-ID'] = getXRequestId();
|
|
|
|
|
+ return headers;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function getToken() {
|
|
function getToken() {
|
|
|
let currentDate = new Date();
|
|
let currentDate = new Date();
|
|
|
|
|
|
|
@@ -228,7 +239,7 @@ async function getSessionStatus() {
|
|
|
'addWebTagInfoList[]': encodeURIComponent('module=8point8'),
|
|
'addWebTagInfoList[]': encodeURIComponent('module=8point8'),
|
|
|
}
|
|
}
|
|
|
let url = `https://rmb.pingan.com.cn/credit/core/cust/ma/pabank/getSessionStatus`;
|
|
let url = `https://rmb.pingan.com.cn/credit/core/cust/ma/pabank/getSessionStatus`;
|
|
|
- let headers = gCommonHeaders;
|
|
|
|
|
|
|
+ let headers = getWillRequestHeaders();
|
|
|
let options = {
|
|
let options = {
|
|
|
url: url,
|
|
url: url,
|
|
|
headers: headers,
|
|
headers: headers,
|
|
@@ -270,7 +281,7 @@ async function getSecKillData() {
|
|
|
taskId: msTaskId,
|
|
taskId: msTaskId,
|
|
|
}
|
|
}
|
|
|
let url = `https://rmb.pingan.com.cn/credit/core/cust/ma/online/pabank/ma/pm/others/seckill/show`;
|
|
let url = `https://rmb.pingan.com.cn/credit/core/cust/ma/online/pabank/ma/pm/others/seckill/show`;
|
|
|
- let headers = gCommonHeaders;
|
|
|
|
|
|
|
+ let headers = getWillRequestHeaders();
|
|
|
let options = {
|
|
let options = {
|
|
|
url: url,
|
|
url: url,
|
|
|
headers: headers,
|
|
headers: headers,
|
|
@@ -309,7 +320,7 @@ async function doSecKill() {
|
|
|
'addWebTagInfoList[]': encodeURIComponent('module=8point8'),
|
|
'addWebTagInfoList[]': encodeURIComponent('module=8point8'),
|
|
|
}
|
|
}
|
|
|
let url = `https://rmb.pingan.com.cn/credit/core/cust/ma/online/pabank/ma/pm/others/seckill/doKill`;
|
|
let url = `https://rmb.pingan.com.cn/credit/core/cust/ma/online/pabank/ma/pm/others/seckill/doKill`;
|
|
|
- let headers = gCommonHeaders;
|
|
|
|
|
|
|
+ let headers = getWillRequestHeaders();
|
|
|
let options = {
|
|
let options = {
|
|
|
url: url,
|
|
url: url,
|
|
|
headers: headers,
|
|
headers: headers,
|