新增加载时间监听

This commit is contained in:
Dragon
2024-01-12 17:37:20 +08:00
parent c366781143
commit 8bc5a919a9
2 changed files with 11 additions and 3 deletions

View File

@@ -100,7 +100,7 @@
<script src="http://static.lkme.cc/linkedme.min.js"></script>
<script src="./js/utf.js"></script>
<script src="./js/swiper.min.js"></script>
<script src="./js/index.js?v=2.2"></script>
<script src="./js/index.js?v=2.3"></script>
</body>
</html>

View File

@@ -24,7 +24,6 @@ const channelDict = {
// 'baomihua01': 'https://image.lecheng163.com/accompany_release_v_213_1_baomihua01_sign.apk'
}
$(function () {
//判断url参数是否是与渠道包名一致
let androidUrl = null;
channelDict.hasOwnProperty(channelData) ? androidUrl = channelDict[channelData] : androidUrl = 'https://play.google.com/store/apps/details?id=com.vele.pekolive';
@@ -119,3 +118,12 @@ $(function () {
window.location.href = 'https://img.pekolive.com/piko_official.apk'
})
})
// 定义变量存储开始时间
var startTime = new Date().getTime();
// 添加 window.onload 事件处理函数
window.addEventListener('load', function() {
// 计算结束时间并输出耗时(单位为毫秒)
var endTime = new Date().getTime();
console.log("页面加载完成所需时间:" + (endTime - startTime) + "ms");
});