1.9.5
This commit is contained in:
parent
5a6a54c887
commit
563a01e3fa
@ -3,8 +3,6 @@
|
|||||||
> TaoLer是一个简单迅捷的轻论坛系统,适用于个人或组织区域型信息交流发布平台。
|
> TaoLer是一个简单迅捷的轻论坛系统,适用于个人或组织区域型信息交流发布平台。
|
||||||
|
|
||||||
* 官网:https://www.aieok.com
|
* 官网:https://www.aieok.com
|
||||||
* 版本:TaoLer 1.9.4
|
|
||||||
* 日期:2022.4.24
|
|
||||||
|
|
||||||
webman版新架构已适配90%
|
webman版新架构已适配90%
|
||||||
|
|
||||||
|
@ -79,8 +79,9 @@ class AuthAccess extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
//管理员权限编辑
|
//管理员权限编辑
|
||||||
public function edit($id)
|
public function edit()
|
||||||
{
|
{
|
||||||
|
$id = input('id');
|
||||||
if(Request::isAjax()){
|
if(Request::isAjax()){
|
||||||
$data = Request::only(['id','uid','group_id']);
|
$data = Request::only(['id','uid','group_id']);
|
||||||
//检测重复权限
|
//检测重复权限
|
||||||
@ -98,7 +99,7 @@ class AuthAccess extends AdminController
|
|||||||
return json($res);
|
return json($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
$access = Db::name('auth_group_access')->group('uid')->find($id);
|
$access = Db::name('auth_group_access')->find($id);
|
||||||
$admins = Db::name('admin')->field('id,username')->where('delete_time',0)->select();
|
$admins = Db::name('admin')->field('id,username')->where('delete_time',0)->select();
|
||||||
$auth_groups = Db::name('auth_group')->field('id,title')->select();
|
$auth_groups = Db::name('auth_group')->field('id,title')->select();
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: TaoLer <alipey_tao@qq.com>
|
* @Author: TaoLer <alipey_tao@qq.com>
|
||||||
* @Date: 2022-04-13 09:54:31
|
* @Date: 2022-04-13 09:54:31
|
||||||
* @LastEditTime: 2022-04-24 08:44:53
|
* @LastEditTime: 2022-04-27 14:20:06
|
||||||
* @LastEditors: TaoLer
|
* @LastEditors: TaoLer
|
||||||
* @Description: 搜索引擎SEO优化设置
|
* @Description: 搜索引擎SEO优化设置
|
||||||
* @FilePath: \TaoLer\app\admin\controller\Seo.php
|
* @FilePath: \TaoLer\app\admin\controller\Seo.php
|
||||||
@ -128,7 +128,7 @@ class Seo extends AdminController
|
|||||||
$flag= true;
|
$flag= true;
|
||||||
// 写ID
|
// 写ID
|
||||||
$w_id = '';
|
$w_id = '';
|
||||||
// 新文件编号
|
// 生成新文件编号,防止重复写入,
|
||||||
$i = 1;
|
$i = 1;
|
||||||
// 获取public下所有xml文件
|
// 获取public下所有xml文件
|
||||||
$newFile = $this->getXmlFile(public_path());
|
$newFile = $this->getXmlFile(public_path());
|
||||||
@ -228,7 +228,7 @@ class Seo extends AdminController
|
|||||||
return json(['code'=>-1,'msg'=>'写xml配置失败']);
|
return json(['code'=>-1,'msg'=>'写xml配置失败']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return json(['code'=>0,'msg'=>'生成xml成功']);
|
return json(['code'=>0,'msg'=>'本次成功生成'.count($artAllId).'条xml']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -313,4 +313,31 @@ class Seo extends AdminController
|
|||||||
return json(['code'=>0,'msg'=>'删除成功']);
|
return json(['code'=>0,'msg'=>'删除成功']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function searchLog()
|
||||||
|
{
|
||||||
|
$time = input('search_time');
|
||||||
|
$logPath = app()->getRootPath().'runtime/log/browse/'.$time.'.log';
|
||||||
|
$logPath = str_replace('\\','/',$logPath);
|
||||||
|
if(!file_exists($logPath)) return json(['code'=>-1,'msg'=>'还没有要分析的日志哦']);
|
||||||
|
$log = file_get_contents($logPath);
|
||||||
|
$log = preg_replace('/\[info\][^\n]*compatible;/', '', $log);
|
||||||
|
|
||||||
|
// 正则蜘蛛
|
||||||
|
preg_match_all('/(.*?)(?:bingbot|Googlebot|Baiduspider|SemrushBot|AhrefsBot|MJ12bot)+[^\n]*\r?\n/',$log,$arr);
|
||||||
|
|
||||||
|
$string = '';
|
||||||
|
foreach($arr[0] as $str) {
|
||||||
|
$str = preg_replace('/\[(.*?)T/', '', $str);
|
||||||
|
$str = preg_replace('/\+08:00\]/', '', $str);
|
||||||
|
$string .= preg_replace('/\/(.*?)\)/', '', $str);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strlen($string)) {
|
||||||
|
return json(['code'=>0,'msg'=>'分析成功','data'=>$string]);
|
||||||
|
} else {
|
||||||
|
return json(['code'=>-1,'msg'=>'还没有蜘蛛来哦']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -6,9 +6,7 @@
|
|||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">管理员筛选</div>
|
||||||
管理员筛选
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<select name="uid" lay-filter="LAY-admin-group-type">
|
<select name="uid" lay-filter="LAY-admin-group-type">
|
||||||
<option value="">全部用户</option>
|
<option value="">全部用户</option>
|
||||||
@ -156,7 +154,7 @@
|
|||||||
type: 2
|
type: 2
|
||||||
,title: '添加权限'
|
,title: '添加权限'
|
||||||
,content: 'add.html'
|
,content: 'add.html'
|
||||||
,area: ['400px', '300px']
|
,area: ['450px', '400px']
|
||||||
,btn: ['确定', '取消']
|
,btn: ['确定', '取消']
|
||||||
,yes: function(index, layero){
|
,yes: function(index, layero){
|
||||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||||
@ -168,7 +166,7 @@
|
|||||||
//提交 Ajax 成功后,静态更新表格中的数据
|
//提交 Ajax 成功后,静态更新表格中的数据
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"post",
|
||||||
url:"{:url('admin/AuthAccess/add')}",
|
url:"{:url('AuthAccess/add')}",
|
||||||
data:field,
|
data:field,
|
||||||
daType:"json",
|
daType:"json",
|
||||||
success:function (data){
|
success:function (data){
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<li lay-id="map">站点地图</li>
|
<li lay-id="map">站点地图</li>
|
||||||
<li lay-id="robots">robots</li>
|
<li lay-id="robots">robots</li>
|
||||||
<li lay-id="push_js">自动提交</li>
|
<li lay-id="push_js">自动提交</li>
|
||||||
|
<li lay-id="search_show">蜘蛛分析</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="layui-tab-content">
|
<div class="layui-tab-content">
|
||||||
<div class="layui-tab-item">
|
<div class="layui-tab-item">
|
||||||
@ -176,6 +177,27 @@
|
|||||||
</div>
|
</div>
|
||||||
{/volist}
|
{/volist}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="layui-tab-item">
|
||||||
|
<div class="layui-form" wid100 lay-filter="search_show">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">选择时间</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="search_time" id="search_time" required lay-verify="required" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<button class="layui-btn layui-btn-danger" lay-submit lay-filter="search_show_submit">开始分析</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">分析结果</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<textarea type="text" name="search_list" placeholder="搜索引擎抓取结果" class="layui-textarea" style="height: 600px;"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -196,10 +218,19 @@
|
|||||||
base: '/static/admin/' //静态资源所在路径
|
base: '/static/admin/' //静态资源所在路径
|
||||||
}).extend({
|
}).extend({
|
||||||
index: 'lib/index' //主入口模块
|
index: 'lib/index' //主入口模块
|
||||||
}).use(['index'], function(){
|
}).use(['index', 'laydate'], function(){
|
||||||
var $ = layui.$
|
var $ = layui.$
|
||||||
,form = layui.form
|
,form = layui.form
|
||||||
var element =layui.element ;
|
var element =layui.element ;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
|
||||||
|
//执行一个laydate实例
|
||||||
|
laydate.render({
|
||||||
|
elem: '#search_time' //指定元素
|
||||||
|
,type: 'date'
|
||||||
|
,format: 'yyyyMM/dd'
|
||||||
|
,value: new Date()
|
||||||
|
});
|
||||||
|
|
||||||
// baidu push
|
// baidu push
|
||||||
form.on('submit(search_push)', function(data){
|
form.on('submit(search_push)', function(data){
|
||||||
@ -291,6 +322,22 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 搜索引擎分析
|
||||||
|
form.on('submit(search_show_submit)', function(data){
|
||||||
|
var field = data.field;
|
||||||
|
$.post("{:url('seo/searchLog')}",field,function(res){
|
||||||
|
if(res.code == 0){
|
||||||
|
layer.msg(res.msg,{icon:6,tiye:2000},function(){
|
||||||
|
$("textarea[name='search_list']").html(res.data);
|
||||||
|
//location.reload();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.open({title:"添加失败",content:res.msg,icon:5,anim:6});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
// 显示当前tab
|
// 显示当前tab
|
||||||
if(location.hash){
|
if(location.hash){
|
||||||
element.tabChange('seo-tabs-brief', location.hash.replace(/^#/, ''));
|
element.tabChange('seo-tabs-brief', location.hash.replace(/^#/, ''));
|
||||||
|
@ -92,7 +92,7 @@ function getCateDesc($ename)
|
|||||||
function getArtContent($content)
|
function getArtContent($content)
|
||||||
{
|
{
|
||||||
// 过滤音视频图片
|
// 过滤音视频图片
|
||||||
$content = preg_replace('/[(img)|(audio)|(video)]+(\(\S+\))?\[\S+\]/','',$content);
|
$content = preg_replace('/(?:img|audio|video)(\(\S+\))?\[\S+\]/','',$content);
|
||||||
$content = preg_replace('/\s*/','',$content);
|
$content = preg_replace('/\s*/','',$content);
|
||||||
$content = preg_replace('/\[[^\]]+\]/','',$content);
|
$content = preg_replace('/\[[^\]]+\]/','',$content);
|
||||||
return mb_substr(strip_tags($content),0,150).'...';
|
return mb_substr(strip_tags($content),0,150).'...';
|
||||||
|
@ -234,13 +234,13 @@ class SetArr
|
|||||||
preg_match($k_arr,$this->str,$k_arr);
|
preg_match($k_arr,$this->str,$k_arr);
|
||||||
//$k_arr[0]
|
//$k_arr[0]
|
||||||
$k_arr = preg_replace('/[\s|\'|>]/', '', $k_arr[0]);
|
$k_arr = preg_replace('/[\s|\'|>]/', '', $k_arr[0]);
|
||||||
dump($k_arr);
|
//dump($k_arr);
|
||||||
$k_ar = eval('$'.$k_arr);
|
$k_ar = eval('$'.$k_arr);
|
||||||
$n = $this->getArrSonCount($k_ar);
|
$n = $this->getArrSonCount($k_ar);
|
||||||
dump($n);
|
//dump($n);
|
||||||
$kpats = $this->getArrSonCount(config($this->configName.'.'.$k)) ? '/\''.$k.'\'\s*=>\s*\[[^\[|\]]*,\r?\n/' : '/\''.$k.'\'\s*=>\s*\[\r?\n/';
|
$kpats = $this->getArrSonCount(config($this->configName.'.'.$k)) ? '/\''.$k.'\'\s*=>\s*\[[^\[|\]]*,\r?\n/' : '/\''.$k.'\'\s*=>\s*\[\r?\n/';
|
||||||
preg_match($kpats,$this->str,$arrk);
|
preg_match($kpats,$this->str,$arrk);
|
||||||
dump($k,$kpats,$this->str,$arrk);
|
//dump($k,$kpats,$this->str,$arrk);
|
||||||
if(!is_int($kk)) {
|
if(!is_int($kk)) {
|
||||||
if(array_key_exists($kk,config($this->configName.'.'.$k))) {
|
if(array_key_exists($kk,config($this->configName.'.'.$k))) {
|
||||||
echo $kk.'不能添加已存在的配置项kk';
|
echo $kk.'不能添加已存在的配置项kk';
|
||||||
|
@ -419,7 +419,7 @@ layui.define(['table', 'form'], function(exports){
|
|||||||
type: 2
|
type: 2
|
||||||
,title: '编辑用户权限'
|
,title: '编辑用户权限'
|
||||||
,content: authAccessEdit +'?id='+ data.id
|
,content: authAccessEdit +'?id='+ data.id
|
||||||
,area: ['350px', '420px']
|
,area: ['450px', '420px']
|
||||||
,btn: ['确定', '取消']
|
,btn: ['确定', '取消']
|
||||||
,yes: function(index, layero){
|
,yes: function(index, layero){
|
||||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||||
|
@ -12,7 +12,7 @@ var compressImage = {
|
|||||||
//obj.preview(function(index, file, result){
|
//obj.preview(function(index, file, result){
|
||||||
|
|
||||||
//执行实例
|
//执行实例
|
||||||
|
var index = layer.load(1);
|
||||||
var files = obj.pushFile();
|
var files = obj.pushFile();
|
||||||
var filesArry = [];
|
var filesArry = [];
|
||||||
for (var key in files) { //将上传的文件转为数组形式
|
for (var key in files) { //将上传的文件转为数组形式
|
||||||
|
4
vendor/composer/installed.php
vendored
4
vendor/composer/installed.php
vendored
@ -5,7 +5,7 @@
|
|||||||
'type' => 'project',
|
'type' => 'project',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'reference' => 'bf441719f29b5b109daebc5b9ededd8da8914773',
|
'reference' => '55487e7d9d3d67406b0dbe02896d285923cec456',
|
||||||
'name' => 'taoser/taoler',
|
'name' => 'taoser/taoler',
|
||||||
'dev' => true,
|
'dev' => true,
|
||||||
),
|
),
|
||||||
@ -160,7 +160,7 @@
|
|||||||
'type' => 'project',
|
'type' => 'project',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'reference' => 'bf441719f29b5b109daebc5b9ededd8da8914773',
|
'reference' => '55487e7d9d3d67406b0dbe02896d285923cec456',
|
||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'taoser/think-addons' => array(
|
'taoser/think-addons' => array(
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2022-04-24 09:15:39
|
// This file is automatically generated at:2022-04-27 14:39:58
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'taoser\\addons\\Service',
|
0 => 'taoser\\addons\\Service',
|
||||||
|
Loading…
Reference in New Issue
Block a user