全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug

This commit is contained in:
stivepeim
2021-06-11 17:41:16 +08:00
parent 0b9f28fa52
commit b76840e10f
582 changed files with 35633 additions and 28276 deletions

View File

@@ -17,6 +17,16 @@ class Cache {
return Math.round(new Date() / 1000);
}
/**
* 字符串转时间戳
* @param {Object} expiresTime
*/
strTotime(expiresTime){
let expires_time = expiresTime.substring(0, 19);
expires_time = expires_time.replace(/-/g, '/');
return Math.round(new Date(expires_time).getTime() / 1000);
}
/**
* 设置过期时间缓存
* @param {Object} key