sunshibo 4 дней назад
Родитель
Сommit
ff79a101e6
1 измененных файлов с 15 добавлено и 7 удалено
  1. 15 7
      HBuilderProjects/shareAiConsult.html

+ 15 - 7
HBuilderProjects/shareAiConsult.html

@@ -192,6 +192,7 @@
     }
 
     .fab-dock__slot {
+      position: relative;
       width: 100%;
       max-width: 198px;
       height: 48px;
@@ -229,21 +230,22 @@
 
     #launch-btn {
       display: none;
+      position: absolute;
+      left: 0;
+      top: 0;
+      z-index: 2;
       width: 100%;
       height: 48px;
       min-height: 48px;
       border-radius: 24px;
       overflow: hidden;
       opacity: 1;
+      pointer-events: none;
     }
 
+    /* 开放标签叠在 openApp 上;openApp 始终可见,避免标签未渲染时按钮消失 */
     body.is-wechat.wx-jssdk-ready #launch-btn {
       display: block;
-      pointer-events: auto;
-    }
-
-    body.is-wechat.wx-jssdk-ready #openApp {
-      display: none !important;
     }
 
     .fab-wrap .fab {
@@ -313,8 +315,9 @@
       <!-- 与 secondShareGoods 相同顺序:openApp 在下,launch-btn 在上,避免挡住点击 -->
       <button type="button" class="fab" id="openApp" aria-label="APP内打开">
         <span class="fab__brand-clip" aria-hidden="true">
-          <img class="fab__brand-img" src="images/uCharts.png" alt="" decoding="async">
+          <img class="fab__brand-img" src="images/uBtn.svg" alt="" decoding="async">
         </span>
+        <span class="fab__label">APP内打开</span>
       </button>
       <wx-open-launch-app id="launch-btn" appid="wxf5f1efe3a9f5012e" extinfo="">
         <script type="text/wxtag-template">
@@ -339,6 +342,7 @@
               overflow: hidden;
               -webkit-tap-highlight-color: transparent;
               box-sizing: border-box;
+              pointer-events: auto;
             }
             .wx-open-app-btn .fab__brand-clip {
               display: block;
@@ -362,12 +366,14 @@
           </style>
           <button class="wx-open-app-btn" aria-label="APP内打开">
             <span class="fab__brand-clip" aria-hidden="true">
-              <img class="fab__brand-img" src="https://prod.ailien.shop/h5/HBuilderProjects/images/uCharts.png" alt="" decoding="async">
+              <img class="fab__brand-img" src="https://prod.ailien.shop/h5/HBuilderProjects/images/uBtn.svg" alt="" decoding="async">
             </span>
+            <span class="fab__label">APP内打开</span>
           </button>
         </script>
       </wx-open-launch-app>
     </div>
+    <div class="home-indicator" aria-hidden="true"></div>
   </div>
 
   <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
@@ -1307,6 +1313,7 @@
         }
 
         document.addEventListener("WeixinOpenTagsError", function (e) {
+          document.body.classList.remove("wx-jssdk-ready");
           console.warn("[WeixinOpenTagsError]", e && e.detail);
         });
 
@@ -1318,6 +1325,7 @@
                 showFabToast(
                   wxInitLastError || "微信 SDK 初始化中,请稍候再点底部按钮"
                 );
+                initWeChatOpenLaunchApp(true);
               }
             });
           } else {