MCPcopy Create free account
hub / github.com/6dylan6/jdm / getQLinfo

Function getQLinfo

function/sendNotify.js:915–952  ·  view source on GitHub ↗
(strCK, intcreated, strTimestamp, strRemark)

Source from the content-addressed store, hash-verified

913}
914
915function getQLinfo(strCK, intcreated, strTimestamp, strRemark) {
916 var strCheckCK = strCK.match(/pt_key=([^; ]+)(?=;?)/) && strCK.match(/pt_key=([^; ]+)(?=;?)/)[1];
917 var strPtPin = decodeURIComponent(strCK.match(/pt_pin=([^; ]+)(?=;?)/) && strCK.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
918 var strReturn = "";
919 if (strCheckCK.substring(0, 3) == "AAJ") {
920 var DateCreated = new Date(intcreated);
921 var DateTimestamp = new Date(strTimestamp);
922 var DateToday = new Date();
923 if (strRemark) {
924 var Tempindex = strRemark.indexOf("@@");
925 if (Tempindex != -1) {
926 //console.log(strPtPin + ": 检测到NVJDC的备注格式,尝试获取登录时间,瑞思拜~!");
927 var TempRemarkList = strRemark.split("@@");
928 for (let j = 1; j < TempRemarkList.length; j++) {
929 if (TempRemarkList[j]) {
930 if (TempRemarkList[j].length == 13) {
931 DateTimestamp = new Date(parseInt(TempRemarkList[j]));
932 //console.log(strPtPin + ": 获取登录时间成功:" + GetDateTime(DateTimestamp));
933 break;
934 }
935 }
936 }
937 }
938 }
939
940 //过期时间
941 var UseDay = Math.ceil((DateToday.getTime() - DateCreated.getTime()) / 86400000);
942 var LogoutDay = 30 - Math.ceil((DateToday.getTime() - DateTimestamp.getTime()) / 86400000);
943 let Loginday = Math.ceil((DateToday.getTime() - DateTimestamp.getTime()) / 86400000)
944 //if (LogoutDay < 1) {
945 strReturn = "\n【登录信息】已服务" + UseDay + "天(已登录" + Loginday + "天)"
946 //} else {
947 // strReturn = "\n【登录信息】已服务" + UseDay + "天(有效期约剩" + LogoutDay + "天)"
948 //}
949
950 }
951 return strReturn
952}
953
954function getRemark(strRemark) {
955 if (strRemark) {

Callers 2

sendNotifyFunction · 0.70
sendNotifybyWxPucherFunction · 0.70

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected