export default { /** * 单秒倒计时 * @param {Number} initialTime 起始时间 * @param {Function} call 倒计时回调 */ countDownForSecond(initialTime, call) { initialTime-- call(initialTime) let timer = setInterval(function() { if (initialTime == 0) { clearInterval(timer) } else { initialTime-- call(initialTime, timer) } }, 1000) return timer }, }