jQuery.extend({
  baseUrl: "//xhwebapitest.xhkjedu.com/",
  showImageUrl: "//xhwebstatictest.xhkjedu.com/",
  //毫秒时间转换为yyyy-MM-dd
  msToDateString: function (ms) {
    let date = new Date(ms);
    let year = date.getFullYear();
    let month = date.getMonth() + 1;
    let day = date.getDate();
    if (month < 10) {
      month = "0" + month;
    }
    if (day < 10) {
      day = "0" + day;
    }
    return year + "-" + month + "-" + day;
  },
  // 读取url参数
  getQueryVariable: function (variable) {
    let query = window.location.search.substring(1);
    query = decodeURI(query);
    let vars = query.split("&");
    for (let i = 0; i < vars.length; i++) {
      let pair = vars[i].split("=");
      if (pair[0] === variable) {
        return pair[1];
      }
    }
    return false;
  }
});
