/** * @Author: zhangtq 2452618307@qq.com * @Date: 2024-11-18 13:33:30 * @LastEditors: zhangtq 2452618307@qq.com * @LastEditTime: 2024-11-18 13:36:08 * @FilePath: static/js/core/public.js * @Description: 这是默认设置,可以在设置》工具》File Description中进行配置 */ var dataUrl = "http://192.168.0.59:1938/video/"; $(function() { }) /** * 获取当日时间 */ function getNowTime() { var nowDate = new Date(); var year = nowDate.getFullYear(); var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1; var day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate(); var dateStr = year + "-" + month + "-" + day; return dateStr; } function getNowMonth() { var nowDate = new Date(); var year = nowDate.getFullYear(); var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1; var dateStr = year + "-" + month ; return dateStr; } function isNull(str) { if (str == null) { return ""; } return str; } //判断字符是否为空的方法 function isEmpty(obj) { return typeof obj == "undefined" || obj == null || obj === "" || obj === ''; } function transformation(obj) { if (typeof obj == "undefined" || obj == null || obj === "" || obj === '') { return ""; } else { return obj; } }