diff --git a/app/admin/controller/Admin.php b/app/admin/controller/Admin.php index 2dd3b5d..6c40a4b 100644 --- a/app/admin/controller/Admin.php +++ b/app/admin/controller/Admin.php @@ -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("密码不正确!"); } diff --git a/app/index/controller/Base.php b/app/index/controller/Base.php index 8c8c751..3ffe689 100644 --- a/app/index/controller/Base.php +++ b/app/index/controller/Base.php @@ -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'); +// } } /** diff --git a/config/app.php b/config/app.php index 313fc2a..8fa7472 100644 --- a/config/app.php +++ b/config/app.php @@ -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访问的应用列表(自动多应用模式有效) diff --git a/config/cache.php b/config/cache.php index ffd1ed6..8a6771e 100644 --- a/config/cache.php +++ b/config/cache.php @@ -35,7 +35,7 @@ return [ // 密码 'password' => env('redis.password',''), // 位置 - 'select' => 6, + 'select' => '0', // 链接超时 'timeout' => 0, // 有效期 diff --git a/public/index.php b/public/index.php index 499ef54..ff67549 100644 --- a/public/index.php +++ b/public/index.php @@ -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应用并响应 diff --git a/public/nginx.htaccess b/public/nginx.htaccess index be426e9..c540608 100644 --- a/public/nginx.htaccess +++ b/public/nginx.htaccess @@ -1,4 +1,4 @@ if (!-e $request_filename) { - rewrite ^(.*)$ /index.php?s=$1 last; + rewrite ^(.*)$ /index.php?s=/$1 last; break; } \ No newline at end of file diff --git a/public/template/default/pc/index/index.html b/public/template/default/pc/index/index.html index 48a5132..d60a61c 100644 --- a/public/template/default/pc/index/index.html +++ b/public/template/default/pc/index/index.html @@ -7,6 +7,17 @@ {include file="public/head" /} + + @@ -22,7 +33,7 @@
{zz:banner pagesize="5" typeid="$cid"}
- + {$field['title']}
@@ -76,9 +87,30 @@
-
最新文章 -
-
+
最新文章
+
wordpress
+
JavaScript
+
绿化破解
+
+