perf: 下载pdf使用自带浏览器
This commit is contained in:
Submodule resources/mobile updated: 5ffa32bc9e...482bb977d1
@@ -73,6 +73,22 @@
|
||||
if (themeConf === 'dark') {
|
||||
document.body.classList.add("dark");
|
||||
}
|
||||
//
|
||||
const isEEUiApp = window && window.navigator && /eeui/i.test(window.navigator.userAgent);
|
||||
if (isEEUiApp) {
|
||||
document.querySelector(".link").addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
window.top.postMessage({
|
||||
action: "eeuiAppSendMessage",
|
||||
data: [
|
||||
{
|
||||
action: 'openUrl',
|
||||
url: "{{ $url }}",
|
||||
}
|
||||
]
|
||||
}, "*")
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user