Browse Source

feat: 优化底部QQ分享 引用CDN路径问题

zhangyuhan 4 years ago
parent
commit
ed6779f3cd

File diff suppressed because it is too large
+ 0 - 0
src/web/staticres/js/bdshare.js


+ 11 - 7
src/web/templates/common/pcbottom.html

@@ -71,11 +71,11 @@
                             </li>
                             <li>
                                 <span><a href="https://cdn-ali2.jianyu360.com/jyinstallpkg/pc/JianYu_for_Windows.exe?source=pc_index"></a></span>
-                                
+
                             </li>
                             <li>
                                 <span><a href="https://cdn-ali2.jianyu360.com/jyinstallpkg/pc/JianYu_for_Mac.dmg?source=pc_index"></a></span>
-                                
+
                             </li>
                             <li>
                                 <span></span>
@@ -114,7 +114,8 @@
     {{$s:=(Ad "jy-pc-index-friendlink" -1)}}
     {{range $t,$v := $s}}
     var data = {{$v}}
-    
+
+
     link_str += "<li><a href=\"" + data.s_link + "\" target=\"_blank\" ><img src=\"" + data.s_pic + "\" alt=\"\" /></a></li>";
     {{end}}
     $(".jy_friendlink_content ul").html(link_str)
@@ -130,8 +131,11 @@
 	this.flag = false;
 	var thisCla = this;
 		if(!thisCla.flag){
-			loadJS("/js/bdshare.js?v=89860593.js?cdnversion="+~(-new Date()/36e5),function(){
-			});
+            if (!window.JyGlobalConfig) {
+              window.JyGlobalConfig = {}
+            }
+            window.JyGlobalConfig.SEO_CDN = {{Msg "seo" "cdn"}}
+			loadJS(window.JyGlobalConfig.SEO_CDN + "/js/bdshare.js?v=20210521.js?cdnversion="+~(-new Date()/36e5),function(){});
 			$("#share-sqq").click(function(e){
 				document.getElementById('bds_sqq').click();
 			});
@@ -351,7 +355,7 @@ new pcShare()
         height: 148px;
         background: #ffffff;
         border-radius: 8px;
-        box-shadow: 0px 0px 28px 0px rgba(0,0,0,0.16); 
+        box-shadow: 0px 0px 28px 0px rgba(0,0,0,0.16);
     }
     .right-side-box .right-side-wx .slidePop::before{
         content:'';
@@ -363,7 +367,7 @@ new pcShare()
         height: 0;
         border-top: 6px solid transparent;
         border-left: 8px solid #fff;
-        box-shadow: 0px 0px 28px 0px rgba(0,0,0,0.16); 
+        box-shadow: 0px 0px 28px 0px rgba(0,0,0,0.16);
         border-bottom: 6px solid transparent;
     }
     .right-side-box .right-side-wx .slidePop img{

+ 14 - 10
src/web/templates/frontRouter/pc/squeeze/sess/test.html

@@ -153,7 +153,7 @@
           </div>
         </div>
       </div>
-      
+
       <!-- 剑鱼区域链接 -->
       <div class="nav-tab jy-area">
         <div class="tab-header">
@@ -166,15 +166,15 @@
            <div class="tab-content-area">
              <ul>
              </ul>
-           </div> 
+           </div>
            <div class="tab-content-area">
             <ul>
             </ul>
-          </div> 
+          </div>
           <div class="tab-content-area">
             <ul>
             </ul>
-          </div> 
+          </div>
         </div>
       </div>
 
@@ -271,7 +271,7 @@
               <script>
                 // var  data= {{.T.blog}}
                 // console.log('----data----',data);
-                
+
 
               </script>
 
@@ -279,7 +279,7 @@
 
               {{end}}
             </ul>
-            
+
          </div>
       </div>
 
@@ -405,7 +405,7 @@
       {{include "/common/pcbottom.html"}}
 
 
-			
+
 
 		</section>
 		<script type="text/javascript" src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}'></script>
@@ -426,7 +426,7 @@
         <img src="{{Msg "seo" "cdn"}}/images/pc/live_preheat_close.png" class="live_preheat_close"/>
       </div>
     </div>
-	
+
 	</body>
 <script>
 $(function () {
@@ -495,7 +495,7 @@ var str_projectList = ""
 {{range $t,$v := $s}}
   var data = {{$v}}
   str_projectList += "<li><a href=\"" + data.s_link + "\"><img src=\"" + data.s_pic + "\" alt=\"\" /><p>" + data.s_picalt + "</p></a></li>";
-        
+
 {{end}}
 $(".projectList ul").html(str_projectList)
 
@@ -635,7 +635,11 @@ function pcShare(){
 	this.flag = false;
 	var thisCla = this;
 		if(!thisCla.flag){
-			loadJS("/js/bdshare.js?v=89860593.js?cdnversion="+~(-new Date()/36e5),function(){
+          if (!window.JyGlobalConfig) {
+            window.JyGlobalConfig = {}
+          }
+          window.JyGlobalConfig.SEO_CDN = {{Msg "seo" "cdn"}}
+			loadJS(window.JyGlobalConfig.SEO_CDN + "/js/bdshare.js?v=20210521.js?cdnversion="+~(-new Date()/36e5),function(){
 			});
 			$("#share-sqq").click(function(e){
 				document.getElementById('bds_sqq').click();

+ 47 - 43
src/web/templates/pc/index.html

@@ -148,7 +148,7 @@
       </div>
 
       <script>
-        
+
 
 
       </script>
@@ -160,7 +160,7 @@
             <div class="carousel-inner" role="listbox">
             </div>
             <ol class="carousel-indicators">
-						</ol> 
+						</ol>
           </div>
         </div>
         <div class="jy-banner-r">
@@ -169,11 +169,11 @@
 
             </div>
             <ol class="carousel-indicators">
-						</ol> 
+						</ol>
           </div>
         </div>
       </div>
-      
+
       <!-- 剑鱼区域链接 -->
       <div class="nav-tab jy-area">
         <div class="tab-header">
@@ -193,7 +193,7 @@
                           {{if eq $yi 0}}<a href="{{$xi.url}}" target="_blank">{{ $xi.city }}</a>{{end}}
                         {{end}}
                       {{end}}
-                      
+
                   {{end}}
                 {{end}}
               </li>
@@ -207,15 +207,15 @@
                                   {{else}}
                                         <span><a href="{{$xi.url}}" target="_blank">{{$xi.city}}</a></span>
                                   {{end}}
-                                
+
                               {{end}}
                             </div></li>
                           {{end}}
                       {{end}}
                 {{end}}
-  
+
              </ul>
-           </div> 
+           </div>
            <div class="tab-content-area">
             <ul>
               {{range $i, $v := .T.labUrl_2}}
@@ -231,9 +231,9 @@
                 {{end}}
               </div></li>
               {{end}}
-              
+
             </ul>
-          </div> 
+          </div>
           <div class="tab-content-area">
             <ul>
               {{range $i, $v := .T.labUrl_3}}
@@ -246,9 +246,9 @@
                   {{end}}
                 </div></li>
               {{end}}
-              
+
             </ul>
-          </div> 
+          </div>
         </div>
       </div>
 
@@ -265,7 +265,7 @@
          <div class="newNotice-content">
             <div class="tab-content-list" style="display: block;">
               <ul>
-                {{range $i, $v := .T.newArticle_1}} 
+                {{range $i, $v := .T.newArticle_1}}
                  <li><a href=" /article/indexcontent/{{$v._id}}.html" target="_blank">
                   <p>{{$v.title}}</p>
                   <div>
@@ -274,14 +274,14 @@
                     {{if $v.area}}<span>{{$v.area}}</span>{{end}}
                     {{if $v.budget}} <span>{{$v.budget}}</span>{{end}}
                     <strong >{{$v.publishtime}}</strong>
-                  </div></a></li> 
-                {{end}} 
+                  </div></a></li>
+                {{end}}
 
               </ul>
             </div>
             <div class="tab-content-list">
               <ul>
-                {{range $i, $v := .T.newArticle_2}} 
+                {{range $i, $v := .T.newArticle_2}}
                  <li><a href=" /article/indexcontent/{{$v._id}}.html" target="_blank">
                   <p>{{$v.title}}</p>
                   <div>
@@ -290,13 +290,13 @@
                     {{if $v.industry}}<span>{{$v.industry}}</span>{{end}}
                     {{if $v.budget}} <span>{{$v.budget}}</span>{{end}}
                     <strong >{{$v.publishtime}}</strong>
-                  </div></a></li> 
-                {{end}} 
+                  </div></a></li>
+                {{end}}
               </ul>
             </div>
             <div class="tab-content-list">
               <ul>
-                {{range $i, $v := .T.newArticle_3}} 
+                {{range $i, $v := .T.newArticle_3}}
                  <li><a href=" /article/indexcontent/{{$v._id}}.html" target="_blank">
                   <p>{{$v.title}}</p>
                   <div>
@@ -305,13 +305,13 @@
                     {{if $v.industry}}<span>{{$v.industry}}</span>{{end}}
                     {{if $v.budget}} <span>{{$v.budget}}</span>{{end}}
                     <strong >{{$v.publishtime}}</strong>
-                  </div></a></li> 
-                {{end}} 
+                  </div></a></li>
+                {{end}}
               </ul>
             </div>
             <div class="tab-content-list">
               <ul>
-                {{range $i, $v := .T.newArticle_4}} 
+                {{range $i, $v := .T.newArticle_4}}
                  <li><a href=" /article/indexcontent/{{$v._id}}.html" target="_blank">
                   <p>{{$v.title}}</p>
                   <div>
@@ -320,8 +320,8 @@
                     {{if $v.industry}}<span>{{$v.industry}}</span>{{end}}
                     {{if $v.budget}} <span>{{$v.budget}}</span>{{end}}
                     <strong >{{$v.publishtime}}</strong>
-                  </div></a></li> 
-                {{end}} 
+                  </div></a></li>
+                {{end}}
               </ul>
             </div>
          </div>
@@ -372,7 +372,7 @@
                 {{end}}
               </li>
             </ul>
-            
+
          </div>
       </div>
 
@@ -418,9 +418,9 @@
                   <p>剑鱼标讯成功为用户推送了信息</p>
                   <strong><mark id="flip-number-3">{{.T.infoNum.i_bidtoday}} </mark><i>条</i></strong>
                 </li>
-            
+
            </ul>
-           
+
         </div>
       </div>
 
@@ -515,7 +515,7 @@
       {{include "/common/pcbottom.html"}}
 
 
-			
+
 
 		</section>
 		<script type="text/javascript" src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}'></script>
@@ -563,14 +563,14 @@
               if (!numberBox.attr('data-show-an')) {
                   numberBox.attr('data-show-an','true')
                   filpNumber()
-                 
+
               }
           } else {
-              numberBox.removeAttr('data-show-an') 
+              numberBox.removeAttr('data-show-an')
           }
       }
-      
-      
+
+
       $(window).scroll(windowScrollFn)
     </script>
     <!-- 弹窗 -->
@@ -587,7 +587,7 @@
         <img src="{{Msg "seo" "cdn"}}/images/pc/live_preheat_close.png" class="live_preheat_close"/>
       </div>
     </div>
-	
+
 	</body>
 <script>
 $(function () {
@@ -682,7 +682,7 @@ var str_projectList = ""
 {{range $t,$v := $s}}
   var data = {{$v}}
   str_projectList += "<li><a href=\"" + data.s_link + "\"><span><img src=\"" + data.s_pic + "\" alt=\"\" /></span><p>" + data.s_remark + "</p></a></li>";
-        
+
 {{end}}
 $(".projectList ul").html(str_projectList)
 var timer=null,timer1 = null
@@ -754,7 +754,7 @@ var str_left_img = "",str_left_ = "",left_img_index = -1;
     if (etArr.length==6){
       var etStr = etArr[0]+"-"+etArr[1]+"-"+etArr[2]+" "+etArr[3]+":"+etArr[4]+":"+etArr[5]
       etTime = new Date(etStr).getTime();
-      
+
     }
   }
   if(nowTime>stTime && etTime>nowTime){
@@ -765,15 +765,15 @@ var str_left_img = "",str_left_ = "",left_img_index = -1;
     }else{
       str_left_img  += `<div class="item">`
       str_left_ += `<li  data-target="#slidershow" data-slide-to="${left_img_index}"></li>`
-    }  
+    }
     if(left_img.s_link){
       str_left_img += `<a href="${left_img.s_link}"><img src="${left_img.s_pic}" alt="..."></a>
                   </div>`
     }else{
       str_left_img += `<span><img src="${left_img.s_pic}" alt="..."></span>
                   </div>`
-    } 
-  }      
+    }
+  }
 {{end}}
 console.log('----str_left_img----',str_left_img);
 
@@ -797,10 +797,10 @@ var stTime = nowTime -1000,etTime = nowTime + 1000
     if (etArr.length==6){
       var etStr = etArr[0]+"-"+etArr[1]+"-"+etArr[2]+" "+etArr[3]+":"+etArr[4]+":"+etArr[5]
       etTime = new Date(etStr).getTime();
-      
+
     }
   }
-  
+
   if(nowTime>stTime && etTime>nowTime){
     right_img_index += 1
     if(right_img_index == 0){
@@ -818,7 +818,7 @@ var stTime = nowTime -1000,etTime = nowTime + 1000
                 </div>`
   }
   }
-  
+
 {{end}}
 $(".jy-banner-r .carousel-inner").html(str_right_img)
 $(".jy-banner-r  .carousel-indicators").html(str_right_)
@@ -835,7 +835,7 @@ $('.carousel-one').carousel({
 
 //最新公告信息
 $(".newNotice .newNotice-header span").on('click', function () {
-  
+
   $(".newNotice .newNotice-header span").removeClass('active')
   $(this).addClass('active')
   let i = $(this).index();
@@ -923,7 +923,11 @@ function pcShare(){
 	this.flag = false;
 	var thisCla = this;
 		if(!thisCla.flag){
-			loadJS("/js/bdshare.js?v=89860593.js?cdnversion="+~(-new Date()/36e5),function(){
+          if (!window.JyGlobalConfig) {
+            window.JyGlobalConfig = {}
+          }
+          window.JyGlobalConfig.SEO_CDN = {{Msg "seo" "cdn"}}
+			loadJS(window.JyGlobalConfig.SEO_CDN + "/js/bdshare.js?v=20210521.js?cdnversion="+~(-new Date()/36e5),function(){
 			});
 			$("#share-sqq").click(function(e){
 				document.getElementById('bds_sqq').click();

+ 5 - 1
src/web/templates/pc/jyblogdetail.html

@@ -236,7 +236,11 @@ function pcShare(){
 			//
 			if(!thisCla.flag){
 				$("#pcShare-content").after('<div class="bdsharebuttonbox"><a href="#" id="bds_weixin" data-cmd="weixin" title="分享到微信">微信扫码</a><a href="#" id="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博"</a><a href="#" id="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a><a href="#" id="bds_qzone" data-cmd="sqq" title="分享到QQ空间">QQ空间</a></div>');
-				loadJS("/js/bdshare.js?v=89860593.js?cdnversion="+~(-new Date()/36e5),function(){
+              if (!window.JyGlobalConfig) {
+                window.JyGlobalConfig = {}
+              }
+              window.JyGlobalConfig.SEO_CDN = {{Msg "seo" "cdn"}}
+				loadJS(window.JyGlobalConfig.SEO_CDN + "/js/bdshare.js?v=20210521.js?cdnversion="+~(-new Date()/36e5),function(){
 					var interval = setInterval(function(){
 						if($("#bdshare_weixin_qrcode_dialog").length == 1){
 							clearInterval(interval);

Some files were not shown because too many files changed in this diff