注销店铺会员卡添加json判断避免比较出错

This commit is contained in:
lxk0301
2020-12-23 09:46:29 +08:00
parent ca91dbfbdd
commit 81bc48fffb
2 changed files with 32 additions and 6 deletions

View File

@ -88,10 +88,11 @@ async function showMsg() {
$.msg($.name, '', `账号${$.index}${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}京豆 🐶${$.message}`, {"open-url": "https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean"});
}
async function bean() {
//前一天的0:0:0时间戳
// console.log(`北京时间零点时间戳:${parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000}`);
// console.log(`北京时间2020-10-28 06:16:05::${new Date("2020/10/28 06:16:05+08:00").getTime()}`)
// 不管哪个时区。得到都是当前时刻北京时间的时间戳 new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000
//前一天的0:0:0时间戳
const tm = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000 - (24 * 60 * 60 * 1000);
// 今天0:0:0时间戳
const tm1 = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000;

File diff suppressed because one or more lines are too long