shawenguan 1 سال پیش
والد
کامیت
ddb6e029cf
1فایلهای تغییر یافته به همراه18 افزوده شده و 2 حذف شده
  1. 18 2
      Scripts/168/pksPlanAnalysis.js

+ 18 - 2
Scripts/168/pksPlanAnalysis.js

@@ -152,6 +152,22 @@ const g168MemberHeaders = {
 	'Accept': `application/json, text/plain, */*`
 };
 
+
+const pksHistoryHeaders = {
+	'X-Requested-With': `XMLHttpRequest`,
+	'Sec-Fetch-Dest': `empty`,
+	'Connection': `keep-alive`,
+	'Accept-Encoding': `gzip, deflate, br`,
+	'Sec-Fetch-Site': `same-origin`,
+	'User-Agent': gUserAgent,
+	'Sec-Fetch-Mode': `cors`,
+	'Cookie': `__nxquid=ady1/IxpNjwqNkKi2v4b1XnM40kryw==0016`,
+	'Referer': `https://${gBuyPlanHost}/v1/views/pk10/kaijianghm.html`,
+	'Host': gBuyPlanHost,
+	'Accept-Language': `zh-CN,zh-Hans;q=0.9`,
+	'Accept': `*/*`
+};
+
 const formatNow = () => {
 	return magicJS.formatDate(new Date(), 'yyyy-MM-dd');
 }
@@ -511,11 +527,11 @@ async function do168UserLogin(userName, password, captchaCode) {
 }
 
 async function getPksHistoryList(lotCode, date) {
-	const url = `https://${gExpertsRecommendHost}/api/pks/getPksHistoryList.do?lotCode=${lotCode}&date=${date}`;
+	const url = `https://${gBuyPlanHost}/api/pks/getPksHistoryList.do?lotCode=${lotCode}&date=${date}`;
 	magicJS.logger.info(url);
 	const myRequest = {
 		url: url,
-		headers: gExpertsRecommendHeaders,
+		headers: pksHistoryHeaders,
 		body: ``
 	};
 	let result = await magicJS.http.get(myRequest).then(response => {