提交 43eebb3e authored 作者: GOD_ZYX's avatar GOD_ZYX

修改 存在时间

上级 bc098ba6
......@@ -26,7 +26,7 @@ const sendMsg = (req, res) => {
_conArr.push({
auth: nsCoonPool[i].key,
_str: _str,
pwd: Buffer.from((nsCoonPool[i].pwd || ''), 'base64').toString().replace(/^uokoaduw/gi, '').replace(/auhgniq$/gi, '').split('').reverse().join(''),
pwd: Buffer.from((nsCoonPool[i].pwd || ''), 'base64').toString('utf-8').replace(/^uokoaduw/gi, '').replace(/auhgniq$/gi, '').split('').reverse().join(''),
keepExitTime: cTool.convertTime.durationToTimeString(new Date().getTime() - nsCoonPool[i].createTime),
auth_key: nsCoonPool[i].auth_key || ''
})
......
......@@ -24,6 +24,7 @@ module.exports = {
* @param {[string]} duration 时间戳
*/
durationToTimeString: (duration) => {
duration = Math.floor(duration / 1000)
let h = Math.floor(duration / 3600)
let m = Math.floor((duration - h * 3600) / 60)
let s = (duration - h * 3600 - m * 60) % 60
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论