|
@@ -182,6 +182,8 @@
|
|
|
box-shadow: 0 4px 16px rgba(255, 107, 62, 0.32);
|
|
box-shadow: 0 4px 16px rgba(255, 107, 62, 0.32);
|
|
|
touch-action: manipulation;
|
|
touch-action: manipulation;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.continue-btn__label {
|
|
.continue-btn__label {
|
|
@@ -195,22 +197,23 @@
|
|
|
|
|
|
|
|
#launch-btn {
|
|
#launch-btn {
|
|
|
display: none;
|
|
display: none;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ top: 0;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: 48px;
|
|
|
|
|
|
|
+ height: 100%;
|
|
|
min-height: 48px;
|
|
min-height: 48px;
|
|
|
border-radius: 999px;
|
|
border-radius: 999px;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
|
|
+ z-index: 2;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /* 底层 continue 按钮始终可见;微信就绪后开放标签叠在上面接收点击 */
|
|
|
body.is-wechat.wx-jssdk-ready #launch-btn {
|
|
body.is-wechat.wx-jssdk-ready #launch-btn {
|
|
|
display: block;
|
|
display: block;
|
|
|
pointer-events: auto;
|
|
pointer-events: auto;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- body.is-wechat.wx-jssdk-ready #btnContinue {
|
|
|
|
|
- display: none !important;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
#openAppToast {
|
|
#openAppToast {
|
|
|
display: none;
|
|
display: none;
|
|
|
position: fixed;
|
|
position: fixed;
|
|
@@ -749,6 +752,10 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ function hideWxLaunchOverlay() {
|
|
|
|
|
+ document.body.classList.remove("wx-jssdk-ready");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function refreshWxLaunchTagAttrs() {
|
|
function refreshWxLaunchTagAttrs() {
|
|
|
var tag = document.getElementById("launch-btn");
|
|
var tag = document.getElementById("launch-btn");
|
|
|
if (!tag) return;
|
|
if (!tag) return;
|
|
@@ -776,6 +783,7 @@
|
|
|
: "";
|
|
: "";
|
|
|
console.warn("[wx-open-launch-app]", detail, "extinfo=", tag.getAttribute("extinfo"));
|
|
console.warn("[wx-open-launch-app]", detail, "extinfo=", tag.getAttribute("extinfo"));
|
|
|
if (/launch:fail/i.test(errMsg)) {
|
|
if (/launch:fail/i.test(errMsg)) {
|
|
|
|
|
+ hideWxLaunchOverlay();
|
|
|
showAppOpenFailTip("未能打开 App,请确认已安装最新版「U店在哪」");
|
|
showAppOpenFailTip("未能打开 App,请确认已安装最新版「U店在哪」");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -942,6 +950,12 @@
|
|
|
|
|
|
|
|
function tryOpenApp() {
|
|
function tryOpenApp() {
|
|
|
if (isWeChatInAppBrowser()) {
|
|
if (isWeChatInAppBrowser()) {
|
|
|
|
|
+ if (weChatJssdkConfigured && !document.body.classList.contains("wx-jssdk-ready")) {
|
|
|
|
|
+ document.body.classList.add("wx-jssdk-ready");
|
|
|
|
|
+ refreshWxLaunchTagAttrs();
|
|
|
|
|
+ showFabToast("请再次点击底部按钮");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (!weChatJssdkConfigured) {
|
|
if (!weChatJssdkConfigured) {
|
|
|
showFabToast("微信 SDK 初始化中,请稍候再点");
|
|
showFabToast("微信 SDK 初始化中,请稍候再点");
|
|
|
initWeChatOpenLaunchApp(true).then(function (ok) {
|
|
initWeChatOpenLaunchApp(true).then(function (ok) {
|
|
@@ -961,7 +975,7 @@
|
|
|
|
|
|
|
|
document.addEventListener("WeixinOpenTagsError", function (e) {
|
|
document.addEventListener("WeixinOpenTagsError", function (e) {
|
|
|
console.warn("[WeixinOpenTagsError]", e && e.detail);
|
|
console.warn("[WeixinOpenTagsError]", e && e.detail);
|
|
|
- document.body.classList.remove("wx-jssdk-ready");
|
|
|
|
|
|
|
+ hideWxLaunchOverlay();
|
|
|
showFabToast("微信开放标签加载失败,请稍候再试");
|
|
showFabToast("微信开放标签加载失败,请稍候再试");
|
|
|
});
|
|
});
|
|
|
|
|
|