ip.js 545 B

12345678910111213141516171819
  1. var line=5; //分页的条数
  2. var http = convertTemp()+ "/";
  3. if( http.indexOf("zositech")==-1 ){
  4. http="http://192.168.136.39:8000/";
  5. // http="http://www.zositech.xyz:7724/";
  6. console.log(http);
  7. }else{
  8. console.log(http);
  9. }
  10. // 获取访问路径
  11. function convertTemp(){
  12.    var the_url = document.location.toString();
  13.    var first_split = the_url.split("//");
  14.    var without_resource = first_split[1];
  15.    var second_split = without_resource.split("/");
  16.    var domain = second_split[0];
  17. return first_split[0] +'//'+ domain;
  18. }