处理分享页面地址用http,接口用https

This commit is contained in:
尹吉欢
2018-05-30 14:56:08 +08:00
parent 16ec13a7f8
commit 3f67fb146e
11 changed files with 25 additions and 10 deletions
+14
View File
@@ -1057,3 +1057,17 @@ document.addEventListener('DOMContentLoaded', function() {
}, false);
}());
String.prototype.startWith=function(str){
var reg=new RegExp("^"+str);
return reg.test(this);
}
function getShareDomain(path) {
if(path.startWith("https")){
return "http://youfang.fangjia.com";
} else {
return path;
}
}