|
|
@@ -171,9 +171,9 @@
|
|
|
}
|
|
|
|
|
|
.footer__btn-slot {
|
|
|
- position: relative;
|
|
|
width: 50%;
|
|
|
height: 48px;
|
|
|
+ margin: 0 auto;
|
|
|
}
|
|
|
|
|
|
.continue-btn {
|
|
|
@@ -190,8 +190,6 @@
|
|
|
box-shadow: 0 4px 16px rgba(255, 107, 62, 0.32);
|
|
|
touch-action: manipulation;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
- position: relative;
|
|
|
- z-index: 1;
|
|
|
}
|
|
|
|
|
|
.continue-btn__label {
|
|
|
@@ -205,15 +203,11 @@
|
|
|
|
|
|
#launch-btn {
|
|
|
display: none;
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
width: 100%;
|
|
|
height: 48px;
|
|
|
min-height: 48px;
|
|
|
border-radius: 999px;
|
|
|
overflow: hidden;
|
|
|
- z-index: 2;
|
|
|
}
|
|
|
|
|
|
body.is-wechat.wx-jssdk-ready #launch-btn {
|
|
|
@@ -222,7 +216,7 @@
|
|
|
}
|
|
|
|
|
|
body.is-wechat.wx-jssdk-ready #btnContinue {
|
|
|
- pointer-events: none;
|
|
|
+ display: none !important;
|
|
|
}
|
|
|
|
|
|
#openAppToast {
|
|
|
@@ -531,24 +525,14 @@
|
|
|
refreshWxLaunchTagAttrs();
|
|
|
}
|
|
|
|
|
|
- function buildAiConsultOpenParams() {
|
|
|
- var params = new URLSearchParams();
|
|
|
- params.set("pageType", "home");
|
|
|
- params.set("fromShareAiConsult", "1");
|
|
|
- return params;
|
|
|
- }
|
|
|
-
|
|
|
function buildAppDeepLink() {
|
|
|
- var path = APP_UNI_AI_PATH;
|
|
|
- var qs = buildAiConsultOpenParams().toString();
|
|
|
+ var path = String(APP_UNI_AI_PATH || "pages/aiSearchResult/index").replace(/^\//, "");
|
|
|
var root = APP_IOS_URL_SCHEME.replace(/\/$/, "");
|
|
|
- return root + "/" + path + (qs ? "?" + qs : "");
|
|
|
+ return root + "/" + path;
|
|
|
}
|
|
|
|
|
|
function buildWeChatLaunchExtinfo() {
|
|
|
- var qs = buildAiConsultOpenParams().toString();
|
|
|
- var uniPage = qs ? APP_UNI_AI_PATH + "?" + qs : APP_UNI_AI_PATH;
|
|
|
- return uniPage.length <= 1024 ? uniPage : APP_UNI_AI_PATH + "?pageType=home&fromShareAiConsult=1";
|
|
|
+ return String(APP_UNI_AI_PATH || "pages/aiSearchResult/index").replace(/^\//, "");
|
|
|
}
|
|
|
|
|
|
function isWeChatInAppBrowser() {
|
|
|
@@ -786,6 +770,7 @@
|
|
|
wx.config(wxConfigParams);
|
|
|
wx.ready(function () {
|
|
|
weChatJssdkConfigured = true;
|
|
|
+ document.body.classList.add("wx-jssdk-ready");
|
|
|
refreshWxLaunchTagAttrs();
|
|
|
console.log("[wx.config] ready, htmlUrl=", htmlUrl);
|
|
|
resolve(true);
|
|
|
@@ -815,16 +800,6 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- function resetWxLaunchOverlay() {
|
|
|
- document.body.classList.remove("wx-jssdk-ready");
|
|
|
- }
|
|
|
-
|
|
|
- function enableWxLaunchOverlay() {
|
|
|
- if (weChatJssdkConfigured) {
|
|
|
- document.body.classList.add("wx-jssdk-ready");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
function refreshWxLaunchTagAttrs() {
|
|
|
var tag = document.getElementById("launch-btn");
|
|
|
if (!tag) return;
|
|
|
@@ -852,20 +827,17 @@
|
|
|
: "";
|
|
|
console.warn("[wx-open-launch-app]", detail, "extinfo=", tag.getAttribute("extinfo"));
|
|
|
if (/launch:fail_check/i.test(errMsg)) {
|
|
|
- resetWxLaunchOverlay();
|
|
|
showAppOpenFailTip(
|
|
|
"微信唤起 App 校验失败,请确认开放标签域名与 App 关联配置正确"
|
|
|
);
|
|
|
return;
|
|
|
}
|
|
|
if (/launch:fail/i.test(errMsg)) {
|
|
|
- resetWxLaunchOverlay();
|
|
|
showAppOpenFailTip(
|
|
|
"未能打开 App,请确认已安装最新版「U店在哪」,或从 App 内分享到微信后再打开"
|
|
|
);
|
|
|
return;
|
|
|
}
|
|
|
- resetWxLaunchOverlay();
|
|
|
showAppOpenFailTip(
|
|
|
errMsg
|
|
|
? "未能打开 App:" + errMsg
|
|
|
@@ -1030,16 +1002,9 @@
|
|
|
function tryOpenApp() {
|
|
|
if (isWeChatInAppBrowser()) {
|
|
|
if (!weChatJssdkConfigured) {
|
|
|
- initWeChatOpenLaunchApp(true).then(function (ok) {
|
|
|
- if (!ok) {
|
|
|
- showAppOpenFailTip(wxInitLastError || "微信唤起 App 初始化失败");
|
|
|
- return;
|
|
|
- }
|
|
|
- enableWxLaunchOverlay();
|
|
|
- });
|
|
|
- return;
|
|
|
+ showFabToast(wxInitLastError || "微信 SDK 初始化中,请稍候再点底部按钮");
|
|
|
+ initWeChatOpenLaunchApp(true);
|
|
|
}
|
|
|
- enableWxLaunchOverlay();
|
|
|
return;
|
|
|
}
|
|
|
tryOpenHBuilderAppViaScheme();
|