切换wxjava导致直播间roomid不兼容,同步时候报错

This commit is contained in:
xuwenbo
2020-09-05 20:41:52 +08:00
parent 531e64f145
commit d15948b649
2 changed files with 33 additions and 10 deletions

View File

@ -54,7 +54,7 @@ export function parseTime(time, cFormat) {
* @returns {string}
*/
export function formatTime(time, option) {
if(time == null) return '----'
if (time == null) return '----'
if (('' + time).length === 10) {
time = parseInt(time) * 1000
@ -94,8 +94,23 @@ export function formatTime(time, option) {
}
export function formatTimeTwo(time) {
if(time == null) return "无"
//time = time * 1000
if (time == null) return '无'
// time = time * 1000
const d = new Date(time)
return (
d.getFullYear() + '年' +
(d.getMonth() + 1) +
'月' +
d.getDate() +
'日' +
d.getHours() +
'时' +
d.getMinutes() +
'分'
)
}
export function formatTimeThree(time) {
time = time * 1000
const d = new Date(time)
return (
d.getFullYear() + '年' +
@ -109,7 +124,6 @@ export function formatTimeTwo(time) {
'分'
)
}
/**
* @param {string} url
* @returns {Object}