mirror of https://github.com/1099438829/apeblog
This commit is contained in:
parent
9c53d73287
commit
d51968fa65
|
|
@ -182,7 +182,8 @@ class Admin extends AuthController
|
||||||
['newpwd','']
|
['newpwd','']
|
||||||
]);
|
]);
|
||||||
if ($data['oldpwd'] == '' || $data['newpwd'] == '') return app("json")->fail("参数有误,新旧密码为空!");
|
if ($data['oldpwd'] == '' || $data['newpwd'] == '') return app("json")->fail("参数有误,新旧密码为空!");
|
||||||
if ($this->adminInfo['pwd'] == md5(md5($data['oldpwd']))) return aModel::update(['pwd'=>md5(md5($data['newpwd']))],['id'=>$this->adminId]) ? app("json")->success("操作成功") : app("json")->fail("操作失败");
|
$adminInfo = aModel::get($this->adminId);
|
||||||
|
if ($adminInfo['pwd'] == md5(md5($data['oldpwd']))) return aModel::update(['pwd'=>md5(md5($data['newpwd']))],['id'=>$this->adminId]) ? app("json")->success("操作成功") : app("json")->fail("操作失败");
|
||||||
return app("json")->fail("密码不正确!");
|
return app("json")->fail("密码不正确!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,13 +26,13 @@ class Base extends BaseController
|
||||||
$pvLogModel->set_view();
|
$pvLogModel->set_view();
|
||||||
}
|
}
|
||||||
//判断是否开启了伪静态
|
//判断是否开启了伪静态
|
||||||
if (web_config('web_rewrite')=='0') {
|
// if (web_config('web_rewrite')=='0') {
|
||||||
$this->request->setRoot('/?s=');
|
// $this->request->setRoot('/?s=');
|
||||||
} elseif(web_config('web_rewrite')=='1') {
|
// } elseif(web_config('web_rewrite')=='1') {
|
||||||
$this->request->setRoot('/');
|
// $this->request->setRoot('/');
|
||||||
} else {
|
// } else {
|
||||||
$this->request->setRoot('/index.php');
|
// $this->request->setRoot('/index.php');
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ return [
|
||||||
// 自动多应用模式
|
// 自动多应用模式
|
||||||
'auto_multi_app' => true,
|
'auto_multi_app' => true,
|
||||||
// 应用映射(自动多应用模式有效)
|
// 应用映射(自动多应用模式有效)
|
||||||
'app_map' => ['*'=>'', 'admin'=>'admin', 'index'=>'index'],
|
'app_map' => ['*'=>'', 'api'=>'api', 'admin'=>'admin', 'index'=>'index'],
|
||||||
// 域名绑定(自动多应用模式有效)
|
// 域名绑定(自动多应用模式有效)
|
||||||
'domain_bind' => [],
|
'domain_bind' => [],
|
||||||
// 禁止URL访问的应用列表(自动多应用模式有效)
|
// 禁止URL访问的应用列表(自动多应用模式有效)
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ return [
|
||||||
// 密码
|
// 密码
|
||||||
'password' => env('redis.password',''),
|
'password' => env('redis.password',''),
|
||||||
// 位置
|
// 位置
|
||||||
'select' => 6,
|
'select' => '0',
|
||||||
// 链接超时
|
// 链接超时
|
||||||
'timeout' => 0,
|
'timeout' => 0,
|
||||||
// 有效期
|
// 有效期
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
namespace think;
|
namespace think;
|
||||||
//检测系统
|
//检测系统
|
||||||
|
|
||||||
|
/*
|
||||||
if(file_exists("./install/") && !file_exists("./install/install.lock")){
|
if(file_exists("./install/") && !file_exists("./install/install.lock")){
|
||||||
if($_SERVER['PHP_SELF'] != '/index.php'){
|
if($_SERVER['PHP_SELF'] != '/index.php'){
|
||||||
header("Content-type: text/html; charset=utf-8");
|
header("Content-type: text/html; charset=utf-8");
|
||||||
|
|
@ -21,6 +22,7 @@ if(file_exists("./install/") && !file_exists("./install/install.lock")){
|
||||||
header('Location:/install/index.php');
|
header('Location:/install/index.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
// 执行HTTP应用并响应
|
// 执行HTTP应用并响应
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
if (!-e $request_filename) {
|
if (!-e $request_filename) {
|
||||||
rewrite ^(.*)$ /index.php?s=$1 last;
|
rewrite ^(.*)$ /index.php?s=/$1 last;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -7,6 +7,17 @@
|
||||||
{include file="public/head" /}
|
{include file="public/head" /}
|
||||||
<link rel="stylesheet" href="__LIB__/swiper/swiper.min.css">
|
<link rel="stylesheet" href="__LIB__/swiper/swiper.min.css">
|
||||||
<script src="__LIB__/swiper/swiper.min.js"></script>
|
<script src="__LIB__/swiper/swiper.min.js"></script>
|
||||||
|
<style>.icon {width: 18px; height: 18px;vertical-align: -3px;fill: currentColor;overflow: hidden;}</style><style>html, body, #app {background-image: url('wp-content/uploads/2021/01/light_wool.png')!important;background-position: center center;background-attachment: fixed;}</style> <link rel="icon" href="https://www.lovestu.com/wp-content/uploads/2020/07/code.png" type="image/x-icon">
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--Maincolor: #409EFF !important;
|
||||||
|
--MaincolorHover: #409EFF !important;
|
||||||
|
--fontSelectedColor: #3390ff !important;
|
||||||
|
}
|
||||||
|
#nprogress .bar {
|
||||||
|
background: var(--Maincolor)!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
@ -22,7 +33,7 @@
|
||||||
<div class="swiper-wrapper">
|
<div class="swiper-wrapper">
|
||||||
{zz:banner pagesize="5" typeid="$cid"}
|
{zz:banner pagesize="5" typeid="$cid"}
|
||||||
<div class="swiper-slide">
|
<div class="swiper-slide">
|
||||||
<a href="{$field['url']}" target="">
|
<a href="{$field['url']}" target="_blank">
|
||||||
<img src="{$field['image']}" alt="{$field['title']}">
|
<img src="{$field['image']}" alt="{$field['title']}">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -76,9 +87,30 @@
|
||||||
<div class="post-list-page-plane">
|
<div class="post-list-page-plane">
|
||||||
<div class="list-plane-title">
|
<div class="list-plane-title">
|
||||||
<div class="index-tab-plane">
|
<div class="index-tab-plane">
|
||||||
<div class="" catid="0">最新文章
|
<div class="index-tab-item index-tab-item-active" catid="0">最新文章</div>
|
||||||
</div>
|
<div class="index-tab-item" catid="6">wordpress</div>
|
||||||
</div>
|
<div class="index-tab-item" catid="24">JavaScript</div>
|
||||||
|
<div class="index-tab-item" catid="8">绿化破解</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var nowid = $('.index-tab-item-active').attr('catid');
|
||||||
|
$('.index-tab-item').click(function () {
|
||||||
|
if (nowid == $(this).attr('catid')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
nowid = $(this).attr('catid');
|
||||||
|
paged = 2;
|
||||||
|
$('.index-tab-item').removeClass('index-tab-item-active');
|
||||||
|
$(this).addClass('index-tab-item-active');
|
||||||
|
$('.post-list').html('<div class="post-item post-loading"><i class="far fa-circle-notch fa-spin"></i> 加载中</div>');
|
||||||
|
$.post('https://www.lovestu.com/wp-admin/admin-ajax.php', {
|
||||||
|
action: 'corepress_load_post_by_tabs',
|
||||||
|
cat: $(this).attr('catid')
|
||||||
|
}, function (data) {
|
||||||
|
$('.post-list').html(data);
|
||||||
|
$("img").lazyload({effect: "fadeIn"}); })
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<ul class="post-list">
|
<ul class="post-list">
|
||||||
{zz:list orderby="create_time desc" type="where"}
|
{zz:list orderby="create_time desc" type="where"}
|
||||||
|
|
@ -86,7 +118,7 @@
|
||||||
<div class="post-item-container">
|
<div class="post-item-container">
|
||||||
<div class="post-item-thumbnail">
|
<div class="post-item-thumbnail">
|
||||||
<a href="{$field['url']}" target="_blank">
|
<a href="{$field['url']}" target="_blank">
|
||||||
<img src="{:file_cdn($field['cover_path'])}">
|
<img src="__IMG__/loading.gif" data-original="{:file_cdn($field['cover_path'])}">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="post-item-tags">
|
<div class="post-item-tags">
|
||||||
|
|
@ -126,7 +158,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var paged = 2;
|
var paged = 2;
|
||||||
var max_page = 5;
|
var max_page =6;
|
||||||
$('.index-load-more-btn').click(() => {
|
$('.index-load-more-btn').click(() => {
|
||||||
var btn_cloass = '.index-load-more-btn';
|
var btn_cloass = '.index-load-more-btn';
|
||||||
if (paged >= max_page) {
|
if (paged >= max_page) {
|
||||||
|
|
@ -134,7 +166,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$(btn_cloass).html('<i class="far fa-circle-notch fa-spin"></i> 加载中');
|
$(btn_cloass).html('<i class="far fa-circle-notch fa-spin"></i> 加载中');
|
||||||
$.post('https://www.zyxpp.com/wp-admin/admin-ajax.php', {
|
$.post('https://www.lovestu.com/wp-admin/admin-ajax.php', {
|
||||||
action: 'corepress_load_post',
|
action: 'corepress_load_post',
|
||||||
page: paged,
|
page: paged,
|
||||||
cat: $('.index-tab-item-active').attr('catid')
|
cat: $('.index-tab-item-active').attr('catid')
|
||||||
|
|
@ -146,7 +178,7 @@
|
||||||
$(btn_cloass).html('<i class="far fa-circle-notch"></i> 加载更多');
|
$(btn_cloass).html('<i class="far fa-circle-notch"></i> 加载更多');
|
||||||
}
|
}
|
||||||
$('.post-list').append(data);
|
$('.post-list').append(data);
|
||||||
paged++;
|
$("img").lazyload({effect: "fadeIn"}); paged++;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -350,7 +382,7 @@
|
||||||
copylen: 10,
|
copylen: 10,
|
||||||
addurl: 0
|
addurl: 0
|
||||||
}
|
}
|
||||||
document.body.oncopy = function () {
|
reprint.open=1;reprint.msg="复制成功,转载请保留本站链接"; document.body.oncopy = function () {
|
||||||
var copytext = window.getSelection().toString();
|
var copytext = window.getSelection().toString();
|
||||||
if (copynotmsg == 0) {
|
if (copynotmsg == 0) {
|
||||||
if (reprint.open == 1) {
|
if (reprint.open == 1) {
|
||||||
|
|
@ -377,7 +409,7 @@
|
||||||
|
|
||||||
if (content.length > 100) {
|
if (content.length > 100) {
|
||||||
addarelt(reprint.msg, 'succ');
|
addarelt(reprint.msg, 'succ');
|
||||||
JScopyText(content + '\n 【来源:https://www.zyxpp.com:443/,转载请注明】');
|
JScopyText(content + '\n 【来源:https://www.lovestu.com:443/,转载请注明】');
|
||||||
} else {
|
} else {
|
||||||
addarelt(reprint.msg, 'succ');
|
addarelt(reprint.msg, 'succ');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
<h2>搜索内容</h2>
|
<h2>搜索内容</h2>
|
||||||
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
<form class="search-form" action="{:url('/article/search')}" method="get" role="search">
|
||||||
<div class="search-form-input-plane">
|
<div class="search-form-input-plane">
|
||||||
<input type="text" class="search-keyword" name="kw" placeholder="搜索内容" value="">
|
<input type="text" class="search-keyword" name="tag" placeholder="搜索内容" value="">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="search-submit" value="">搜索</button>
|
<button type="submit" class="search-submit" value="">搜索</button>
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
<div class="header-menu">
|
<div class="header-menu">
|
||||||
<div class="menu-plane">
|
<div class="menu-plane">
|
||||||
<nav class="menu-header-plane">
|
<nav class="menu-header-plane">
|
||||||
<ul id="menu-%e4%b8%8a%e6%96%b9%e5%af%bc%e8%88%aa%e6%a0%8f" class="menu-header-list">
|
<ul id="menu-%e4%b8%8a%e6%96%b9%e5%af%bc%e8%88%aa%e6%a0%8f" class="menu-header-list">
|
||||||
{zz:channel type="top"}
|
{zz:channel type="top"}
|
||||||
<li id="menu-item-{$field.id}" class="menu-item {notempty name="field['child']"}menu-item-has-children{/notempty} {:IsActiveNav($cid,$field['id'])?'current-menu-item':''} menu-item-{$field['id']}">
|
<li id="menu-item-{$field.id}" class="menu-item {notempty name="field['child']"}menu-item-has-children{/notempty} {:IsActiveNav($cid,$field['id'])?'current-menu-item':''} menu-item-{$field['id']}">
|
||||||
{notempty name="field['child']"}
|
{notempty name="field['child']"}
|
||||||
|
|
@ -84,6 +84,10 @@
|
||||||
<div class="user-menu-pc-search" onclick="openSearch()" title="搜索">
|
<div class="user-menu-pc-search" onclick="openSearch()" title="搜索">
|
||||||
<i class="fal fa-search"></i>
|
<i class="fal fa-search"></i>
|
||||||
</div>
|
</div>
|
||||||
|
<span class="user-menu-main">
|
||||||
|
<a href="login.html"><button class="login-btn-header">登录</button></a>
|
||||||
|
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue