This commit is contained in:
liyukun 2021-07-15 12:43:03 +08:00
parent 9c53d73287
commit d51968fa65
8 changed files with 62 additions and 23 deletions

View File

@ -182,7 +182,8 @@ class Admin extends AuthController
['newpwd','']
]);
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("密码不正确!");
}

View File

@ -26,13 +26,13 @@ class Base extends BaseController
$pvLogModel->set_view();
}
//判断是否开启了伪静态
if (web_config('web_rewrite')=='0') {
$this->request->setRoot('/?s=');
} elseif(web_config('web_rewrite')=='1') {
$this->request->setRoot('/');
} else {
$this->request->setRoot('/index.php');
}
// if (web_config('web_rewrite')=='0') {
// $this->request->setRoot('/?s=');
// } elseif(web_config('web_rewrite')=='1') {
// $this->request->setRoot('/');
// } else {
// $this->request->setRoot('/index.php');
// }
}
/**

View File

@ -25,7 +25,7 @@ return [
// 自动多应用模式
'auto_multi_app' => true,
// 应用映射(自动多应用模式有效)
'app_map' => ['*'=>'', 'admin'=>'admin', 'index'=>'index'],
'app_map' => ['*'=>'', 'api'=>'api', 'admin'=>'admin', 'index'=>'index'],
// 域名绑定(自动多应用模式有效)
'domain_bind' => [],
// 禁止URL访问的应用列表自动多应用模式有效

View File

@ -35,7 +35,7 @@ return [
// 密码
'password' => env('redis.password',''),
// 位置
'select' => 6,
'select' => '0',
// 链接超时
'timeout' => 0,
// 有效期

View File

@ -13,6 +13,7 @@
namespace think;
//检测系统
/*
if(file_exists("./install/") && !file_exists("./install/install.lock")){
if($_SERVER['PHP_SELF'] != '/index.php'){
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');
exit();
}
*/
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应

View File

@ -1,4 +1,4 @@
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}

View File

@ -7,6 +7,17 @@
{include file="public/head" /}
<link rel="stylesheet" href="__LIB__/swiper/swiper.min.css">
<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>
<body>
@ -22,7 +33,7 @@
<div class="swiper-wrapper">
{zz:banner pagesize="5" typeid="$cid"}
<div class="swiper-slide">
<a href="{$field['url']}" target="">
<a href="{$field['url']}" target="_blank">
<img src="{$field['image']}" alt="{$field['title']}">
</a>
</div>
@ -76,9 +87,30 @@
<div class="post-list-page-plane">
<div class="list-plane-title">
<div class="index-tab-plane">
<div class="" catid="0">最新文章
</div>
</div>
<div class="index-tab-item index-tab-item-active" catid="0">最新文章</div>
<div class="index-tab-item" catid="6">wordpress</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>
<ul class="post-list">
{zz:list orderby="create_time desc" type="where"}
@ -86,7 +118,7 @@
<div class="post-item-container">
<div class="post-item-thumbnail">
<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>
</div>
<div class="post-item-tags">
@ -126,7 +158,7 @@
<script>
var paged = 2;
var max_page = 5;
var max_page =6;
$('.index-load-more-btn').click(() => {
var btn_cloass = '.index-load-more-btn';
if (paged >= max_page) {
@ -134,7 +166,7 @@
return;
}
$(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',
page: paged,
cat: $('.index-tab-item-active').attr('catid')
@ -146,7 +178,7 @@
$(btn_cloass).html('<i class="far fa-circle-notch"></i> 加载更多');
}
$('.post-list').append(data);
paged++;
$("img").lazyload({effect: "fadeIn"}); paged++;
})
})
@ -350,7 +382,7 @@
copylen: 10,
addurl: 0
}
document.body.oncopy = function () {
reprint.open=1;reprint.msg="复制成功,转载请保留本站链接"; document.body.oncopy = function () {
var copytext = window.getSelection().toString();
if (copynotmsg == 0) {
if (reprint.open == 1) {
@ -377,7 +409,7 @@
if (content.length > 100) {
addarelt(reprint.msg, 'succ');
JScopyText(content + '\n 【来源https://www.zyxpp.com:443/,转载请注明】');
JScopyText(content + '\n 【来源https://www.lovestu.com:443/,转载请注明】');
} else {
addarelt(reprint.msg, 'succ');

View File

@ -47,7 +47,7 @@
<h2>搜索内容</h2>
<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="">
<input type="text" class="search-keyword" name="tag" placeholder="搜索内容" value="">
</div>
<div>
<button type="submit" class="search-submit" value="&#xf002;">搜索</button>
@ -58,7 +58,7 @@
<div class="header-menu">
<div class="menu-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"}
<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']"}
@ -84,6 +84,10 @@
<div class="user-menu-pc-search" onclick="openSearch()" title="搜索">
<i class="fal fa-search"></i>
</div>
<span class="user-menu-main">
<a href="login.html"><button class="login-btn-header">登录</button></a>
</span>
</div>
</div>
</div>