|
@@ -84,10 +84,10 @@ function checkHandleRequest() {
|
|
|
}
|
|
}
|
|
|
lk.log('queryOptType='+queryOptType);
|
|
lk.log('queryOptType='+queryOptType);
|
|
|
lk.log('txcode='+String(txcode));
|
|
lk.log('txcode='+String(txcode));
|
|
|
- let notifyCount = checkTodayNotifyCount();
|
|
|
|
|
if('clp_service' == queryOptType){
|
|
if('clp_service' == queryOptType){
|
|
|
switch(txcode){
|
|
switch(txcode){
|
|
|
case 'autoLogin':
|
|
case 'autoLogin':
|
|
|
|
|
+ let notifyCount = checkTodayNotifyCount(txcode);
|
|
|
let DeviceId = $request.headers['DeviceId'] || $request.headers['Deviceid'] || $request.headers['deviceid'];
|
|
let DeviceId = $request.headers['DeviceId'] || $request.headers['Deviceid'] || $request.headers['deviceid'];
|
|
|
let MBCUserAgent = $request.headers['MBC-User-Agent'] || $request.headers['Mbc-user-agent'] || $request.headers['mbc-user-agent'];
|
|
let MBCUserAgent = $request.headers['MBC-User-Agent'] || $request.headers['Mbc-user-agent'] || $request.headers['mbc-user-agent'];
|
|
|
if($request.headers['AppVersion']){
|
|
if($request.headers['AppVersion']){
|
|
@@ -118,6 +118,7 @@ function checkHandleRequest() {
|
|
|
lk.log(`建行生活活动数据[${txcode}]获取成功`);
|
|
lk.log(`建行生活活动数据[${txcode}]获取成功`);
|
|
|
switch(txcode){
|
|
switch(txcode){
|
|
|
case 'A3341A038':
|
|
case 'A3341A038':
|
|
|
|
|
+ let notifyCount = checkTodayNotifyCount(txcode);
|
|
|
if(notifyCount < 2){
|
|
if(notifyCount < 2){
|
|
|
lk.appendNotifyInfo('🎉 建行生活签到数据获取成功');
|
|
lk.appendNotifyInfo('🎉 建行生活签到数据获取成功');
|
|
|
}
|
|
}
|
|
@@ -129,24 +130,24 @@ function checkHandleRequest() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function checkTodayNotifyCount(){
|
|
|
|
|
- let notifyCntStr = lk.getVal(jhshStoreKeyPrefix+'NotifyCnt');
|
|
|
|
|
|
|
+function checkTodayNotifyCount(flag='default'){
|
|
|
|
|
+ let notifyCntStr = lk.getVal(jhshStoreKeyPrefix+'NotifyCnt-'+flag);
|
|
|
let td = lk.formatDate(new Date(), 'yyyyMMdd');
|
|
let td = lk.formatDate(new Date(), 'yyyyMMdd');
|
|
|
let n = 0;
|
|
let n = 0;
|
|
|
if(notifyCntStr){
|
|
if(notifyCntStr){
|
|
|
let [date, num] = notifyCntStr.split('_');
|
|
let [date, num] = notifyCntStr.split('_');
|
|
|
if (date == td && num) {
|
|
if (date == td && num) {
|
|
|
n = Number(num) + 1;
|
|
n = Number(num) + 1;
|
|
|
- lk.setVal(jhshStoreKeyPrefix+'NotifyCnt', `${td}_${n}`);
|
|
|
|
|
|
|
+ lk.setVal(jhshStoreKeyPrefix+'NotifyCnt-'+flag, `${td}_${n}`);
|
|
|
return n;
|
|
return n;
|
|
|
} else {
|
|
} else {
|
|
|
n = n + 1;
|
|
n = n + 1;
|
|
|
- lk.setVal(jhshStoreKeyPrefix+'NotifyCnt', `${td}_${n}`);
|
|
|
|
|
|
|
+ lk.setVal(jhshStoreKeyPrefix+'NotifyCnt-'+flag, `${td}_${n}`);
|
|
|
return n;
|
|
return n;
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
n = n + 1;
|
|
n = n + 1;
|
|
|
- lk.setVal(jhshStoreKeyPrefix+'NotifyCnt', `${td}_${n}`);
|
|
|
|
|
|
|
+ lk.setVal(jhshStoreKeyPrefix+'NotifyCnt-'+flag, `${td}_${n}`);
|
|
|
return n;
|
|
return n;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|