export function mediaMatches() {
  let sqls = [
    window.matchMedia("(max-width:415px)"), //和CSS一样，也要注意顺序！
    window.matchMedia("(max-width:767px)"),
    window.matchMedia("(max-width:1024px)"),
    window.matchMedia("(max-width:1200px)")
  ];
  if (sqls[0].matches) {
    console.log("415"); // do something...
    // document.documentElement.style.fontSize = 30 + "px";
    document.documentElement.style.setProperty("font-size",30 + "px","important");
  } else if (sqls[1].matches) {
    console.log(">415 & <=767"); // do something...
    // document.documentElement.style.fontSize = 40 + "px";
    document.documentElement.style.setProperty("font-size",40 + "px","important");
  } else if (sqls[3].matches) {
    console.log("> 767 & <=1024"); // do something...
    // document.documentElement.style.fontSize = 50 + "px";
    document.documentElement.style.setProperty("font-size",50 + "px","important");
  } else {
    console.log(">1200");
  }
}
