doum
2025-09-23 920ad7c1062549f8ff6e5034f84a90c725dc89dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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')
    })
});