网站设置域名验证/授权/升级修复

This commit is contained in:
toogee 2021-03-12 22:33:31 +08:00
parent 1551f81424
commit 45ece2f8e5
6 changed files with 11 additions and 11 deletions

View File

@ -24,7 +24,7 @@ class Set extends AdminController
{
$mailserver = MailServer::find(1);
$sysInfo = Db::name('system')->find(1);
$syscy = $this->cyCheck($sysInfo['base_url']);
$syscy = $this->cyCheck($sysInfo['base_url'],$sysInfo['domain']);
$template = Files::getDirName('../view');
View::assign(['sysInfo'=>$sysInfo,'syscy'=>$syscy,'mailserver'=>$mailserver,'template'=>$template]);
return View::fetch('set/system/website');

View File

@ -143,7 +143,7 @@ class Upgrade extends AdminController
$version_num = $versions->version;
$file_url = $versions->src;
halt($version_num);
//判断远程文件是否可用存在
$header = get_headers($file_url, true);
if(!isset($header[0]) && (strpos($header[0], '200') || strpos($header[0], '304'))){
@ -166,7 +166,7 @@ class Upgrade extends AdminController
}
//记录下日志
Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'20%','msg'=>'上传升级包成功!']);
/*
/**/
//升级前备份代码
$ex = array('.git','.idea','runtime','data','addons','config','extend'); // 排除备份文件夹
$backup_code_res = Files::copydirs('../', $this->backup_dir, $ex);
@ -176,7 +176,7 @@ class Upgrade extends AdminController
}
Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'30%','msg'=>'执行文件备份成功!']);
*/
//执行升级
$upres = $this->execute_update($package_file);
//更新版本
@ -186,8 +186,8 @@ class Upgrade extends AdminController
'version' => $version_num
];
$setconf = new SetConf;
$res = $setconf->setconfig('taoler',$value);
var_dump($res);
$upres = $setconf->setconfig('taoler',$value);
if($upres){
return json(["code"=>0,"msg"=>"升级成功"]);
}else {

View File

@ -1,6 +1,6 @@
{extend name="public/base" /}
{block name="title"}登入 - TaoilSys加油站管理系统{/block}
{block name="title"}登入 - TaolerCMS管理系统{/block}
{block name="css"}<link rel="stylesheet" href="/static/admin/style/login.css" media="all">{/block}
{block name="body"}
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">

View File

@ -24,7 +24,7 @@
<div class="layui-form-item">
<label class="layui-form-label">网站域名</label>
<div class="layui-input-block">
<input type="text" name="" lay-verify="url" value="{$sysInfo.domain}" readonly class="layui-input layui-disabled">
<input type="text" value="{$sysInfo.domain}" readonly class="layui-input layui-disabled">
</div>
</div>
<div class="layui-form-item">

View File

@ -107,9 +107,9 @@ abstract class AdminController
}
protected function cyCheck($url)
protected function cyCheck($url,$d)
{
$url = $url.'?u='.Request::domain();
$url = $url.'?u='.$d;
$cy = Api::urlGet($url);
if($cy && $cy->code == 0){
$cylevel = $cy->level;

View File

@ -499,7 +499,7 @@ CREATE TABLE `tao_system` (
-- ----------------------------
-- Records of tao_system
-- ----------------------------
INSERT INTO `tao_system` VALUES ('1', 'TaoLer社区演示站', '轻论坛系统', 'http://www.xxx.com', 'taoler', '/storage/logo/logo.png', '10', '2048', 'png|gif|jpg|jpeg|zip|rarr', '<a href=\"http://www.aieok.com\" target=\"_blank\">aieok.com 版权所有</a>', 'TaoLer,轻社区系统,bbs,论坛,Thinkphp6,layui,fly模板,', '这是一个Taoler轻社区论坛系统', '1', '1', '1', '0.0.0.0', '管理员|admin|审核员|超级|垃圾', '1.6.3', '', 'http://api.aieok.com', 'http://api.aieok.com/v1/index/cy', 'http://api.aieok.com/v1/upload/check', 'http://api.aieok.com/v1/upload/api', '1581221008', '1577419197');
INSERT INTO `tao_system` VALUES ('1', 'TaoLer社区演示站', '轻论坛系统', 'http://www.xxx.com', 'taoler', '/storage/logo/logo.png', '10', '2048', 'png|gif|jpg|jpeg|zip|rarr', '<a href=\"http://www.aieok.com\" target=\"_blank\">aieok.com 版权所有</a>', 'TaoLer,轻社区系统,bbs,论坛,Thinkphp6,layui,fly模板,', '这是一个Taoler轻社区论坛系统', '1', '1', '1', '0.0.0.0', '管理员|admin|审核员|超级|垃圾', '1.6.3', '', 'http://api.aieok.com', 'http://api.aieok.com/v1/cy', 'http://api.aieok.com/v1/upload/check', 'http://api.aieok.com/v1/upload/api', '1581221008', '1577419197');
-- ----------------------------
-- Table structure for tao_user