function getCookie(name){
  var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
  if (arr = document.cookie.match(reg)) {
    return unescape(arr[2])
  }
}
var cookiea = getCookie("getcookie");
if (cookiea !== "yes") {
  var cookie = document.cookie = "getcookie=yes;path=/;";
  cookiex = "cookie=yes"
} else {
  cookiex = "cookie=no"
}
mydata(cookiex)
async function mydata(c){
  var file, scripts = document.getElementsByTagName("script");
  file = scripts[scripts.length - 1].getAttribute("src");
  var index = file.indexOf("zdmsl_templets")
  var resolve = file.substring(0, index);
  const response = await fetch(resolve + 'zdmsl_dada/pv.php?' + c);
  const dada = await response.json();
  xs("dangqian", dada.dangqian);
  xs("quanju", dada.quanju);
  xs("zongshu", dada.zongshu);
  xs("jinriip", dada.jinriip);
  xs("zuoriip", dada.zuoriip);
  xs("jinrizongshu", dada.jinrizongshu);
  xs("zuorizongshu", dada.zuorizongshu);
  function xs(id, value){
    var s = document.querySelectorAll("#" + id);
    for (var i = 0; i<s.length; i++) {
      s[i].innerHTML = s[i].innerHTML.value = value
    }
  }
}