Browse Source

update

pull/81/head
xiaoz 3 years ago
parent
commit
62fdbd88e9
  1. 46
      templates/admin/click.php
  2. 4
      templates/admin/setting/transition_page.php
  3. 5
      templates/admin/static/embed.js

46
templates/admin/click.php

@ -21,6 +21,10 @@
padding-top:1em; padding-top:1em;
padding-bottom:1em; padding-bottom:1em;
} }
#menu{
width:100%;
background-color: #343a40!important;
}
</style> </style>
<?php echo $site['custom_header']; ?> <?php echo $site['custom_header']; ?>
<?php <?php
@ -42,21 +46,29 @@
?> ?>
</head> </head>
<body> <body>
<!-- 顶部导航菜单 --> <div id="menu">
<nav class="navbar navbar-expand-md bg-dark navbar-dark"> <div class="container">
<a class="navbar-brand" href="/"><?php echo $site['title']; ?></a> <div class = "row">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar"> <div class="col-sm-8 offset-sm-2">
<span class="navbar-toggler-icon"></span> <!-- 顶部导航菜单 -->
</button> <nav class="navbar navbar-expand-md bg-dark navbar-dark">
<div class="collapse navbar-collapse" id="collapsibleNavbar"> <a class="navbar-brand" href="/"><?php echo $site['title']; ?></a>
<ul class="navbar-nav"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<!-- 输出自定义菜单 --> <span class="navbar-toggler-icon"></span>
<?php echo $transition_page['menu']; ?> </button>
<!-- 输出自定义菜单END --> <div class="collapse navbar-collapse" id="collapsibleNavbar">
</ul> <ul class="navbar-nav">
</div> <!-- 输出自定义菜单 -->
</nav> <?php echo $transition_page['menu']; ?>
<!-- 顶部导航菜单END --> <!-- 输出自定义菜单END -->
</ul>
</div>
</nav>
<!-- 顶部导航菜单END -->
</div>
</div>
</div>
</div>
<div class="container" style = "margin-top:2em;"> <div class="container" style = "margin-top:2em;">
<!-- 广告1 --> <!-- 广告1 -->
<div class= "row"> <div class= "row">
@ -139,10 +151,10 @@
<div class="col-sm-8 offset-sm-2"> <div class="col-sm-8 offset-sm-2">
<hr> <hr>
<div class="xcdn-footer"> <div class="xcdn-footer">
<?php if( empty($transition_page['footer']) ){ ?> <?php if( empty($site['custom_footer']) ){ ?>
&copy;2022 Powered by <a href="https://www.xiaoz.me/" title = "小z博客" rel = "nofollow" target = "_blank">xiaoz</a> &copy;2022 Powered by <a href="https://www.xiaoz.me/" title = "小z博客" rel = "nofollow" target = "_blank">xiaoz</a>
<?php }else{ <?php }else{
echo $transition_page['footer']; echo $site['custom_footer'];
} ?> } ?>
</div> </div>
</div> </div>

4
templates/admin/setting/transition_page.php

@ -46,12 +46,12 @@
</div> </div>
</div> </div>
<div class="layui-form-item layui-form-text"> <!-- <div class="layui-form-item layui-form-text">
<label class="layui-form-label">自定义footer,支持HTML(订阅可用)</label> <label class="layui-form-label">自定义footer,支持HTML(订阅可用)</label>
<div class="layui-input-block"> <div class="layui-input-block">
<textarea name = "footer" placeholder="请参考帮助文档进行设置!" rows = "4" class="layui-textarea"><?php echo $transition_page['footer']; ?></textarea> <textarea name = "footer" placeholder="请参考帮助文档进行设置!" rows = "4" class="layui-textarea"><?php echo $transition_page['footer']; ?></textarea>
</div> </div>
</div> </div> -->
<div class="layui-form-item layui-form-text"> <div class="layui-form-item layui-form-text">
<label class="layui-form-label">广告1(订阅可用)</label> <label class="layui-form-label">广告1(订阅可用)</label>

5
templates/admin/static/embed.js

@ -452,15 +452,18 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
//保存站点设置 //保存站点设置
form.on('submit(set_transition_page)', function(data){ form.on('submit(set_transition_page)', function(data){
var index = layer.load(1);
$.post('/index.php?c=api&method=set_transition_page',data.field,function(data,status){ $.post('/index.php?c=api&method=set_transition_page',data.field,function(data,status){
if(data.code == 0) { if(data.code == 0) {
layer.closeAll('loading');
layer.msg(data.data, {icon: 1}); layer.msg(data.data, {icon: 1});
} }
else{ else{
layer.closeAll('loading');
layer.msg(data.err_msg, {icon: 5}); layer.msg(data.err_msg, {icon: 5});
} }
}); });
console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value} //console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
}); });

Loading…
Cancel
Save