Browse Source

修改图片服务器地址

zhangxc 5 years ago
parent
commit
98c2b7da5b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/js/promise.js

+ 2 - 1
src/js/promise.js

@@ -50,7 +50,8 @@ const config = {
     '8':'4,5'
   }
 }
-const imageUrlPrefix = 'http://192.168.2.241:82';
+const isLocal = window.location.hostname.indexOf('localhost') !=-1;
+const imageUrlPrefix = isLocal ?'http://192.168.2.242:82':'http://'+window.location.hostname+':82';
 // const getUrlArgObject = function(parm) {  
 //   var query = decodeURI(window.location.search);
 //   var args = qs.parse(qs.parse(query.substr(1)));