33 Star 1 Fork 0

揽月/app-vue3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
zlbIndex.html 3.45 KB
一键复制 编辑 原始数据 按行查看 历史
fangs 提交于 2023-08-01 16:30 . 代码格式化
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'));
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') +
'" />'
);
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
<script src="https://unpkg.com/vconsole@3.14.7/dist/vconsole.min.js"></script>
<script type="text/javascript" src="//assets.zjzwfw.gov.cn/assets/ZWJSBridge/1.1.0/zwjsbridge.js"></script>
<script type="text/javascript" src="//assets.zjzwfw.gov.cn/assets/zwlog/1.0.0/zwlog.js"></script>
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/src/main.ts"></script>
</body>
<script type="text/javascript">
import { user, system } from '@/store';
import util from '@/common/util/util.js';
ZWJSBridge.onReady(() => {
console.log('初始化完成');
});
//popstate
window.addEventListener(
'popstate',
function (event) {
console.log('popstate');
console.log(event);
let browerInfo = system.browerInfo;
if (!browerInfo) {
browerInfo = util.getBrowerInfo();
system.setBrowerInfo(browerInfo);
}
let type = '';
if (browerInfo) {
type = browerInfo.browserType;
}
if (type != 'weixin') {
if (ZWJSBridge) {
try {
ZWJSBridge.close()
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
});
} catch (e) {}
}
}
if (AlipayJSBridge) {
try {
AlipayJSBridge.call('closeWebview');
} catch (e) {
console.log(e);
}
}
},
false
);
window.addEventListener(
'pageshow',
function (event) {
let browerInfo = system.browerInfo;
if (!browerInfo) {
browerInfo = util.getBrowerInfo();
system.setBrowerInfo(browerInfo);
}
let type = '';
if (browerInfo) {
type = browerInfo.browserType;
}
if (event.persisted || (window.performance && window.performance.navigation.type == 2)) {
console.log('window.performance.navigation.type: ' + window.performance.navigation.type);
if (type != 'weixin') {
if (ZWJSBridge) {
try {
ZWJSBridge.close()
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
});
} catch (e) {}
}
}
if (AlipayJSBridge) {
try {
AlipayJSBridge.call('closeWebview');
} catch (e) {
console.log(e);
}
}
}
},
false
);
// VConsole 默认会挂载到 `window.VConsole` 上
//var vConsole = new window.VConsole();
</script>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/yyzh/app-vue3.git
git@gitee.com:yyzh/app-vue3.git
yyzh
app-vue3
app-vue3
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385