소스 검색

upload

release
HolyKnightIX 2 년 전
부모
커밋
b7fdac7b44
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. BIN
      dist.zip
  2. +4
    -2
      src/utils/index.js

BIN
dist.zip 파일 보기


+ 4
- 2
src/utils/index.js 파일 보기

@@ -68,11 +68,13 @@ export function scrollToID(id) {
*/
export function timestampToTime(timestamp, format) {
//时间戳为10位需*1000,时间戳为13位不需乘1000
const length = timestamp.length
const length = timestamp.length || ''
if (length <= 10) {
var date = new Date(timestamp * 1000)
} else {
} else if (length > 10) {
var date = new Date(timestamp)
} else {
return '无时间戳'
}
let Y = String(date.getFullYear())
let M = String(date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)


불러오는 중...
취소
저장