From f58942850dd845f871c6565566a87d68c95c7da2 Mon Sep 17 00:00:00 2001
From: Faker <Faker@apple.com>
Date: Wed, 17 Aug 2022 09:22:59 +0800
Subject: [PATCH] Update jd_bean_change.js

---
 jd_bean_change.js | 35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/jd_bean_change.js b/jd_bean_change.js
index 429262e..a58b88e 100644
--- a/jd_bean_change.js
+++ b/jd_bean_change.js
@@ -369,6 +369,7 @@ if(DisableIndex!=-1){
 			$.YunFeiQuanEndTime2 = "";
 			$.JoyRunningAmount = "";
 			$.ECardinfo = "";
+			$.PlustotalScore=0;
 			TempBaipiao = "";
 			strGuoqi="";
 			console.log(`******开始查询【京东账号${$.index}】${$.nickName || $.UserName}*********`);
@@ -405,7 +406,8 @@ if(DisableIndex!=-1){
 		         GetJxBeaninfo(), //喜豆查询
 		         GetPigPetInfo(), //金融养猪
 				 GetJoyRuninginfo(), //汪汪赛跑 
-				 CheckEcard() //E卡查询
+				 CheckEcard(), //E卡查询
+				 queryScores()
 		     ])
 			
 			await showMsg();
@@ -652,8 +654,11 @@ async function showMsg() {
 			if ($.levelName == "铜牌")
 				$.levelName = `🥉铜牌`;
 
-			if ($.isPlusVip == 1)
+			if ($.isPlusVip == 1){
 				ReturnMessage += `${$.levelName}Plus`;
+				if($.PlustotalScore)
+					ReturnMessage+=`(${$.PlustotalScore}分)`
+			}
 			else
 				ReturnMessage += `${$.levelName}会员`;
 		}
@@ -2922,6 +2927,32 @@ function GetDateTime(date) {
 	return timeString;
 }
 
+async function queryScores() {
+	if ($.isPlusVip != 1)
+		return
+    let res = ''
+    let url = {
+      url: `https://rsp.jd.com/windControl/queryScore/v1?lt=m&an=plus.mobile&stamp=${Date.now()}`,
+      headers: {
+        'Cookie': cookie,
+        'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Redmi Note 8 Pro Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045715 Mobile Safari/537.36',
+        'Referer': 'https://plus.m.jd.com/rights/windControl'
+      }
+    };
+	
+    $.get(url, async (err, resp, data) => {
+      try {
+        const result = JSON.parse(data)
+        if (result.code == 1000) {
+		  $.PlustotalScore=result.rs.userSynthesizeScore.totalScore;
+        } 
+      } catch (e) {
+        $.logErr(e, resp);
+      }
+    })
+  
+}
+
 // prettier-ignore
 function Env(t, e) {
 	"undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0);