mirror of https://github.com/1099438829/apeblog
修正主题url构建
This commit is contained in:
parent
5e1ab5e0ff
commit
a2ad5cb8bd
|
|
@ -83,7 +83,6 @@ class Tag extends BaseModel
|
|||
public static function getList($where): array
|
||||
{
|
||||
$list = cache('index:tagList');
|
||||
$list = false;
|
||||
if ($list) {
|
||||
return json_decode($list, true);
|
||||
} else {
|
||||
|
|
@ -93,7 +92,7 @@ class Tag extends BaseModel
|
|||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$list = $model->select()->each(function (&$tag) {
|
||||
$tag->text = $tag['name'];
|
||||
$tag->href = url("/index/article/tag?t=" . $tag['name'])->build();
|
||||
$tag->href = url('/article/tag',["t"=>$tag["name"]],'html')->build();
|
||||
})->toArray();
|
||||
if ($list) {
|
||||
cache('index:tagList', json_encode($list), 24 * 60 * 60);
|
||||
|
|
|
|||
|
|
@ -25,11 +25,12 @@
|
|||
"phpmailer/phpmailer": "^6.5",
|
||||
"spatie/macroable": "^1.0",
|
||||
"topthink/think-view": "^1.0",
|
||||
"ext-iconv": "*",
|
||||
"ext-iconv": "*",
|
||||
"liliuwei/php-sitemap": "^1.0",
|
||||
"liliuwei/thinkphp-social": "^1.3",
|
||||
"topthink/think-filesystem": "^2.0",
|
||||
"yzh52521/think-mail": "^3.0"
|
||||
"yzh52521/think-mail": "^3.0",
|
||||
"ext-json": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/var-dumper": "^4.2"
|
||||
|
|
|
|||
|
|
@ -108,10 +108,10 @@
|
|||
<div class="post-turn-page-main">
|
||||
{ape:prenext get="pre" cid="$apeField['category_id']"}
|
||||
<div>
|
||||
<a href="{:url('/index/article/detail')}?id={$field['id']}">{$field['title']}</a>
|
||||
<a href="{:url('/article/detail')}?id={$field['id']}">{$field['title']}</a>
|
||||
</div>
|
||||
<div class="post-turn-page-link-pre">
|
||||
<a href="{:url('/index/article/detail')}?id={$field['id']}"><<上一篇></上一篇></a>
|
||||
<a href="{:url('/article/detail')}?id={$field['id']}"><<上一篇></上一篇></a>
|
||||
</div>
|
||||
{/ape:prenext}
|
||||
</div>
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
<div class="post-turn-page post-turn-page-next">
|
||||
{ape:prenext get="next" cid="$apeField['category_id']"}
|
||||
<div class="post-turn-page-main">
|
||||
<a href="{:url('/index/article/detail')}?id={$field['id']}">{$field['title']}</a>
|
||||
<a href="{:url('/article/detail')}?id={$field['id']}">{$field['title']}</a>
|
||||
<div class="post-turn-page-link-next">
|
||||
<a href="javascript:">下一篇>></a>
|
||||
</div>
|
||||
|
|
@ -148,12 +148,12 @@
|
|||
<div id="respond" class="comment-respond">
|
||||
<h3 id="reply-title" class="comment-reply-title">
|
||||
<small>
|
||||
<a rel="nofollow" id="cancel-comment-reply-link" href="{:url('/index/article/detail')}?id={$field['id']}#respond" style="display:none;">
|
||||
<a rel="nofollow" id="cancel-comment-reply-link" href="{:url('/article/detail')}?id={$field['id']}#respond" style="display:none;">
|
||||
取消回复
|
||||
</a>
|
||||
</small>
|
||||
</h3>
|
||||
<form action="{:url('/index/article/create_comment')}" method="post" id="form_comment" class="comment-form">
|
||||
<form action="{:url('/article/create_comment')}" method="post" id="form_comment" class="comment-form">
|
||||
<div class="comment-user-plane">
|
||||
<div class="logged-in-as">
|
||||
<img class="comment-user-avatar" width="48" height="auto" src="__IMG__/avatar.png" alt="comment-user-avatar">
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
<div class="sidebar">
|
||||
<div class="sidebar-box-list">
|
||||
<div class="aside-box">
|
||||
<form class="search-form" action="{:url('/index/article/search')}" method="get" role="search">
|
||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||
<div class="search-form-input-plane">
|
||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容" value="{$kw}"/>
|
||||
</div>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
$.get("{:url('/index/index/taglist')}",function(data,status){
|
||||
$.get("{:url('/index/taglist')}",function(data,status){
|
||||
TagCloud(
|
||||
".corepress-tag-container-tag1",
|
||||
data.data,
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
<div class="sidebar">
|
||||
<div class="sidebar-box-list">
|
||||
<div class="aside-box">
|
||||
<form class="search-form" action="{:url('/index/article/search')}" method="get" role="search">
|
||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||
<div class="search-form-input-plane">
|
||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容"/>
|
||||
</div>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
$.get("{:url('/index/index/taglist')}",function(data,status){
|
||||
$.get("{:url('/index/taglist')}",function(data,status){
|
||||
TagCloud(
|
||||
".corepress-tag-container-tag1",
|
||||
data.data,
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
<div class="sidebar">
|
||||
<div class="sidebar-box-list">
|
||||
<div class="aside-box">
|
||||
<form class="search-form" action="{:url('/index/article/search')}" method="get" role="search">
|
||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||
<div class="search-form-input-plane">
|
||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容"/>
|
||||
</div>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
$.get("{:url('/index/article/taglist')}",function(data,status){
|
||||
$.get("{:url('/article/taglist')}",function(data,status){
|
||||
TagCloud(
|
||||
".corepress-tag-container-tag1",
|
||||
data.data,
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
<div class="sidebar">
|
||||
<div class="sidebar-box-list">
|
||||
<div class="aside-box">
|
||||
<form class="search-form" action="{:url('/index/article/search')}" method="get" role="search">
|
||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||
<div class="search-form-input-plane">
|
||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容" value=""/>
|
||||
</div>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
$.get("{:url('/index/index/taglist')}",function(data,status){
|
||||
$.get("{:url('/index/taglist')}",function(data,status){
|
||||
TagCloud(
|
||||
".corepress-tag-container-tag1",
|
||||
data.data,
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@
|
|||
<div class="sidebar">
|
||||
<div class="sidebar-box-list">
|
||||
<div class="aside-box">
|
||||
<form class="search-form" action="{:url('/index/article/search')}" method="get" role="search">
|
||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||
<div class="search-form-input-plane">
|
||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容" value=""/>
|
||||
</div>
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
$.get("{:url('/index/article/taglist')}",function(data,status){
|
||||
$.get("{:url('/article/taglist')}",function(data,status){
|
||||
TagCloud(
|
||||
".corepress-tag-container-tag1",
|
||||
data.data,
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@
|
|||
<div class="sidebar">
|
||||
<div class="sidebar-box-list">
|
||||
<div class="aside-box">
|
||||
<form class="search-form" action="{:url('/index/article/search')}" method="get" role="search">
|
||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||
<div class="search-form-input-plane">
|
||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容" value=""/>
|
||||
</div>
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
$.get("{:url('/index/index/taglist')}",function(data,status){
|
||||
$.get("{:url('/index/taglist')}",function(data,status){
|
||||
TagCloud(
|
||||
".corepress-tag-container-tag1",
|
||||
data.data,
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@
|
|||
<div class="sidebar">
|
||||
<div class="sidebar-box-list">
|
||||
<div class="aside-box">
|
||||
<form class="search-form" action="{:url('/index/article/search')}" method="get" role="search">
|
||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||
<div class="search-form-input-plane">
|
||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容" value=""/>
|
||||
</div>
|
||||
|
|
@ -192,7 +192,7 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
$.get("{:url('/index/article/taglist')}",function(data,status){
|
||||
$.get("{:url('/article/taglist')}",function(data,status){
|
||||
TagCloud(
|
||||
".corepress-tag-container-tag1",
|
||||
data.data,
|
||||
|
|
|
|||
|
|
@ -122,12 +122,12 @@
|
|||
<div id="respond" class="comment-respond">
|
||||
<h3 id="reply-title" class="comment-reply-title">
|
||||
<small>
|
||||
<a rel="nofollow" id="cancel-comment-reply-link" href="{:url('/index/article/detail')}?id={$field['id']}#respond" style="display:none;">
|
||||
<a rel="nofollow" id="cancel-comment-reply-link" href="{:url('/article/detail')}?id={$field['id']}#respond" style="display:none;">
|
||||
取消回复
|
||||
</a>
|
||||
</small>
|
||||
</h3>
|
||||
<form action="{:url('/index/article/create_comment')}" method="post" id="form_comment" class="comment-form">
|
||||
<form action="{:url('/article/create_comment')}" method="post" id="form_comment" class="comment-form">
|
||||
<div class="comment-user-plane">
|
||||
<div class="logged-in-as">
|
||||
<img class="comment-user-avatar" width="48" height="auto" src="__IMG__/avatar.png" alt="comment-user-avatar">
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
<nav class="menu-footer-plane">
|
||||
<ul id="menu-list-footer" class="menu-footer-list">
|
||||
<li id="menu-item-306" class="menu-item menu-item-306">
|
||||
<a href="{:url('/index/index/about')}">关于本站</a>
|
||||
<a href="{:url('/index/about')}">关于本站</a>
|
||||
</li>
|
||||
<li id="menu-item-307" class="menu-item menu-item-307">
|
||||
<a href="{:url('/index/index/msg')}">留言建议</a>
|
||||
<a href="{:url('/index/msg')}">留言建议</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
"is_single": "",
|
||||
"is_page": "",
|
||||
"is_home": "0",
|
||||
"ajaxurl": "{:url('/index/index/index')}",
|
||||
"ajaxurl": "{:url('/index/index')}",
|
||||
"logourl": "{:web_config('logo')}",
|
||||
"imgurl": "__IMG__/",
|
||||
"themeColor": "#409EFF",
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
<div class="dialog-mask" onclick="closeSearch()"></div>
|
||||
<div class="dialog-plane">
|
||||
<h2>搜索内容</h2>
|
||||
<form class="search-form" action="{:url('/index/article/search')}" method="get" role="search">
|
||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||
<div class="search-form-input-plane">
|
||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容" value="">
|
||||
</div>
|
||||
|
|
@ -141,7 +141,7 @@
|
|||
</ul>
|
||||
{else /}
|
||||
<span class="user-menu-main user-menu-main-notlogin">
|
||||
<a href="{:url('/index/user/login')}"><button class="login-btn-header">登录</button></a>
|
||||
<a href="{:url('/user/login')}"><button class="login-btn-header">登录</button></a>
|
||||
</span>
|
||||
{/notempty}
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
$("#login-note").text("登录中,请稍后");
|
||||
$("#login-note").css("visibility", "visible");
|
||||
$.post(
|
||||
"{:url('/index/user/verify')}",
|
||||
"{:url('/user/verify')}",
|
||||
{
|
||||
action: "login",
|
||||
username: username,
|
||||
|
|
|
|||
Loading…
Reference in New Issue