swiper uc兼容
This commit is contained in:
@@ -14,6 +14,26 @@
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/orico_footer.css" />
|
||||
{block name="style"}{/block}
|
||||
<script type="text/javascript" src='https://code.jquery.com/jquery-3.6.0.min.js'></script>
|
||||
<script>
|
||||
// 增强型 UC 浏览器检测
|
||||
function isUCBrowser() {
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
return ua.includes('ubrowser');
|
||||
}
|
||||
|
||||
// 直接输出对应的 HTML 标签
|
||||
if (isUCBrowser()) {
|
||||
document.write(`
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8.4.7/swiper-bundle.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/swiper@8.4.7/swiper-bundle.min.js"><\/script>
|
||||
`);
|
||||
} else {
|
||||
document.write(`
|
||||
<link rel="stylesheet" href="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.css">
|
||||
<script src="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.js"><\/script>
|
||||
`);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(window).ready(function () {
|
||||
if ($(window).width() < 1024) {
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.js"></script> -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
// banner轮播
|
||||
|
||||
Reference in New Issue
Block a user