生日获取属相

get_zodiac: function (birth){

    let y = birth.split('-')[0];

    let ss = y-1960;//设定1960为初始年份 

    let ssc = ss % 12; 

    let ssyear=["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"];

    return ssyear[ssc];

  },

推荐阅读更多精彩内容