From 82d483406921aa92b6ce3a1af5d17d80ccb78256 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 04 七月 2025 09:39:57 +0800
Subject: [PATCH] 提交

---
 web/js/operation.js |   74 +++++++++++++++++++++++++++++++++++++
 1 files changed, 74 insertions(+), 0 deletions(-)

diff --git a/web/js/operation.js b/web/js/operation.js
new file mode 100644
index 0000000..d32ae5d
--- /dev/null
+++ b/web/js/operation.js
@@ -0,0 +1,74 @@
+$(document).ready(function() {
+    // 璁剧疆鍏叡瀵艰埅鏍�
+    // $("#header").load("./components/nav.html");
+    // 璁剧疆鍏叡搴曢儴
+    $("#footer").load("./components/footer.html");
+
+    // 褰撻〉闈㈡粴鍔ㄥ埌涓�瀹氳窛绂绘椂鏄剧ず杩斿洖椤堕儴鎸夐挳
+    $('#back-to-top').fadeOut();
+    $(window).scroll(function() {
+        if ($(this).scrollTop() > 100) { // 杩欓噷鍙互鏍规嵁闇�瑕佽皟鏁存暟鍊�
+            $('#back-to-top').fadeIn(); // 鏄剧ず鎸夐挳
+        } else {
+            $('#back-to-top').fadeOut(); // 闅愯棌鎸夐挳
+        }
+    });
+
+    // 鐐瑰嚮鎸夐挳鏃讹紝椤甸潰骞虫粦婊氬姩鍒伴《閮�
+    $('#back-to-top').click(function(event) {
+        event.preventDefault(); // 闃绘閾炬帴鐨勯粯璁よ涓�
+        $('html, body').animate({scrollTop: 0}, 800); // 椤甸潰骞虫粦婊氬姩鍒伴《閮紝800姣瀹屾垚婊氬姩
+    });
+
+    $(".index-a-c-item").click(function () {
+        // console.log($(this).siblings())
+        $(this).siblings().each(function () {
+            let name = $(this).attr('name')
+            if (name === '璧勪骇绠$悊') {
+                $(this).children().first().attr('src', './assets/icon/yunwei_ic_zichan@2x.png')
+            } else if (name === '宸℃杩愮淮') {
+                $(this).children().first().attr('src', './assets/icon/yunwei_ic_xunjian@2x.png')
+            } else if (name === '浠撳偍绠$悊') {
+                $(this).children().first().attr('src', './assets/icon/yunwei_ic_cangchu@2x.png')
+            } else if (name === '鍟嗘埛绠$悊') {
+                $(this).children().first().attr('src', './assets/icon/yunwei_ic_shanghu@2x.png')
+            }
+            $(this).css('background', '#ffffff')
+            $(this)
+                .children()
+                .last()
+                .children()
+                .css('color', '#191B1F')
+        })
+        if ($(this).attr('name') === '璧勪骇绠$悊') {
+            $(this)
+                .css('background', '#FF7900')
+                .children()
+                .first()
+                .attr('src', './assets/icon/yunwei_ic_zichan_sel@2x.png')
+        } else if ($(this).attr('name') === '宸℃杩愮淮') {
+            $(this)
+                .css('background', '#FF7900')
+                .children()
+                .first()
+                .attr('src', './assets/icon/yunwei_ic_xunjian_sel@2x.png')
+        } else if ($(this).attr('name') === '浠撳偍绠$悊') {
+            $(this)
+                .css('background', '#FF7900')
+                .children()
+                .first()
+                .attr('src', './assets/icon/yunwei_ic_cangchu_sel@2x.png')
+        } else if ($(this).attr('name') === '鍟嗘埛绠$悊') {
+            $(this)
+                .css('background', '#FF7900')
+                .children()
+                .first()
+                .attr('src', './assets/icon/yunwei_ic_shanghu_sel@2x.png')
+        }
+        $(this)
+            .children()
+            .last()
+            .children()
+            .css('color', '#FFFFFF')
+    })
+});

--
Gitblit v1.9.3