Commit 52cca50c authored by yaya's avatar yaya

feat: 代码优化

parent d3dfc84f
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
}, },
formatDuring(mss) { formatDuring(mss) {
console.log('======mss=', mss) // console.log('======mss=', mss)
if (mss > 0) { if (mss > 0) {
const hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) // 得到小时 const hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) // 得到小时
const minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60)) // 得到分钟数 const minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60)) // 得到分钟数
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
// 得到秒数 // 得到秒数
const seconds = parseInt((mss % (1000 * 60)) / 1000) const seconds = parseInt((mss % (1000 * 60)) / 1000)
const str2 = seconds < 10 ? ('0' + seconds) : seconds const str2 = seconds < 10 ? ('0' + seconds) : seconds
console.log('======mss=', '剩余' + str + ':' + str1 + ':' + str2) // console.log('======mss=', '剩余' + str + ':' + str1 + ':' + str2)
return '剩余' + str + ':' + str1 + ':' + str2 return '剩余' + str + ':' + str1 + ':' + str2
} else { } else {
this.$emit('finishCountDown') this.$emit('finishCountDown')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment