export const getNowDate = function () {
    let nowDate = new Date();
    let year = nowDate.getFullYear();
    let month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1)
        : nowDate.getMonth() + 1;
    let day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate
        .getDate();
    return year + "-" + month + "-" + day
}

// 深拷贝
export const deepClone = (obj) => {
    var objArray = Array.isArray(obj) ? [] : {};
    if (obj && typeof obj === "object") {
        for (let key in obj) {
            if (Object.prototype.hasOwnProperty.call(obj, key)) {
                if (obj[key] && typeof obj[key] === "object") {
                    objArray[key] = deepClone(obj[key]);
                } else {
                    objArray[key] = obj[key];
                }
            }
        }
    }
    return objArray;
}
export const differentArr = function (arr1, arr2) {
    //返回 arr2 在 arr1 没有的元素
    let temparray = []
    arr2.forEach(e => {
        if (arr1.indexOf(e) === -1) {
            temparray.push(e)
        }
    })
    return temparray
}