This commit is contained in:
@@ -967,6 +967,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 回到顶部按钮特殊样式 */
|
||||||
|
.aside-tools .tools-list .tools-item.back-top {
|
||||||
|
cursor: pointer;
|
||||||
|
background: rgba(56, 189, 248, 0.15);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aside-tools .tools-list .tools-item.back-top:hover {
|
||||||
|
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%);
|
||||||
|
box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.aside-tools .tools-list .tools-item.back-top img {
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aside-tools .tools-list .tools-item.back-top:hover img {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.flex-none {
|
.flex-none {
|
||||||
flex-wrap: none !important;
|
flex-wrap: none !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,21 +105,21 @@ $(function () {
|
|||||||
$(".login-in").attr("style", "display:none");
|
$(".login-in").attr("style", "display:none");
|
||||||
$(".no-login").attr("style", "display:block");
|
$(".no-login").attr("style", "display:block");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 设置通用信息相关的点击跳转(云服务器/物理机 CTA 等),来源于 SSR 注入的 window.__themeCommon
|
// 设置通用信息相关的点击跳转(云服务器/物理机 CTA 等),来源于 SSR 注入的 window.__themeCommon
|
||||||
const setCommData = () => {
|
const setCommData = () => {
|
||||||
const commentObj = window.__themeCommon || {};
|
const commentObj = window.__themeCommon || {};
|
||||||
$(".buy-cloud").click(function () {
|
$(".buy-cloud").click(function () {
|
||||||
if (commentObj.cloud_product_link) {
|
if (commentObj.cloud_product_link) {
|
||||||
location.href = commentObj.cloud_product_link;
|
location.href = commentObj.cloud_product_link;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(".buy-dcim-btn").click(function () {
|
$(".buy-dcim-btn").click(function () {
|
||||||
if (commentObj.dcim_product_link) {
|
if (commentObj.dcim_product_link) {
|
||||||
location.href = commentObj.dcim_product_link;
|
location.href = commentObj.dcim_product_link;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 跳转函数
|
// 跳转函数
|
||||||
const goOtherPage = (url) => {
|
const goOtherPage = (url) => {
|
||||||
sessionStorage.redirectUrl = location.href;
|
sessionStorage.redirectUrl = location.href;
|
||||||
@@ -221,11 +221,11 @@ $(function () {
|
|||||||
$("#shopping-cart").click(function () {
|
$("#shopping-cart").click(function () {
|
||||||
location.href = "/cart/shoppingCar.htm";
|
location.href = "/cart/shoppingCar.htm";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function initFooter() {
|
function initFooter() {
|
||||||
// 主题配置已在服务端渲染阶段注入到 window.__themeCommon,这里只做少量点击事件绑定
|
// 主题配置已在服务端渲染阶段注入到 window.__themeCommon,这里只做少量点击事件绑定
|
||||||
setCommData();
|
setCommData();
|
||||||
}
|
}
|
||||||
// 首页渲染
|
// 首页渲染
|
||||||
// $("#header").load("/web/BlackFruit-web/public/header.html", function () {
|
// $("#header").load("/web/BlackFruit-web/public/header.html", function () {
|
||||||
// initHeader();
|
// initHeader();
|
||||||
@@ -237,26 +237,26 @@ $(function () {
|
|||||||
// });
|
// });
|
||||||
initFooter();
|
initFooter();
|
||||||
|
|
||||||
const resize = function () {
|
const resize = function () {
|
||||||
const width = $(window).width();
|
const width = $(window).width();
|
||||||
const num = width / 1400;
|
const num = width / 1400;
|
||||||
if (1000 < width && width < 1440) {
|
if (1000 < width && width < 1440) {
|
||||||
// 为了避免首页 3D 粒子地球被横向压扁,这里不再对首页 banner 区域做 scaleX,仅对其他 section 生效
|
// 为了避免首页 3D 粒子地球被横向压扁,这里不再对首页 banner 区域做 scaleX,仅对其他 section 生效
|
||||||
$("section")
|
$("section")
|
||||||
.not(".banner")
|
.not(".banner")
|
||||||
.each(function () {
|
.each(function () {
|
||||||
this.style.width = "1400px";
|
this.style.width = "1400px";
|
||||||
this.style.transform = "scaleX(" + num + ")";
|
this.style.transform = "scaleX(" + num + ")";
|
||||||
this.style.transformOrigin = "0 0";
|
this.style.transformOrigin = "0 0";
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$("section").each(function () {
|
$("section").each(function () {
|
||||||
this.style.width = "";
|
this.style.width = "";
|
||||||
this.style.transform = "";
|
this.style.transform = "";
|
||||||
this.style.transformOrigin = "";
|
this.style.transformOrigin = "";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
resize();
|
resize();
|
||||||
window.addEventListener("resize", resize);
|
window.addEventListener("resize", resize);
|
||||||
|
|
||||||
@@ -314,4 +314,23 @@ $(function () {
|
|||||||
$(".go-ticket-btn").click(function () {
|
$(".go-ticket-btn").click(function () {
|
||||||
location.href = "home.htm";
|
location.href = "home.htm";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 回到顶部功能
|
||||||
|
$("#backTop").click(function () {
|
||||||
|
$("html, body").animate({ scrollTop: 0 }, 600);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 根据滚动位置显示/隐藏回到顶部按钮
|
||||||
|
$(window).scroll(function () {
|
||||||
|
if ($(this).scrollTop() > 300) {
|
||||||
|
$("#backTop").fadeIn();
|
||||||
|
} else {
|
||||||
|
$("#backTop").fadeOut();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始化时隐藏回到顶部按钮
|
||||||
|
if ($(window).scrollTop() <= 300) {
|
||||||
|
$("#backTop").hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -144,8 +144,8 @@
|
|||||||
justify-content: center !important;
|
justify-content: center !important;
|
||||||
gap: 8px !important;
|
gap: 8px !important;
|
||||||
padding: 0 48px !important;
|
padding: 0 48px !important;
|
||||||
font-size: 14px !important;
|
font-size: 16px !important;
|
||||||
font-weight: 500 !important;
|
font-weight: 600 !important;
|
||||||
color: #ffffff !important;
|
color: #ffffff !important;
|
||||||
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%) !important;
|
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%) !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
@@ -159,6 +159,7 @@
|
|||||||
min-width: 140px !important;
|
min-width: 140px !important;
|
||||||
flex-shrink: 0 !important;
|
flex-shrink: 0 !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
|
z-index: 1 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 注册按钮图标 */
|
/* 注册按钮图标 */
|
||||||
@@ -172,7 +173,7 @@
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 3;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,7 +189,7 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 1;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#index .no-login .btn.btn-normal#registBtn:hover {
|
#index .no-login .btn.btn-normal#registBtn:hover {
|
||||||
|
|||||||
@@ -95,6 +95,11 @@
|
|||||||
<!-- 侧边 -->
|
<!-- 侧边 -->
|
||||||
<div class="aside-tools">
|
<div class="aside-tools">
|
||||||
<div class="tools-list">
|
<div class="tools-list">
|
||||||
|
<!-- 回到顶部按钮 - 固定在第一位 -->
|
||||||
|
<div class="tools-item back-top" id="backTop">
|
||||||
|
<img src="/web/BlackFruit-web/assets/img/index/top.png" alt="回到顶部">
|
||||||
|
</div>
|
||||||
|
|
||||||
{if ( isset($data.side_floating_window) ) }
|
{if ( isset($data.side_floating_window) ) }
|
||||||
{foreach $data.side_floating_window as $key=>$value}
|
{foreach $data.side_floating_window as $key=>$value}
|
||||||
<div class="tools-item">
|
<div class="tools-item">
|
||||||
|
|||||||
Reference in New Issue
Block a user