biz.js 712 Bytes
/**
 * 
 * @param {string} lan 语言
 */
export function gotoVHIS(lan) {
    let url = process.env.VUE_APP_VHIS_INDEX;
    switch (lan) {
        case 'zh':
            url += "?language=zh-cn";
            break;
        case 'en':
            url += "?language=en";
            break;
        default:
            url += "?language=zh-hk";
            break;
    }
    url += "&partnerId=PA001&productCode=VHIS001";
    window.location.href = url;
}


export function getDateYMD(timestamp) {
    let day = new Date(timestamp);
    let y = day.getFullYear();
    let m = day.getMonth() + 1;
    let d = day.getDate();
    let s = y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
    return s;
}