Compare commits

...

2 Commits

Author SHA1 Message Date
yumo ad077237cd 修正路由错误 2023-07-18 16:50:36 +08:00
yumo a2ad5cb8bd 修正主题url构建 2023-07-17 19:21:35 +08:00
21 changed files with 111 additions and 116 deletions

View File

@ -17,16 +17,6 @@ class Index extends AuthController
*/
public function index()
{
//判断后台统计配置是否开启 1 开启
if (web_config("web_statistics") == 1) {
//统计url
$this->urlrecord('网站首页');
}
//清除可能存在的栏目分类树id
cache(Data::CURR_CATEGORY_PATENT_ID, false);
//模板兼容性标签
$this->assign('id', false);
$this->assign('cid', false);
return $this->fetch();
return app("json")->success("获取成功", 'code');
}
}

View File

@ -17,6 +17,8 @@ use think\db\exception\ModelNotFoundException;
*/
class Tag extends BaseModel
{
protected static $cache_key = 'index:tagList';
/**
* 列表
* @param $where
@ -66,9 +68,16 @@ class Tag extends BaseModel
'user_id' => $user_id,
];
}
$this->clearCache();
return $this->saveAll($saveAll);
}
/**
* 清除缓存
*/
public function clearCache(){
cache()->delete(self::$cache_key);
}
/**
* 列表
@ -82,8 +91,7 @@ class Tag extends BaseModel
*/
public static function getList($where): array
{
$list = cache('index:tagList');
$list = false;
$list = cache(self::$cache_key);
if ($list) {
return json_decode($list, true);
} else {
@ -93,10 +101,10 @@ 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);
cache(self::$cache_key, json_encode($list), 24 * 60 * 60);
}
}
return $list;

View File

@ -73,7 +73,7 @@ function get_document_category($x, $field = false)
if ($field) {
return $documentCategoryList[$x][$field];
} else {
$documentCategoryList[$x]['child'] = implode(",",array_column(getSubs($documentCategoryList,$x),"id"));
$documentCategoryList[$x]['child'] = implode(",", array_column(getSubs($documentCategoryList, $x), "id"));
return $documentCategoryList[$x];
}
}
@ -121,7 +121,7 @@ function get_document_category_by($x, $field = false)
if ($field) {
return $documentCategoryList[$x][$field];
} else {
$documentCategoryList[$x]['child'] = implode(",",array_column(getSubs($documentCategoryList,$x),"id"));
$documentCategoryList[$x]['child'] = implode(",", array_column(getSubs($documentCategoryList, $x), "id"));
return $documentCategoryList[$x];
}
}
@ -270,13 +270,14 @@ function get_document_category_by_parent($pid, $row)
/*
* 获取所有子集元素
*/
function getSubs($categorys,$catId=0,$level=1){
$subs=array();
foreach($categorys as $item){
if($item['pid']==$catId){
$item['level']=$level;
$subs[]=$item;
$subs=array_merge($subs,getSubs($categorys,$item['id'],$level+1));
function getSubs($categorys, $catId = 0, $level = 1)
{
$subs = array();
foreach ($categorys as $item) {
if ($item['pid'] == $catId) {
$item['level'] = $level;
$subs[] = $item;
$subs = array_merge($subs, getSubs($categorys, $item['id'], $level + 1));
}
}
return $subs;
@ -308,7 +309,7 @@ function get_document_category_all()
function tpl_get_prenext($get, $cid = false, $none)
{
//文档id
$id = input('id');
$id = request()->param('id');
if (!$get) {
$get = 'next';
}
@ -322,7 +323,7 @@ function tpl_get_prenext($get, $cid = false, $none)
$document = $document->field('id,title')->order($get == 'pre' ? 'id desc' : 'id asc')->find();
if ($document) {
$document['url'] = url('article/detail?id=' . $document['id'])->build();
$document['url'] = url('/article/detail?id=' . $document['id'])->build();
} else {
$document['id'] = false;
$document['url'] = 'javascript:void(0)';
@ -338,7 +339,7 @@ function tpl_get_prenext($get, $cid = false, $none)
* @param $cid int 栏目分类id
* @param $type string 读取数据的方式son:'获取栏目下文章以及所有子孙分类文章',self:'获取栏目下文章',search:'获取关键字搜索的文章',where:'根据自定义条件获取文章where语句'
* @param string $table 文章内容扩展表名默认article
* @param bool|array $where 自定义条件
* @param bool|array $where 自定义条件
* @param int $display
* @return array
* @throws Exception
@ -346,7 +347,7 @@ function tpl_get_prenext($get, $cid = false, $none)
* @throws DbException
* @throws ModelNotFoundException
*/
function tpl_get_list($orderBy, int $pageSize, $cid, $type, $table = 'article', $where, int $display = 1)
function tpl_get_list($orderBy, int $pageSize, $cid, $type, $table = 'article', $where, int $display = 1)
{
$documentListModel = (new Document())
->alias('a')
@ -380,8 +381,8 @@ function tpl_get_list($orderBy, int $pageSize, $cid, $type, $table = 'article',
break;
case 'search':
//获取关键字搜索的文章
$kw = input('kw'); //搜索关键词
$tid = input('cid');//文章分类Id
$kw = request()->param('kw'); //搜索关键词
$tid = request()->param('cid');//文章分类Id
if ($kw) {
$documentListModel = $documentListModel->where('a.title', 'like', "%$kw%");
}
@ -395,7 +396,7 @@ function tpl_get_list($orderBy, int $pageSize, $cid, $type, $table = 'article',
break;
case 'tag':
//读取指定tag的文章
$tag = substr(input('t'), 0, strpos(input('t'), '.')); //搜索关键词
$tag = request()->param('t'); //标签
$tagModel = new Tag();
$tagList = $tagModel->where('name', $tag)->select()->toArray();
$documentListModel = $documentListModel->where('a.id', 'in', array_column($tagList, 'document_id'));
@ -406,7 +407,7 @@ function tpl_get_list($orderBy, int $pageSize, $cid, $type, $table = 'article',
$query = request()->query();
if ($query) {
$documentListModel = $documentListModel->paginate([
'list_rows'=> $pageSize,
'list_rows' => $pageSize,
'var_page' => 'page',
'query' => get_route_query()
]);
@ -445,7 +446,7 @@ function get_route_query()
*/
function make_category_url($item)
{
return url('article/detail', ['id'=>$item['alias']?:$item['id']])->build();
return url('/article/detail', ['id' => $item['alias'] ?: $item['id']])->build();
}
/**
@ -460,7 +461,7 @@ function make_detail_url($item)
if ($item['link_str'] && $item['is_jump']) {
return $item['link_str'];
} else {
return url($item['type'].'/detail', ['id'=>$item['alias']?:$item['id']])->build();
return url($item['type'] . '/detail', ['id' => $item['alias'] ?: $item['id']])->build();
}
}
@ -601,31 +602,31 @@ function tpl_get_advert($type, int $row = 5)
$advertList = cache(Data::DATA_ADVERT . '_' . $type);
if ($advertList === null) {
$advertList = (new Advert())->alias("a")
->leftJoin("advert_info i",'a.id = i.advert_id')
->leftJoin("advert_info i", 'a.id = i.advert_id')
->field("i.*")
->where('a.alias', $type)
->where('a.status', 1)
->where('i.status', 1)
->order('sort desc')
->select()
->toArray();
->toArray();
//处理文件cdn信息
foreach ($advertList as $key => &$item) {
if (empty($item['cover_path'])){
if (empty($item['cover_path'])) {
unset($advertList[$key]);
}
$item['cover_path'] = file_cdn($item['cover_path']);
}
unset($item);
if (!empty($advertList)){
if (!empty($advertList)) {
cache(Data::DATA_ADVERT . '_' . $type, $advertList);
}
}
//如果获取行数为空则取默认值
if (!$row){
if (!$row) {
$row = 5;
}
return !empty($advertList)?array_slice($advertList,0,$row):$advertList;
return !empty($advertList) ? array_slice($advertList, 0, $row) : $advertList;
}
/**
@ -637,17 +638,15 @@ function tpl_get_advert($type, int $row = 5)
* @author 木子的忧伤
* @date 2022-06-01 10:06
*/
function tpl_get_archive_list($type,$format){
function tpl_get_archive_list($type, $format)
{
$list = cache(Data::DATA_ARCHIVE . '_' . $type);
$list = null;
if ($list === null) {
switch ($type){
switch ($type) {
case "month":
$dateFormat = "LEFT(create_date,7)";
break;
case "day":
$dateFormat = "create_date";
break;
case "year":
$dateFormat = "LEFT(create_date,4)";
break;
@ -657,7 +656,7 @@ function tpl_get_archive_list($type,$format){
}
$list = (new Document())->group($dateFormat)->column("count(*) as count,create_date");
foreach ($list as $key => &$item) {
$item['create_date'] = date($format,strtotime($item['create_date']));
$item['create_date'] = date($format, strtotime($item['create_date']));
}
cache(Data::DATA_ADVERT . '_' . $type, $list);
}
@ -700,7 +699,7 @@ if (!function_exists('tpl_get_tags_list')) {
$tagTemp = [];
foreach ($tagArr as $item) {
$data['title'] = $item;
$data['url'] = url('article/tag?t=' . urlencode($item));
$data['url'] = url('/article/tag', ["t" => $item])->build();
array_push($tagTemp, $data);
}
return $tagTemp;
@ -739,7 +738,7 @@ function get_comment_children($parentIds)
return $list;
}
foreach ($list as &$item) {
$item['reply_url'] = url('article/create_comment?pid=' . $item['id'])->build();
$item['reply_url'] = url('/article/create_comment', ["pid" => $item['id']])->build();
}
unset($item);
return array_merge($list, get_comment_children(array_column($list, 'id')));
@ -781,7 +780,7 @@ function tpl_get_comment_list($id, $type, $pageSize, $orderBy)
}
$lists = [];
foreach ($commentModel as $key => $item) {
$item['reply_url'] = url('article/create_comment?pid=' . $item['id'])->build();
$item['reply_url'] = url('/article/create_comment', ["id" => $item['id']])->build();
$lists[$key] = $item;
}
return [
@ -829,11 +828,9 @@ function get_comment_count($documentId, $type = 'top')
*/
function tpl_get_relevant_list($documentId, $row, $table = 'article')
{
$count = Document::where('type', $table)
->where('status', 1)->count(); //获取总记录数
$count = Document::where('type', $table)->where('status', 1)->count(); //获取总记录数
$id = (new Document())->getPK();
$min = Document::where('type', $table)
->where('status', 1)->min($id); //统计某个字段最小数据
$min = Document::where('type', $table)->where('status', 1)->min($id); //统计某个字段最小数据
if ($count < $row) {
$row = $count;
}
@ -850,8 +847,8 @@ function tpl_get_relevant_list($documentId, $row, $table = 'article')
} else {
$i--;
}
$i++;
}
$i++;
}
$relevantList = Document::where('type', $table)
->where('status', 1)
@ -870,7 +867,7 @@ function tpl_get_relevant_list($documentId, $row, $table = 'article')
//获取顶级栏目名
function GetTopTypename($id = false)
{
$id = $id ? $id : input('id');
$id = $id ?: request()->param('id');
$dc = get_document_category($id);
if ((int)$dc['pid'] === 0) {
return $dc['title'];
@ -882,7 +879,7 @@ function GetTopTypename($id = false)
//获取顶级id
function GetToptypeId($id = false)
{
$id = $id ? $id : input('id');
$id = $id ?: request()->param('id');
$dc = get_document_category($id);
if ((int)$dc['pid'] === 0) {
return $dc['id'];
@ -894,7 +891,7 @@ function GetToptypeId($id = false)
//获取顶级栏目图片
function GetTopTypeimg($id = false)
{
$id = $id ? $id : input('id');
$id = $id ?: request()->param('id');
$dc = get_document_category($id);
if ((int)$dc['pid'] === 0) {
return $dc['icon'];
@ -905,7 +902,7 @@ function GetTopTypeimg($id = false)
//获取顶级栏目描述
function GetTopDescription($id = false)
{
$id = $id ? $id : input('id');
$id = $id ?: request()->param('id');
$dc = get_document_category($id);
if ((int)$dc['pid'] === 0) {
return $dc['description'];
@ -917,7 +914,7 @@ function GetTopDescription($id = false)
//获取顶级英文名称
function GetTopTypenameen($id = false)
{
$id = $id ? $id : input('id');
$id = $id ?: request()->param('id');
$dc = get_document_category($id);
if ((int)$dc['pid'] === 0) {
return $dc['name'];
@ -1036,7 +1033,7 @@ function file_load_face($path)
}
function comment_face($incoming_comment,$path)
function comment_face($incoming_comment, $path)
{
$pattern = '/\[f=(.*?)\]/';
$isMatched = preg_match_all($pattern, $incoming_comment, $match);
@ -1044,7 +1041,7 @@ function comment_face($incoming_comment,$path)
return $incoming_comment;
}
foreach ($match[1] as $facename) {
if (file_exists( public_path() . $path . $facename . '.gif')) {
if (file_exists(public_path() . $path . $facename . '.gif')) {
$incoming_comment = str_replace("[f={$facename}]", '<img src="' . $path . $facename . '.gif" width="24">', $incoming_comment);
}
}

View File

@ -30,7 +30,6 @@ class Base extends BaseController
protected function initialize()
{
parent::initialize();
$this->userInfo = Session::get(Data::SESSION_KEY_USER_INFO);
$this->userId = Session::get(Data::SESSION_KEY_USER_ID);

View File

@ -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"

View File

@ -40,7 +40,7 @@
<div class="post-info">
<div class="post-info-left">
<a class="nickname url fn j-user-card" data-user="1"
href="{:url('article/user')}?author={$apeField['author']}"><i class="fa fa-user" aria-hidden="true"></i>{$apeField['author']}
href="{:url('/article/user')}?author={$apeField['author']}"><i class="fa fa-user" aria-hidden="true"></i>{$apeField['author']}
</a>
<span class="dot"></span>
<time class="entry-date published" datetime="{$apeField['create_time']}" pubdate=""><i
@ -48,7 +48,7 @@
{$apeField['create_time']}
</time>
<span class="dot"></span><i class="fas fa-folder"></i>
<a href="{:url('article/lists')}?id={$apeField['category_id']}" rel="category tag"> {$apeField['category_title']}</a>
<a href="{:url('/article/lists')}?id={$apeField['category_id']}" rel="category tag"> {$apeField['category_title']}</a>
<span class="dot"></span>
<span><i class="fa fa-eye" aria-hidden="true"></i>{$apeField['view']} 阅读</span>
</div>
@ -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">
@ -305,7 +305,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</div>

View File

@ -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>
@ -96,7 +96,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</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,

View File

@ -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>
@ -96,7 +96,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</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,

View File

@ -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>
@ -96,7 +96,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</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,

View File

@ -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>
@ -96,7 +96,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</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,

View File

@ -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>
@ -164,7 +164,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</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,

View File

@ -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>
@ -172,7 +172,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</div>
@ -190,7 +190,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</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,

View File

@ -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>
@ -156,7 +156,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</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,

View File

@ -40,7 +40,7 @@
<div class="post-info">
<div class="post-info-left">
<a class="nickname url fn j-user-card" data-user="1"
href="{:url('article/user')}?author={$apeField['author']}"><i class="fa fa-user" aria-hidden="true"></i>{$apeField['author']}
href="{:url('/article/user')}?author={$apeField['author']}"><i class="fa fa-user" aria-hidden="true"></i>{$apeField['author']}
</a>
<span class="dot"></span>
<time class="entry-date published" datetime="{$apeField['create_time']}" pubdate=""><i
@ -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">
@ -279,7 +279,7 @@
<div class="hot-post-widget-item-meta">
<div>{$field['create_time']}</div>
<div>
<a href="{:url('article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
<a href="{:url('/article/lists')}?id={$field['category_id']}">{:cn_substr($field['category_title'],5)}</a>
</div>
</div>
</div>

View File

@ -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('/api/index/index')}",
"logourl": "{:web_config('logo')}",
"imgurl": "__IMG__/",
"themeColor": "#409EFF",

View File

@ -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>
@ -128,20 +128,20 @@
</a>
<ul class="user-sub-menu sub-menu">
<li>
<a href="{:url('index/user/profile')}"><i class="fas fa-user-cog"></i> 账号设置</a>
<a href="{:url('/user/profile')}"><i class="fas fa-user-cog"></i> 账号设置</a>
</li>
<!-- <li>-->
<!-- <a href="{:url('index/login/loginout')}"><i class="far fa-edit"></i>新建文章</a>-->
<!-- <a href="{:url('/login/loginout')}"><i class="far fa-edit"></i>新建文章</a>-->
<!-- </li>-->
<li>
<a href="{:url('index/user/logout')}"><i class="fas fa-sign-out-alt"></i> 退出登录</a>
<a href="{:url('/user/logout')}"><i class="fas fa-sign-out-alt"></i> 退出登录</a>
</li>
</ul>
</li>
</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}

View File

@ -80,7 +80,7 @@
$("#login-note").text("登录中,请稍后");
$("#login-note").css("visibility", "visible");
$.post(
"{:url('/index/user/verify')}",
"{:url('/user/verify')}",
{
action: "login",
username: username,

View File

@ -10,7 +10,7 @@ return array(
'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'),
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'),
'think\\' => array($vendorDir . '/topthink/think-filesystem/src', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/topthink/framework/src/think'),
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-filesystem/src', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src'),
'mailer\\' => array($vendorDir . '/yzh52521/think-mail/src/mailer'),
'liliuwei\\social\\' => array($vendorDir . '/liliuwei/thinkphp-social/src'),
'liliuwei\\sitemap\\' => array($vendorDir . '/liliuwei/php-sitemap/src'),

View File

@ -107,11 +107,11 @@ class ComposerStaticInit4b57298e8d0e895486f3307a354a7e1a
),
'think\\' =>
array (
0 => __DIR__ . '/..' . '/topthink/think-filesystem/src',
1 => __DIR__ . '/..' . '/topthink/think-helper/src',
2 => __DIR__ . '/..' . '/topthink/think-orm/src',
3 => __DIR__ . '/..' . '/topthink/think-template/src',
4 => __DIR__ . '/..' . '/topthink/framework/src/think',
0 => __DIR__ . '/..' . '/topthink/framework/src/think',
1 => __DIR__ . '/..' . '/topthink/think-filesystem/src',
2 => __DIR__ . '/..' . '/topthink/think-helper/src',
3 => __DIR__ . '/..' . '/topthink/think-orm/src',
4 => __DIR__ . '/..' . '/topthink/think-template/src',
),
'mailer\\' =>
array (

View File

@ -3,7 +3,7 @@
'name' => 'topthink/think',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '042bd8eab43a51dd81405639a757e8b07aa84ce6',
'reference' => 'a2ad5cb8bd02b7c4e35edb13a3a18b968e4ae3ae',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -295,7 +295,7 @@
'topthink/think' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '042bd8eab43a51dd81405639a757e8b07aa84ce6',
'reference' => 'a2ad5cb8bd02b7c4e35edb13a3a18b968e4ae3ae',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2023-07-17 17:36:46
// This file is automatically generated at:2023-07-18 16:34:37
declare (strict_types = 1);
return array (
0 => 'think\\captcha\\CaptchaService',