wangshan 6 жил өмнө
parent
commit
329b5023e8

+ 16 - 3
src/web/templates/pc/biddetail.html

@@ -209,6 +209,15 @@ $(function(){
 	$(".logo img").attr("src","/images/swordfish/sf_01_new.png");
 	selcetIndexNav(8)
 })
+//
+function isWechat() {
+    var ua = navigator.userAgent.toLowerCase();
+    if(ua.match(/MicroMessenger/i)=="micromessenger"){
+        return true;
+    }else{
+        return false;
+    }
+}
 </script>
 
 <div class="j-content{{if .T.isForceShare}} limitshare{{end}}">
@@ -626,9 +635,13 @@ $(function(){
 	$(".com-original").attr("href",originalUrl);
 	$(".com-original").click(function(event){
 		event.preventDefault();
-		var url =document.location.protocol+"//"+ window.location.host+"/front/transfer?url="+encodeURIComponent($(this).attr("href"))
-		window.open('javascript:window.name', '<script>location.replace("'+url+'")<\/script>');
-		//window.location.href = '/front/transfer?url='+encodeURIComponent($(this).attr("href"));
+		var myhref = window.location.href;
+		if (myhref.indexOf("mailprivate")>0||isWechat()){
+			window.location.href = '/front/transfer?url='+encodeURIComponent($(this).attr("href"));
+		}else{
+			var url =document.location.protocol+"//"+ window.location.host+"/front/transfer?url="+encodeURIComponent($(this).attr("href"))
+			window.open('javascript:window.name', '<script>location.replace("'+url+'")<\/script>');
+		}
 	});
 	
 	//var sds = {{.T.keywords}};

+ 15 - 3
src/web/templates/pc/biddetail_rec.html

@@ -202,6 +202,15 @@ $(function(){
 	$(".logo img").attr("src","{{Msg "seo" "cdn"}}/images/swordfish/sf_01_new.png");
 	selcetIndexNav(8)
 })
+//
+function isWechat() {
+    var ua = navigator.userAgent.toLowerCase();
+    if(ua.match(/MicroMessenger/i)=="micromessenger"){
+        return true;
+    }else{
+        return false;
+    }
+}
 </script>
 <div class="j-content">
 <div class="main-content" style="width: 1200px; position: relative; margin: 0 auto">
@@ -1190,9 +1199,12 @@ $(function(){
 	$(".com-original").attr("href",originalUrl);
 	$(".com-original").click(function(event){
 		event.preventDefault();
-		var url =document.location.protocol+"//"+ window.location.host+"/front/transfer?url="+encodeURIComponent($(this).attr("href"))
-		window.open('javascript:window.name', '<script>location.replace("'+url+'")<\/script>');
-		//window.location.href = '/front/transfer?url='+encodeURIComponent($(this).attr("href"));
+		var myhref = window.location.href;
+		if (myhref.indexOf("mailprivate")>0||isWechat()){
+			window.location.href = '/front/transfer?url='+encodeURIComponent($(this).attr("href"));
+		}else{
+			var url =document.location.protocol+"//"+ window.location.host+"/front/transfer?url="+encodeURIComponent($(this).attr("href"))
+			window.open('javascript:window.name', '<script>location.replace("'+url+'")<\/script>');
 	});
 	
 	//var sds = {{.T.keywords}};