Merge branch 'dev' of https://gitea.f2b211.com/jsasg/orico-official-website into dev
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
{else/}
|
||||
<div style="text-align: center; padding: 10%;">暂无数据</div>
|
||||
{/notempty}
|
||||
<div style=" text-align: center;padding: 10%;">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -28,5 +28,31 @@
|
||||
{include file="public/footer"/}
|
||||
{/block}
|
||||
{block name="script"}{/block}
|
||||
<script>
|
||||
$(window).ready(function () {
|
||||
// 为所有站内链接,添加标识
|
||||
// 使用mtpl=1参数标识解决ipad访问站点时,从pc重定向到mobile每次页面都会pc - mobile闪现问题
|
||||
var LURL = new URL(window.location.href);
|
||||
if (LURL.searchParams.get('mtpl') == 1) {
|
||||
$('a').each(function () {
|
||||
var href = $(this).attr('href');
|
||||
if (href) {
|
||||
var origin = LURL.origin;
|
||||
if (href.indexOf('http') == -1) {
|
||||
href = new URL(href, origin);
|
||||
href.searchParams.set('mtpl', '1');
|
||||
$(this).attr('href', href);
|
||||
} else {
|
||||
href = new URL(href);
|
||||
if (href.origin == origin) {
|
||||
href.searchParams.set('mtpl', '1');
|
||||
$(this).attr('href', href);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,7 +18,9 @@
|
||||
{notempty name="fn.children"}
|
||||
{volist name="fn.children" id="fnc"}
|
||||
<p>
|
||||
<a href="{$fnc.link}" target="_blank" class="inline-block link-faded break-all">{$fnc.name}</a>
|
||||
<a href="{$fnc.link}" {eq name="fnc.link" value="1"}target="_blank"{/eq} class="inline-block link-faded break-all">
|
||||
{$fnc.name}
|
||||
</a>
|
||||
</p>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
var windowHeight = $(window).height();
|
||||
// 监听滚动事件
|
||||
$(window).scroll(function() {
|
||||
console.log($(this).scrollTop(),windowHeight)
|
||||
// 检查滚动距离是否超过一屏幕高度
|
||||
if ($(this).scrollTop() > windowHeight) {
|
||||
// 如果超过,显示返回顶部按钮
|
||||
|
||||
Reference in New Issue
Block a user