// 时间戳转年/月/日或月/日或时分秒
function timedata(timestamp, type = 1) {
	var date = new Date(timestamp * 1000) // 时间戳为10位需*1000，时间戳为13位的话不需乘1000
	var Y = date.getFullYear() + '/'
	var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/'
	var D = date.getDate()
	var H = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
	var MI = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'
	var S = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
	if (type == 1) {
		return Y + M + D
	} else if (type == 2) {
		return {
			data1: Y + M + D,
			data2: H + MI + S
		}
	} else if (type == 3) {
		return M + D
	}
}