v26110902(正式;预览为 v26110901) 小程序里进应用改为打开容器页,「复制链接」直达应用
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user