提交
This commit is contained in:
98
app/home/view/public/head.html
Normal file
98
app/home/view/public/head.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="" style="height:100%;">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{:lang('head.title')}</title>
|
||||
<meta name="keywords" content="{:lang('head.keywords')}"/>
|
||||
<meta name="description" content="{:lang('head.description')}"/>
|
||||
<meta property="og:title" content="{:lang('head.og_title')}"/>
|
||||
<meta property="og:description" content="{:lang('head.og_description')}"/>
|
||||
<meta property="og:url" content="{$_SERVER['HTTP_HOST']}"/>
|
||||
<meta property="og:type" content="website"/>
|
||||
<link rel="icon" type="image/png" href="/static/image/icon.png">
|
||||
<link rel="stylesheet" href="/static/layui/css/layui.css">
|
||||
<script src="/static/layui/layui.js"></script>
|
||||
<script src="/static/js/jquery.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
function detectBasePath() {
|
||||
var pathname = window.location.pathname || '';
|
||||
var match = pathname.match(/^\/[^\/]+(?=\/home\/|\/static\/|\/json\/|\/$)/);
|
||||
return match ? match[0] : '';
|
||||
}
|
||||
function normalizeBasePath(base) {
|
||||
base = (base || '').trim();
|
||||
|
||||
// 模板变量未渲染时,退回到 URL 推断
|
||||
if (!base || base === '/' || base.charAt(0) === '{') {
|
||||
base = detectBasePath();
|
||||
}
|
||||
|
||||
return base.replace(/\/+$/, '');
|
||||
}
|
||||
window.__BASE_PATH__ = normalizeBasePath('{$base_path}');
|
||||
window.withBase = function (url) {
|
||||
if (!url) {
|
||||
return url;
|
||||
}
|
||||
if (/^(?:[a-z][a-z0-9+\-.]*:)?\/\//i.test(url) || /^[a-z][a-z0-9+\-.]*:/i.test(url)) {
|
||||
return url;
|
||||
}
|
||||
if (url.charAt(0) !== '/') {
|
||||
return url;
|
||||
}
|
||||
var base = window.__BASE_PATH__ || '';
|
||||
if (!base) {
|
||||
return url;
|
||||
}
|
||||
if (url === base || url.indexOf(base + '/') === 0) {
|
||||
return url;
|
||||
}
|
||||
return base + url;
|
||||
};
|
||||
function attachAjaxPrefilter(jq) {
|
||||
if (!jq || !jq.ajaxPrefilter || jq.__with_base_prefilter_attached__) {
|
||||
return;
|
||||
}
|
||||
jq.__with_base_prefilter_attached__ = true;
|
||||
jq.ajaxPrefilter(function (options) {
|
||||
if (options && options.url) {
|
||||
options.url = window.withBase(options.url);
|
||||
}
|
||||
});
|
||||
}
|
||||
attachAjaxPrefilter(window.jQuery);
|
||||
attachAjaxPrefilter(window.$);
|
||||
// 兼容 layui 可能持有独立 jQuery 实例
|
||||
if (window.layui && window.layui.$) {
|
||||
attachAjaxPrefilter(window.layui.$);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script src="/static/js/pub.js"></script>
|
||||
<link rel="stylesheet" href="/static/css/tur_main.css?v={:time()}">
|
||||
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Bootstrap Icons -->
|
||||
<link href="/static/bootstrap/css/bootstrap-icons.min.css" rel="stylesheet">
|
||||
<link href="/static/css/newin.css?v={:time()}" rel="stylesheet">
|
||||
<script type="text/javascript" async="" src="/static/js/footer.js"></script>
|
||||
<script type="text/javascript" async="" src="/static/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/static/js/passport-ocr-sdk.min.js?v=1"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
var footHight=$(".footer").height();
|
||||
var docHeight=document.documentElement.clientHeight;
|
||||
var bodyHeight=$("body").height();
|
||||
var subHeight=docHeight-bodyHeight-footHight;
|
||||
if(subHeight>30){
|
||||
$(".footer").css({"position":"fixed","bottom":"0","z-index":"1000"});
|
||||
$("body").css({"padding-bottom":"142px"});
|
||||
} else {
|
||||
$(".footer").css({"position": "static"});
|
||||
$("body").css({"padding-bottom": "0"});
|
||||
}
|
||||
$(".footer").show();
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
Reference in New Issue
Block a user