function timestampToTime(timestamp) {
if (!timestamp) return timestamp
var date = new Date(timestamp)
var year = date.getFullYear()
var month = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1)
var day = date.getDate()
var hours = date.getHours()
var minutes = date.getMinutes()
const str = hours < 12 ? '上午': '下午'
return year + '年' + month + '月' + day + '号' + str + hours + '时' + minutes + '分'
}
// 调用
const time = timestampToTime("07/11/2022 14:35");
// 输出
console.log(time)`