浏览代码

Merge branch 'dev4.6.2.6' of http://192.168.3.207:8080/qmx/jy into dev4.6.2.6

zhangxinlei1996 3 年之前
父节点
当前提交
e30dda9f47

+ 26 - 19
src/jfw/modules/app/src/web/templates/frontRouter/share/sess/index.html

@@ -87,8 +87,8 @@
                   >
                 </div>
                 <div class="mg">
-                  <p class="user-name-text">千落</p>
-                  <span class="time list-right">2021-12-12 09:36:23</span>
+                  <p class="user-name-text"></p>
+                  <span class="time list-right"></span>
                 </div>
               </li>
             </ul>
@@ -146,7 +146,7 @@
               alt=""
             >
             <div class="name user-info-box">
-              <p id="userName">王憨憨爱修仙</p>
+              <p id="userName"></p>
               <span>送你7天超级订阅!</span>
             </div>
             <div class="wx">
@@ -168,6 +168,13 @@
   {{include "/big-member/commonjs.html"}}
   <!-- <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/area-pack/js/buy.js?v={{Msg "seo" "version"}}'></script> -->
   <!--E-当前页面的资源-->
+  <script>
+    // 模板变量格式
+    var templateVars = {
+      type: {{ session "i_type" }},
+      nickname: {{ session "s_nickname" }}
+    }
+  </script>
   <script type="text/javascript">
     // 动态插入分享标签
     $(".header-right").addClass('show-share')
@@ -265,24 +272,24 @@
     function execShare(thisIndex) {
       var shareType = thisIndex + 1;
       var content = "您的好友";
-      if (shareType != 2 && {{session "i_type" }} == 2) {
-        content += {{session "s_nickname" }};
+      if (shareType != 2 && templateVars.type == 2) {
+        content += templateVars.nickname
       }
-    content += "向您推荐了剑鱼标讯";
-    var link = shareLink + '?source=app_infocontentshare';
-    var shareTitle = "邀好友,免费获得超级订阅";
-    shareTitle = shareTitle.replace(/<\/?.+?>/g, "");
-    shareTitle = shareTitle.replace(/ /g, "");
-    if (shareType == 3) {
-      if (forceShareFlag) {
-        link += "&qrcodeType=app_infocontent_timeline_b";
-      } else {
-        link += "&qrcodeType=app_infocontent_timeline_z";
+      content += "向您推荐了剑鱼标讯";
+      var link = shareLink + '?source=app_infocontentshare';
+      var shareTitle = "邀好友,免费获得超级订阅";
+      shareTitle = shareTitle.replace(/<\/?.+?>/g, "");
+      shareTitle = shareTitle.replace(/ /g, "");
+      if (shareType == 3) {
+        if (forceShareFlag) {
+          link += "&qrcodeType=app_infocontent_timeline_b";
+        } else {
+          link += "&qrcodeType=app_infocontent_timeline_z";
+        }
+        shareTitle = getShareText();
+        updateShareStatus();
       }
-      shareTitle = getShareText();
-      updateShareStatus();
-    }
-    JyObj.share(shareType, shareTitle, content, link);
+      JyObj.share(shareType, shareTitle, content, link);
     }
     function updateShareStatus() {
       var shareProperty = forceShareFlag ? 1 : 2;//1-被动分享 2-主动分享

+ 3 - 5
src/web/templates/frontRouter/pc/share/sess/index.html

@@ -127,7 +127,7 @@
                                         alt=""
                                     />
                                     <div class="right-bottom-zj">
-                                        <p id="userName">千落</p>
+                                        <p id="userName"></p>
                                         <span>送你七天超级订阅!</span>
                                     </div>
                                 </div>
@@ -176,11 +176,9 @@
                                     src=""
                                     alt=""
                                 />
-                                <p class="user-name-text">
-                                    一个没有感情的杀手一个没有感情的杀手一个没有感情的杀手
-                                </p>
+                                <p class="user-name-text"></p>
                             </div>
-                            <div class="list-right">2021-12-12 09:36:23</div>
+                            <div class="list-right"></div>
                         </li>
                     </ul>
                     <div class="list-3"><span>没有更多邀请记录</span></div>

+ 14 - 14
src/web/templates/frontRouter/wx/share/sess/index.html

@@ -76,8 +76,8 @@
                   alt=""
                 >
                 <div class="mg">
-                  <p class="user-name-text">千落</p>
-                  <span class="time">2021-12-12 09:36:23</span>
+                  <p class="user-name-text"></p>
+                  <span class="time"></span>
                 </div>
               </li>
             </ul>
@@ -135,7 +135,7 @@
               alt=""
             >
             <div class="name">
-              <p id="userName">王憨憨爱修仙</p>
+              <p id="userName"></p>
               <span>送你7天超级订阅!</span>
             </div>
             <div class="wx">
@@ -162,7 +162,7 @@
     // $('.header-right').html('<span class="j-icon icon-share"></span>').on('click', function () { console.log(123) })
     // // 点击弹出遮盖层
     $(document).ready(function () {
-      function showDialog () {
+      function showDialog() {
         $(".fadeOutDown").removeClass('fadeOutDown').addClass('fadeInUp')
         $(".tc").fadeIn("slow")
       }
@@ -208,7 +208,7 @@
         if (res && res.data) {
           // $('#share-link').text(res.data.shareLink)
           $("img[name='qCode']").attr('src', 'data:image/png;base64,' + res.data.erUrl)
-          shareLink=res.data.shareLink;
+          shareLink = res.data.shareLink;
         }
       }
     })
@@ -218,22 +218,22 @@
       success: function (res) {
         if (res) {
           $("#userName").text(res.nickName)
-          if(res.headImage==""){
-            res.headImage="/images/auto.png"
+          if (res.headImage == "") {
+            res.headImage = "/images/auto.png"
           }
           $("img[name='userHead']").attr('src', res.headImage)
-    }
+        }
       }
     })
 
 
     $(function () {
-    $('.list-left img').each(function () {
-      if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
-        this.src = '/images/auto.png';
-      }
-    });
+      $('.list-left img').each(function () {
+        if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
+          this.src = '/images/auto.png';
+        }
       });
+    });
     // 点击遮盖层消失
     $(".tc").on('click', function () {
       if ($(this).hasClass('tc')) {
@@ -245,4 +245,4 @@
   </script>
 </body>
 
-</html>
+</html>