v26110902(正式;预览为 v26110901) 小程序里进应用改为打开容器页,「复制链接」直达应用

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-09 13:53:47 +00:00
parent c043262df1
commit 06edf9de62
4 changed files with 50 additions and 5 deletions

View File

@@ -105,6 +105,16 @@
}
if (window.wxAuth && wxAuth.reportLocation) wxAuth.reportLocation({ href: target });
} catch (e) {}
/* 11-09:小程序里开容器页,「复制链接」才能直达这个应用(同 js/app.js openInHost,url 只放净地址) */
var mp = window.wx && window.wx.miniProgram;
if ((window.__wxjs_environment === 'miniprogram' || /miniProgram/i.test(navigator.userAgent)) && mp && typeof mp.navigateTo === 'function') {
try {
var c = new URL(url, location.origin);
['openid', 'unionid', '__no_identity', 'return_url'].forEach(function (k) { c.searchParams.delete(k); });
mp.navigateTo({ url: '/pages/annex/web_view/index?url=' + encodeURIComponent(c.href), fail: function () { location.href = target; } });
return;
} catch (e) {}
}
location.href = target;
}
var tt;