前端优化
This commit is contained in:
@@ -26,6 +26,20 @@
|
||||
<script>
|
||||
const strPcPath = `{$strPcPath}`;
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
var bp = document.createElement('script');
|
||||
var curProtocol = window.location.protocol.split(':')[0];
|
||||
if (curProtocol === 'https') {
|
||||
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
|
||||
}
|
||||
else {
|
||||
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
|
||||
}
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(bp, s);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="{block name='body-class'}{/block}" id="{block name='body-id'}{/block}">
|
||||
|
||||
@@ -20,6 +20,20 @@
|
||||
<script>
|
||||
const strPcPath = `{$strPcPath}`;
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
var bp = document.createElement('script');
|
||||
var curProtocol = window.location.protocol.split(':')[0];
|
||||
if (curProtocol === 'https') {
|
||||
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
|
||||
}
|
||||
else {
|
||||
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
|
||||
}
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(bp, s);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<!-- 接收子模板传递的 active_nav -->
|
||||
|
||||
Reference in New Issue
Block a user