zm
2020-09-14 89c2b99ab9f7b162b9ce6f42077dbf8692066879
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
    {if !in_array($_GPC['do'], array('search','qrcode','qrcoderec','lessonqrcode'))}
    <footer>
        <a href="{php echo $this->createMobileUrl('index', array('t'=>1));}">{$setting['copyright']}</a>
    </footer>
    {/if}
 
    {if $common['right_bar'] && $right_menu}
        {template $template.'/rightBar'}
    {/if}
    <div class="btn-scroll-up" id="backtop" {if $_GPC['do']=='search'}style="display:block;"{/if}>
        <div class="btn_scroll_home">
            <i class="fa fa-angle-double-up"></i>
        </div>
    </div>
 
    <!-- 底部导航 -->
    <div id="footer-nav" class="footer-nav {if ($_GPC['do']=='lesson' && $section['sectiontype']!=2) || $_GPC['do']=='qrcode' || $_GPC['do']=='qrcoderec' || $_GPC['do']=='lessonqrcode'}hidden{/if}">
        <a href="{$navigation['index']['url_link']}" class="weui-tabbar__item {if $foot_params['index']}weui-bar__item_on{/if}">
            {if $foot_params['index']}
                <img src="{$navigation['index']['selected_icon']}" class="weui-tabbar__icon" />
            {else}
                <img src="{$navigation['index']['unselected_icon']}" class="weui-tabbar__icon" />
            {/if}
            <p class="weui-tabbar__label">{$navigation['index']['nav_name']}</p>
        </a>
        <a href="{$navigation['search']['url_link']}" class="weui-tabbar__item {if $foot_params['search']  && $_GPC['searchtype']=='1'}weui-bar__item_on{/if}">
            {if $foot_params['search'] && $_GPC['searchtype']=='1'}
                <img src="{$navigation['search']['selected_icon']}" class="weui-tabbar__icon" />
            {else}
                <img src="{$navigation['search']['unselected_icon']}" class="weui-tabbar__icon" />
            {/if}
            <p class="weui-tabbar__label">{$navigation['search']['nav_name']}</p>
        </a>
        {if $navigation['diynav']}
            <a href="{$navigation['diynav']['url_link']}" class="weui-tabbar__item {if $foot_params['diynav'] && $_GPC['searchtype']=='2'}weui-bar__item_on{/if}">
                {if $foot_params['diynav'] && $_GPC['searchtype']=='2'}
                    <img src="{$navigation['diynav']['selected_icon']}" class="weui-tabbar__icon" />
                {else}
                    <img src="{$navigation['diynav']['unselected_icon']}" class="weui-tabbar__icon" />
                {/if}
                <p class="weui-tabbar__label">{$navigation['diynav']['nav_name']}</p>
            </a>
        {/if}
        {if $navigation['mylesson']}
        <a href="{$navigation['mylesson']['url_link']}" class="weui-tabbar__item {if $foot_params['mylesson']}weui-bar__item_on{/if}">
            {if $foot_params['mylesson']}
                <img src="{$navigation['mylesson']['selected_icon']}" class="weui-tabbar__icon" />
            {else}
                <img src="{$navigation['mylesson']['unselected_icon']}" class="weui-tabbar__icon" />
            {/if}
            <p class="weui-tabbar__label">{$navigation['mylesson']['nav_name']}</p>
        </a>
        {/if}
        <a href="{$navigation['self']['url_link']}" class="weui-tabbar__item {if $foot_params['self']}weui-bar__item_on{/if}">
            {if $foot_params['self']}
                <img src="{$navigation['self']['selected_icon']}" class="weui-tabbar__icon" />
            {else}
                <img src="{$navigation['self']['unselected_icon']}" class="weui-tabbar__icon" />
            {/if}
            <p class="weui-tabbar__label">{$navigation['self']['nav_name']}</p>
        </a>
    </div>
    <!-- /底部导航 -->
</div>
 
{if !empty($config['statis_code'])}
    <div style="display:none;">
        {php echo html_entity_decode($config['statis_code']);}
    </div>
{/if}
 
<script type="text/javascript">
    $(function() {
        $(window).scroll(function(event) {
            if($(this).scrollTop()==0){
                $("#backtop").hide();
            }
            if($(this).scrollTop()!=0){
                $("#backtop").show();
            }
        });
        $("#backtop").on("click",function(){
            $('html, body, .section').animate({scrollTop: 0},500);return false;
        });
    })
 
 
    var uniacid = "{$uniacid}";
    <?php if($_GPC['do']=='lesson'){ ?>
        var lastPage = localStorage.getItem('lastPage_' + uniacid);
        $("#lesson-back").click(function(){
            if(lastPage){
                window.location.href = lastPage;
            }else{
                window.history.go(-1);
            }
        })
 
        window.localStorage.setItem('lesson_back_' + uniacid, 1);
    <?php }elseif($_GPC['do']=='index'){ ?>
        localStorage.setItem('lastPage_' + uniacid, "");
    <?php }else{ ?>
        localStorage.setItem('lastPage_' + uniacid, "{$_W['siteurl']}");
    <?php } ?>
 
    <?php if(!in_array($_GPC['do'], array('lesson','search'))){ ?>
        window.localStorage.setItem('lesson_back_' + uniacid, 0);
    <?php } ?>
 
    //兼容iphoneX、XSMax、XR底部菜单
    var isIPhoneX = /iphone/gi.test(window.navigator.userAgent) && window.devicePixelRatio && window.devicePixelRatio === 3 && window.screen.width === 375 && window.screen.height === 812;
    var isIPhoneXSMax = /iphone/gi.test(window.navigator.userAgent) && window.devicePixelRatio && window.devicePixelRatio === 3 && window.screen.width === 414 && window.screen.height === 896;
    var isIPhoneXR = /iphone/gi.test(window.navigator.userAgent) && window.devicePixelRatio && window.devicePixelRatio === 2 && window.screen.width === 414 && window.screen.height === 896;
    if(isIPhoneX || isIPhoneXSMax || isIPhoneXR){
        var footer_nav = document.getElementById("footer-nav");
        var footer_nav_height = (footer_nav.clientHeight || footer_nav.offsetHeight) * 1 + 20;
 
        document.getElementById('page-container').style.marginBottom = '20px';
        var iphonex_head = document.head || document.getElementsByTagName('head')[0];
        var iphonex_system = document.createElement('style');
        iphonex_system.innerHTML = '.page-container{margin-bottom:20px;}.footer-nav{height:' + footer_nav_height + 'px;}';
        iphonex_head.appendChild(iphonex_system);
    }
</script>
 
</body>
</html>