ip.js 591 B

1234567891011121314151617181920212223
  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. http="http://47.107.129.126:7724/";
  7. console.log(http);
  8. }else{
  9. console.log(http);
  10. }
  11. // 获取访问路径
  12. function convertTemp(){
  13.    var the_url = document.location.toString();
  14.    var first_split = the_url.split("//");
  15.    var without_resource = first_split[1];
  16.    var second_split = without_resource.split("/");
  17.    var domain = second_split[0];
  18. return first_split[0] +'//'+ domain;
  19. }