var config = {
  "blogRequestHost": "http://blogScript.5tangs.com"
}

/**
 * getPath
 * @returns {string}
 */
function getPath() {
  var pathname = location.pathname || '';
  if (pathname.slice(-1) === '/') {
      pathname.slice(0, -1);
  }
  var list = pathname.split('/');
  return list[list.length-1] || '';
}

function recordView() {
  var name = getPath();

  // var request = config["blogRequestHost"] + "/view_article?aid" + aid;
  $.ajax({
    "type": "GET",
    "url": config["blogRequestHost"] + "/view_article?",
    "data": {
      "name": name
    },
    "dataType": "json",
    "error": function (data) {
      console.log(data);
    },
    "success": function (data) {
    }
  })
}