11 2021 档案
摘要:// 对象深拷贝 objDeepCopy(source) { let sourceCopy = source instanceof Array ? [] : {}; for (let item in source) { sourceCopy[item] = typeof source[item] '
阅读全文
摘要:// 根据对象值排序 objectSort(myobj) { // 获取属性值并按从大到小排序 let newArray = Object.values(myobj) newArray.splice(10, 1) let result = newArray.sort((a, b) => { retu
阅读全文
摘要:// 获取今天是一年中的第几天 getDay() { const currentYear = new Date().getFullYear().toString(); // 今天减今年的第一天(xxxx年01月01日) const hasTimestamp = new Date() - new Da
阅读全文
摘要:LocalTime() { let date = new Date(); let Y = date.getFullYear(); let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
阅读全文
摘要:# *-* coding:utf-8 *-* import smtplib from email.mime.text import MIMEText from email.header import Header # 第三方 SMTP 服务 mail_host = "smtp.qq.com" # 设
阅读全文