|
|
@@ -137,13 +137,12 @@ function checkHandleRequest() {
|
|
|
handleCreateTokenId();
|
|
|
break;
|
|
|
case '/brop/mop/cust/mopsf/nrp/uc/simple/rule/info/batchSatisfy':
|
|
|
+ handleBatchSatisfy();
|
|
|
break;
|
|
|
case '/brop/cmp/cust/cmpsf/mgm/origin/queryPageConfig.do':
|
|
|
handlePageConfig();
|
|
|
break;
|
|
|
case '/brcp/uc/cust/uc-login-web.qryLoginStatus.do':
|
|
|
- case '/rmb/brcp/uc/cust/uc-login-web.qryLoginStatus.do':
|
|
|
- handleLoginStatus();
|
|
|
break;
|
|
|
case '/brop/mop/cust/mopsf/lottery/getLeftOfferNum':
|
|
|
break;
|
|
|
@@ -153,12 +152,16 @@ function checkHandleRequest() {
|
|
|
default:
|
|
|
if (path.indexOf('/kuaizhan/v2/5K2422/20230925/k84123/index.html') > -1) {
|
|
|
handleHomePage();
|
|
|
+ } else if (path.indexOf('/rmb/brcp/uc/cust/uc-login-web.qryLoginStatus.do') > -1) {
|
|
|
+ handleLoginStatus();
|
|
|
} else if (path.indexOf('/brop/mop/cust/mopsf/personality/activity/status/query') > -1) {
|
|
|
handlePublicActivityStatus();
|
|
|
} else if (path.indexOf('/bron/coss/cust/app/getSupernatant') > -1) {
|
|
|
|
|
|
} else if (path.indexOf('/brop/mop/cust/mopsf/uc/auth/lottery/queryCustomerActivityStatus') > -1) {
|
|
|
handleCustomerActivityStatus();
|
|
|
+ } else if (path.indexOf('/brop/stp/kafka/http/h5monitor_web/rest/ac/h5Monitor') > -1) {
|
|
|
+ handleH5MonitorUploadInfo();
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
@@ -232,6 +235,13 @@ function handleHeaders() {
|
|
|
magicJS.logger.info(`当前Cookie已经是最新无需更新`);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ let userAgent = headers['User-Agent'];
|
|
|
+ let mRet = userAgent.match(/pageActionId\/([\S.]+)\s*/);
|
|
|
+ let pageActionId = mRet && mRet[1] ? mRet[1] : "";
|
|
|
+ if (pageActionId && pageActionId.length > 0) {
|
|
|
+ magicJS.data.write(PingAnIKEAConstKey.PageActionId, pageActionId);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -261,7 +271,12 @@ function handleCreateTokenId() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+function handleBatchSatisfy() {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
function handlePageConfig() {
|
|
|
+ handleHeaders();
|
|
|
let rspData = getResponsePlainData();
|
|
|
if (!rspData) {
|
|
|
return;
|
|
|
@@ -275,7 +290,10 @@ function handlePageConfig() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
function handlePublicActivityStatus() {
|
|
|
+ handleHeaders();
|
|
|
let rspData = getResponsePlainData();
|
|
|
if (!rspData) {
|
|
|
return;
|
|
|
@@ -288,16 +306,20 @@ function handlePublicActivityStatus() {
|
|
|
let queryNextTime = queryParams.queryNextTime;
|
|
|
|
|
|
let data = rspData.data;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
function handleCustomerActivityStatus() {
|
|
|
+ handleHeaders();
|
|
|
let rspData = getResponsePlainData();
|
|
|
if (!rspData) {
|
|
|
return;
|
|
|
}
|
|
|
rspData = { pagination: null, data: null, responseCode: "000000", responseMsg: "成功" };
|
|
|
gRetBody = rspData;
|
|
|
+
|
|
|
+ if (rspData.responseCode != "000000") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function handleCustomerOffer() {
|
|
|
@@ -307,10 +329,95 @@ function handleCustomerOffer() {
|
|
|
}
|
|
|
rspData.responseCode = "000000";
|
|
|
gRetBody = rspData;
|
|
|
+
|
|
|
+ if (rspData.responseCode != "000000") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function handleLoginStatus() {
|
|
|
+ handleHeaders();
|
|
|
+ let rspData = getResponsePlainData();
|
|
|
+ if (!rspData) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
+ if (rspData.responseCode != "000000") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function handleH5MonitorUploadInfo() {
|
|
|
+ let rspData = getResponsePlainData();
|
|
|
+ if (!rspData) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rspData.responseCode != "000000") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ let reqData = getRequestPlainData();
|
|
|
+ if (!reqData || !reqData.uploadInfo) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let uploadInfo = reqData.uploadInfo;
|
|
|
+ let reqObject = null;
|
|
|
+ // reqObject = {
|
|
|
+ // "countType": 32,
|
|
|
+ // "totalDelay": 464,
|
|
|
+ // "h5monitor_sdk_version": "1.7.0",
|
|
|
+ // "performanceTiming": {
|
|
|
+ // "navigationStart": 1724052379766,
|
|
|
+ // "unloadEventStart": 0,
|
|
|
+ // "unloadEventEnd": 0,
|
|
|
+ // "redirectStart": 0,
|
|
|
+ // "redirectEnd": 0,
|
|
|
+ // "fetchStart": 1724052379766,
|
|
|
+ // "domainLookupStart": 1724052379766,
|
|
|
+ // "domainLookupEnd": 1724052379766,
|
|
|
+ // "connectStart": 1724052379766,
|
|
|
+ // "connectEnd": 1724052379766,
|
|
|
+ // "secureConnectionStart": 0,
|
|
|
+ // "requestStart": 1724052379766,
|
|
|
+ // "responseStart": 1724052379766,
|
|
|
+ // "responseEnd": 1724052379766,
|
|
|
+ // "domLoading": 1724052380035,
|
|
|
+ // "domInteractive": 1724052380184,
|
|
|
+ // "domContentLoadedEventStart": 1724052380184,
|
|
|
+ // "domContentLoadedEventEnd": 1724052380189,
|
|
|
+ // "domComplete": 1724052380230,
|
|
|
+ // "loadEventStart": 1724052380230,
|
|
|
+ // "loadEventEnd": 1724052380230
|
|
|
+ // },
|
|
|
+ // "navigation": {
|
|
|
+ // "type": 0,
|
|
|
+ // "redirectCount": 0
|
|
|
+ // },
|
|
|
+ // "ttfb": 0,
|
|
|
+ // "domReady": 418,
|
|
|
+ // "qs": "?traceid=fixed_innerid_KDAPP-96SS-HDY-1&innerid=KDAPP-96SS-HDY-1",
|
|
|
+ // "firstScreen": 418,
|
|
|
+ // "routelabel": 0,
|
|
|
+ // "firstSource": "api",
|
|
|
+ // "dt": 1724052381231,
|
|
|
+ // "fbextension": "",
|
|
|
+ // "source": "mozilla/5.0 (iphone; cpu iphone os 16_6_1 like mac os x) applewebkit/605.1.15 (khtml, like gecko) mobile/15e148 iphone 14 pro aladdinhybrid/4.8.77 (paebank 6.23.0) aladdinbridge/3.0.0 subcontracting/appstore deviceid/auuid_918d439ffcef935c2fd84d3a3e593b6523c916fc unionpay/1.0 pabank devicetype/1 networkstate/wifi kiwibridge/1.0.0 device-dpr/3 device-dr/852*393 appstyle/bz bz-navbarheight/309 dztab-navbarheight/327 pageactionid/662fc3b8",
|
|
|
+ // "webtrendsid": "AUUID_918d439ffcef935c2fd84d3a3e593b6523c916fc",
|
|
|
+ // "appversion": "6.23.0",
|
|
|
+ // "platform": "ios",
|
|
|
+ // "pageID": "PK084123",
|
|
|
+ // "h5_app_id": "A208848050024B1584C78C904A4900E4",
|
|
|
+ // "pagetitle": "宜家礼品卡88折起",
|
|
|
+ // "ymd": "2024-08-19 15:26:21",
|
|
|
+ // "page": "https://b.pingan.com.cn/kuaizhan/v2/5K2422/20230925/k84123/index.html",
|
|
|
+ // "requestId": "6ugxCquxgrG49lDeOVXSqw61OT00123s"
|
|
|
+ // };
|
|
|
+ try {
|
|
|
+ reqObject = JSON.parse(decodeURIComponent(uploadInfo));
|
|
|
+ } catch (error) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -374,6 +481,24 @@ async function checkGetPageData() {
|
|
|
return gPageData;
|
|
|
}
|
|
|
|
|
|
+async function getClientTag() {
|
|
|
+ if (!gPageData) {
|
|
|
+ gPageData = await checkGetPageData();
|
|
|
+ }
|
|
|
+ if (!gPageData) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let clientTag = '';
|
|
|
+ let widgets = gPageData.widgets;
|
|
|
+ for (let i = 0; i < widgets.length; i++) {
|
|
|
+ const widget = widgets[i];
|
|
|
+ if (widget.label.indexOf('简易规则') > -1) {
|
|
|
+ clientTag = widget.config.clientTag;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return clientTag;
|
|
|
+}
|
|
|
+
|
|
|
function getResponseErrorMsg(errCode, config, responseMsg) {
|
|
|
let key = errCodeStrMap[errCode];
|
|
|
if (key && config && config[key]) {
|