/**
 * @export 获取ip:搜狐接口
 * @param {*} callback 优雅的跨域处理方式
 */
export function getIP() {
  // 返回值：var returnCitySN = {"cip": "124.79.25.204", "cid": "310101", "cname": "上海市黄浦区"};
  const script = document.createElement("script");
  script.setAttribute("type", "text/javascript");
  script.setAttribute("src", "https://pv.sohu.com/cityjson?ie=utf-8");
  document.body.appendChild(script);
  script.onload = function() {
    // eslint-disable-next-line no-undef
    return Promise.resolve(returnCitySN);
  };
}
