This commit is contained in:
tao 2022-08-02 18:49:40 +08:00
parent 563a01e3fa
commit bdf3421b9d
16 changed files with 633 additions and 576 deletions

View File

@ -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-27 14:20:06 * @LastEditTime: 2022-04-29 17:24:47
* @LastEditors: TaoLer * @LastEditors: TaoLer
* @Description: 搜索引擎SEO优化设置 * @Description: 搜索引擎SEO优化设置
* @FilePath: \TaoLer\app\admin\controller\Seo.php * @FilePath: \TaoLer\app\admin\controller\Seo.php
@ -316,26 +316,72 @@ class Seo extends AdminController
public function searchLog() public function searchLog()
{ {
$time = input('search_time'); $time = input('search_time');
$name = input('spider_name');
$logPath = app()->getRootPath().'runtime/log/browse/'.$time.'.log'; $logPath = app()->getRootPath().'runtime/log/browse/'.$time.'.log';
$logPath = str_replace('\\','/',$logPath); $logPath = str_replace('\\','/',$logPath);
if(!file_exists($logPath)) return json(['code'=>-1,'msg'=>'还没有要分析的日志哦']); if(!file_exists($logPath)) {
return json(['code'=>-1,'msg'=>'还没有要分析的日志哦!']);
}
$log = file_get_contents($logPath); $log = file_get_contents($logPath);
$log = preg_replace('/\[info\][^\n]*compatible;/', '', $log); $log = preg_replace('/\[info\][^\n]*compatible;/', '', $log);
// 正则蜘蛛 switch($name) {
preg_match_all('/(.*?)(?:bingbot|Googlebot|Baiduspider|SemrushBot|AhrefsBot|MJ12bot)+[^\n]*\r?\n/',$log,$arr); case 'Baiduspider':
preg_match_all('/(.*?)(?:Baiduspider)+[^\n]*\r?\n/',$log,$arr);
$string = ''; break;
foreach($arr[0] as $str) { case 'Bytespider':
$str = preg_replace('/\[(.*?)T/', '', $str); preg_match_all('/(.*?)(?:Bytespider)+[^\n]*\r?\n/',$log,$arr);
$str = preg_replace('/\+08:00\]/', '', $str); break;
$string .= preg_replace('/\/(.*?)\)/', '', $str); case 'Googlebot':
preg_match_all('/(.*?)(?:Googlebot)+[^\n]*\r?\n/',$log,$arr);
break;
case 'bingbot':
preg_match_all('/(.*?)(?:bingbot)+[^\n]*\r?\n/',$log,$arr);
break;
default:
// 正则全部蜘蛛
preg_match_all('/(.*?)(?:bingbot|Googlebot|Baiduspider|Bytespider|SemrushBot|AhrefsBot|MJ12bot)+[^\n]*\r?\n/',$log,$arr);
} }
if(strlen($string)) { // $string = '';
return json(['code'=>0,'msg'=>'分析成功','data'=>$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'=>'还没有蜘蛛来哦']);
// }
$list = [];
if(count($arr[0])) {
$list['code']= 0;
$list['msg'] = '分析成功';
$list['count'] = count($arr[0]);
foreach($arr[0] as $k =>$str) {
// $str = preg_replace('/\[(.*?)T/', '', $str);
// $str = preg_replace('/\+08:00\]/', '', $str);
// 时间
$str = preg_replace('/\/(.*?)\)/', '', $str);
$ptime = "/([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/";
preg_match($ptime, $str,$at);
$time = str_replace('T',' ',$at[0]);
//$list[$k]['time'] = $time;
// ip
$pip = '/(?:(?:2[0-4][0-9]\.)|(?:25[0-5]\.)|(?:1[0-9][0-9]\.)|(?:[1-9][0-9]\.)|(?:[0-9]\.)){3}(?:(?:2[0-5][0-5])|(?:25[0-5])|(?:1[0-9][0-9])|(?:[1-9][0-9])|(?:[1-9]))/';
preg_match($pip, $str,$aip);
$ip = $aip[0];
// url
$pattern="/(http|https):\/\/.*$/i";
preg_match($pattern, $str,$url);
$list['data'][] = ['id'=>$k + 1, 'time'=>$time, 'name'=>$name, 'ip'=>$ip, 'url'=>$url[0]];
}
return json($list);
} else { } else {
return json(['code'=>-1,'msg'=>'还没有蜘蛛来哦']); return json(['code'=>-1,'msg'=> '没有需要分析的数据']);
} }
} }

View File

@ -186,6 +186,18 @@
<input type="text" name="search_time" id="search_time" required lay-verify="required" autocomplete="off" class="layui-input"> <input type="text" name="search_time" id="search_time" required lay-verify="required" autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
<div class="layui-form-item">
<label class="layui-form-label">选择蜘蛛</label>
<div class="layui-input-inline">
<select type="text" name="spider_name" required lay-verify="required" autocomplete="off" class="layui-input">
<option value="Baiduspider" selected>百度</option>
<option value="Bytespider" >头条</option>
<option value="Googlebot" >谷歌</option>
<option value="bingbot" >bing</option>
<option value="" >全部</option>
</select>
</div>
</div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-input-block"> <div class="layui-input-block">
<button class="layui-btn layui-btn-danger" lay-submit lay-filter="search_show_submit">开始分析</button> <button class="layui-btn layui-btn-danger" lay-submit lay-filter="search_show_submit">开始分析</button>
@ -194,8 +206,10 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">分析结果</label> <label class="layui-form-label">分析结果</label>
<div class="layui-input-block"> <div class="layui-input-block">
<textarea type="text" name="search_list" placeholder="搜索引擎抓取结果" class="layui-textarea" style="height: 600px;"></textarea> <table id="spider" lay-filter="spider"></table>
<!--textarea type="text" name="search_list" placeholder="搜索引擎抓取结果" class="layui-textarea" style="height: 600px;"></textarea-->
</div> </div>
</div> </div>
</div> </div>
@ -218,11 +232,12 @@
base: '/static/admin/' //静态资源所在路径 base: '/static/admin/' //静态资源所在路径
}).extend({ }).extend({
index: 'lib/index' //主入口模块 index: 'lib/index' //主入口模块
}).use(['index', 'laydate'], function(){ }).use(['index', 'laydate', 'table'], function(){
var $ = layui.$ var $ = layui.$
,form = layui.form ,form = layui.form
var element =layui.element ; var element =layui.element ;
var laydate = layui.laydate; var laydate = layui.laydate;
var table = layui.table;
//执行一个laydate实例 //执行一个laydate实例
laydate.render({ laydate.render({
@ -232,6 +247,21 @@
,value: new Date() ,value: new Date()
}); });
//第一个实例
table.render({
elem: '#spider'
,url: "{:url('seo/searchLog')}" //数据接口
,page: true //开启分页
,cols: [[ //表头
{field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'}
,{field: 'time', title: '时间', width:160}
,{field: 'name', title: '名称', width:120, sort: true}
,{field: 'ip', title: 'IP', width:200}
,{field: 'url', title: 'URL', minWidth: 200}
]]
,text: '对不起,加载出现异常!'
});
// baidu push // baidu push
form.on('submit(search_push)', function(data){ form.on('submit(search_push)', function(data){
var field = data.field; var field = data.field;
@ -328,12 +358,15 @@
$.post("{:url('seo/searchLog')}",field,function(res){ $.post("{:url('seo/searchLog')}",field,function(res){
if(res.code == 0){ if(res.code == 0){
layer.msg(res.msg,{icon:6,tiye:2000},function(){ layer.msg(res.msg,{icon:6,tiye:2000},function(){
$("textarea[name='search_list']").html(res.data); //$("textarea[name='search_list']").html(res.data);
//location.reload();
}); });
} else { } else {
layer.open({title:"添加失败",content:res.msg,icon:5,anim:6}); layer.open({title:"添加失败",content:res.msg,icon:5,anim:6});
} }
//执行重载
table.reload('spider', {
where: field
});
}); });
return false; return false;
}); });

View File

@ -8,6 +8,7 @@ use think\facade\Cookie;
use think\facade\Config; use think\facade\Config;
use think\facade\Lang; use think\facade\Lang;
use app\event\UserLogin; use app\event\UserLogin;
use taoler\com\Files;
class User extends Model class User extends Model
{ {
@ -106,20 +107,26 @@ class User extends Model
//注册校验 //注册校验
public function reg($data) public function reg($data)
{ {
//随机存入默认头像 // public/static/res/images/avatar的所有图片
$code = mt_rand('1','11'); $images = Files::getAllFile('static/res/images/avatar');
$data['user_img'] = "/static/res/images/avatar/$code.jpg"; //随机图片
$data['create_time'] = time(); $i = array_rand($images);
$salt = substr(md5($data['create_time']),-6); $img = $images[$i];
$data['password'] = substr_replace(md5($data['password']),$salt,0,6); $data['user_img'] = '/'.str_replace('\\','/',$img);
$data['status'] = Config::get('taoler.config.regist_check'); //随机存入默认头像
$msg = $data['status'] ? '注册成功请登录' : '注册成功,请等待审核'; // $code = mt_rand('1','11');
$result = $this->save($data); // $data['user_img'] = "/static/res/images/avatar/$code.jpg";
if ($result) { $data['create_time'] = time();
return ['code'=>1,'msg'=>$msg]; $salt = substr(md5($data['create_time']),-6);
} else{ $data['password'] = substr_replace(md5($data['password']),$salt,0,6);
return '注册失败'; $data['status'] = Config::get('taoler.config.regist_check');
} $msg = $data['status'] ? '注册成功请登录' : '注册成功,请等待审核';
$result = $this->save($data);
if ($result) {
return ['code'=>1,'msg'=>$msg];
} else{
return '注册失败';
}
} }
//重置密码 //重置密码
@ -155,7 +162,6 @@ class User extends Model
$user = $this->find($data['user_id']); $user = $this->find($data['user_id']);
$salt = substr(md5($user['create_time']),-6); $salt = substr(md5($user['create_time']),-6);
$pwd = substr_replace(md5($data['nowpass']),$salt,0,6); $pwd = substr_replace(md5($data['nowpass']),$salt,0,6);
//原注册密码加密规则
$data['nowpass'] = md5($pwd); $data['nowpass'] = md5($pwd);
$result = $data['nowpass'] == $user['password']; $result = $data['nowpass'] == $user['password'];
if(!$result){ if(!$result){

12
composer.lock generated
View File

@ -1602,16 +1602,16 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v4.4.39", "version": "v4.4.41",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "35237c5e5dcb6593a46a860ba5b29c1d4683d80e" "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/35237c5e5dcb6593a46a860ba5b29c1d4683d80e", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/58eb36075c04aaf92a7a9f38ee9a8b97e24eb481",
"reference": "35237c5e5dcb6593a46a860ba5b29c1d4683d80e", "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1671,7 +1671,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v4.4.39" "source": "https://github.com/symfony/var-dumper/tree/v4.4.41"
}, },
"funding": [ "funding": [
{ {
@ -1687,7 +1687,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-02-25T10:38:15+00:00" "time": "2022-04-25T21:15:06+00:00"
}, },
{ {
"name": "topthink/think-trace", "name": "topthink/think-trace",

View File

@ -464,7 +464,7 @@ body .layui-edit-face .layui-layer-content{padding:0; background-color:#fff; co
.detail-hits .layui-btn{border-radius: 0;} .detail-hits .layui-btn{border-radius: 0;}
.detail-hits .layui-btn+.layui-btn{margin-left: 5px;} .detail-hits .layui-btn+.layui-btn{margin-left: 5px;}
.detail-hits .jie-admin{margin-right: 1px;} .detail-hits .jie-admin{margin-right: 1px;}
.detail-body{margin: 10px 0 0; min-height: 306px; line-height: 26px; font-size: 16px; color: #333; word-wrap: break-word;} .detail-body{margin: 10px 0 0; min-height: 50px; line-height: 26px; font-size: 16px; color: #333; word-wrap: break-word;}
.detail-body p{margin-bottom:15px;} .detail-body p{margin-bottom:15px;}
.detail-body img{max-width: 100%; cursor: pointer;} .detail-body img{max-width: 100%; cursor: pointer;}
/* /*

View File

@ -12,7 +12,6 @@ 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) { //将上传的文件转为数组形式

File diff suppressed because it is too large Load Diff

View File

@ -1045,17 +1045,17 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v4.4.39", "version": "v4.4.41",
"version_normalized": "4.4.39.0", "version_normalized": "4.4.41.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "35237c5e5dcb6593a46a860ba5b29c1d4683d80e" "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/35237c5e5dcb6593a46a860ba5b29c1d4683d80e", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/58eb36075c04aaf92a7a9f38ee9a8b97e24eb481",
"reference": "35237c5e5dcb6593a46a860ba5b29c1d4683d80e", "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1079,7 +1079,7 @@
"ext-intl": "To show region name in time zone dump", "ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
}, },
"time": "2022-02-25T10:38:15+00:00", "time": "2022-04-25T21:15:06+00:00",
"bin": [ "bin": [
"Resources/bin/var-dump-server" "Resources/bin/var-dump-server"
], ],
@ -1117,7 +1117,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v4.4.39" "source": "https://github.com/symfony/var-dumper/tree/v4.4.41"
}, },
"funding": [ "funding": [
{ {

View File

@ -5,7 +5,7 @@
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '55487e7d9d3d67406b0dbe02896d285923cec456', 'reference' => 'bb712c71c521dd5acc4656bb49ff90285de07458',
'name' => 'taoser/taoler', 'name' => 'taoser/taoler',
'dev' => true, 'dev' => true,
), ),
@ -146,12 +146,12 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'symfony/var-dumper' => array( 'symfony/var-dumper' => array(
'pretty_version' => 'v4.4.39', 'pretty_version' => 'v4.4.41',
'version' => '4.4.39.0', 'version' => '4.4.41.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-dumper', 'install_path' => __DIR__ . '/../symfony/var-dumper',
'aliases' => array(), 'aliases' => array(),
'reference' => '35237c5e5dcb6593a46a860ba5b29c1d4683d80e', 'reference' => '58eb36075c04aaf92a7a9f38ee9a8b97e24eb481',
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'taoser/taoler' => array( 'taoser/taoler' => array(
@ -160,7 +160,7 @@
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '55487e7d9d3d67406b0dbe02896d285923cec456', 'reference' => 'bb712c71c521dd5acc4656bb49ff90285de07458',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'taoser/think-addons' => array( 'taoser/think-addons' => array(

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2022-04-27 14:39:58 // This file is automatically generated at:2022-04-29 17:39:41
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'taoser\\addons\\Service', 0 => 'taoser\\addons\\Service',

View File

@ -1,4 +1,5 @@
<?php <?php
/* /*
* This file is part of the Symfony package. * This file is part of the Symfony package.
* *

View File

@ -46,8 +46,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
{ {
$this->flags = $flags; $this->flags = $flags;
$this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8');
$this->decimalPoint = localeconv(); $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point'];
$this->decimalPoint = $this->decimalPoint['decimal_point'];
$this->setOutput($output ?: static::$defaultOutput); $this->setOutput($output ?: static::$defaultOutput);
if (!$output && \is_string(static::$defaultOutput)) { if (!$output && \is_string(static::$defaultOutput)) {
static::$defaultOutput = $this->outputStream; static::$defaultOutput = $this->outputStream;
@ -122,8 +121,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
*/ */
public function dump(Data $data, $output = null) public function dump(Data $data, $output = null)
{ {
$this->decimalPoint = localeconv(); $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point'];
$this->decimalPoint = $this->decimalPoint['decimal_point'];
if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) { if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) {
setlocale(\LC_NUMERIC, 'C'); setlocale(\LC_NUMERIC, 'C');

View File

@ -371,7 +371,7 @@ return function (root, x) {
if (/\bsf-dump-toggle\b/.test(a.className)) { if (/\bsf-dump-toggle\b/.test(a.className)) {
e.preventDefault(); e.preventDefault();
if (!toggle(a, isCtrlKey(e))) { if (!toggle(a, isCtrlKey(e))) {
var r = doc.getElementById(a.getAttribute('href').substr(1)), var r = doc.getElementById(a.getAttribute('href').slice(1)),
s = r.previousSibling, s = r.previousSibling,
f = r.parentNode, f = r.parentNode,
t = a.parentNode; t = a.parentNode;
@ -438,7 +438,7 @@ return function (root, x) {
toggle(a); toggle(a);
} }
} else if (/\bsf-dump-ref\b/.test(elt.className) && (a = elt.getAttribute('href'))) { } else if (/\bsf-dump-ref\b/.test(elt.className) && (a = elt.getAttribute('href'))) {
a = a.substr(1); a = a.slice(1);
elt.className += ' '+a; elt.className += ' '+a;
if (/[\[{]$/.test(elt.previousSibling.nodeValue)) { if (/[\[{]$/.test(elt.previousSibling.nodeValue)) {

View File

@ -10,7 +10,7 @@
<div class="layui-col-md12 content detail"> <div class="layui-col-md12 content detail">
<div class="fly-panel detail-box"> <div class="fly-panel detail-box">
{//标题} {//标题}
<h1 style="color:{$article.title_color}; margin:10px 5px 15px 5px;" align="center">{$article.title}</h1> <h1 style="color:{$article.title_color};margin:10px 5px 15px 5px;" align="center">{$article.title}</h1>
{//作者} {//作者}
<div class="detail-about" align="center"> <div class="detail-about" align="center">
@ -23,7 +23,9 @@
<hr style="margin-bottom: 25px"> <hr style="margin-bottom: 25px">
{// 内容} {// 内容}
<div class="detail-body photos" style="font-size: 18px;line-height: 200%;" id="content">{$article.content}</div> <div class="detail-body photos" style="font-size: 18px;line-height: 200%;" id="content">{$article.content}</div>
</div>
<div class="fly-panel detail-box" >
{//管理} {//管理}
{if (($article.upzip !== '') || session('?user_name'))} {if (($article.upzip !== '') || session('?user_name'))}
<div class="detail-assist"> <div class="detail-assist">
@ -31,7 +33,7 @@
<button type="button" class="layui-btn layui-btn-xs" id="zip-download"><i class="layui-icon layui-icon-download-circle"></i>{:lang('download files')}: {$article.downloads}次</button> <button type="button" class="layui-btn layui-btn-xs" id="zip-download"><i class="layui-icon layui-icon-download-circle"></i>{:lang('download files')}: {$article.downloads}次</button>
{/notempty} {/notempty}
<div class="fly-admin-box" data-id="{$article.id}"> <div class="fly-admin-box" data-id="{$article.id}">
{if ($user.auth ?? '')} {if ($user.auth ?? '')}
<span class="layui-btn layui-btn-xs jie-admin" type="del"><i class="layui-icon layui-icon-delete"></i></span> <span class="layui-btn layui-btn-xs jie-admin" type="del"><i class="layui-icon layui-icon-delete"></i></span>
{if($article.is_top == 0)} {if($article.is_top == 0)}
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="top" rank="1"><i class="layui-icon layui-icon-top"></i></span> <span class="layui-btn layui-btn-xs jie-admin" type="set" field="top" rank="1"><i class="layui-icon layui-icon-top"></i></span>
@ -49,20 +51,16 @@
{else /} {else /}
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="reply" rank="1" style="background-color:#ccc;">{:lang('enable reply')}</span> <span class="layui-btn layui-btn-xs jie-admin" type="set" field="reply" rank="1" style="background-color:#ccc;">{:lang('enable reply')}</span>
{/if} {/if}
<span id="color">{:lang('title color')}</span> <span id="color">{:lang('title color')}</span>
{/if} {/if}
{if(session('user_name')==$article.user.name || ($user.auth ?? ''))} {if(session('user_name')==$article.user.name || ($user.auth ?? ''))}
<span class="layui-btn layui-btn-xs jie-admin" type="edit"><a href="{:url('article/edit',['id'=>$article.id])}">{:lang('edit')}</a></span> <span class="layui-btn layui-btn-xs jie-admin" type="edit"><a href="{:url('article/edit',['id'=>$article.id])}">{:lang('edit')}</a></span>
{/if} {/if}
</div> </div>
</div> </div>
{/if} {/if}
</div> </div>
<div class="fly-panel detail-box" >
</div>
</div> </div>
</div> </div>
<!--底部栏--> <!--底部栏-->
@ -100,7 +98,7 @@ layui.use(['fly', 'face','colorpicker','plyr', 'laypage'], function(){
//tpl模板给发布时间赋值 //tpl模板给发布时间赋值
$('div.detail-hits').children('span.post-time').each(function(){ $('div.detail-hits').children('span.post-time').each(function(){
var othis = $(this), html = othis.html(); var othis = $(this), html = othis.html();
var string = laytpl('{{ d.time }}').render({ var string = laytpl('{{ d.time }}').render({
//time: html //time: html
time: othis.attr('data') time: othis.attr('data')
}); });
@ -217,7 +215,6 @@ layui.use(['fly', 'face','colorpicker','plyr', 'laypage'], function(){
$(function(){ $(function(){
$(".photos").on("click","img",function(){ $(".photos").on("click","img",function(){
var _this = $(this); var _this = $(this);
console.log(_this);
imgShow("#outerdiv", "#innerdiv", "#bigimg", _this); imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
}); });
}); });
@ -260,7 +257,6 @@ layui.use(['fly', 'face','colorpicker','plyr', 'laypage'], function(){
$(this).fadeOut("fast"); $(this).fadeOut("fast");
}); });
} }
</script> </script>
<div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;"> <div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;">
@ -270,30 +266,6 @@ layui.use(['fly', 'face','colorpicker','plyr', 'laypage'], function(){
{:hook('markdownhook')} {:hook('markdownhook')}
<script>
//扫码阅读
$("#rdown").hover(function(){
$("#phonedl").show().stop();
},function(){
$("#phonedl").hide().stop();
});
$("#phonedl").hover(function(){
$("#phonedl").show().stop();
},function(){
$("#phonedl").hide().stop();
});
function PhoneDown(){
layer.open({
title: "扫码查阅",
skin: 'layui-layer',
content: "<img src='/qrcode/?text={$Request.domain}{:url('article/detail',['id' => $article.id])}&size=230'>"
});
}
//推送百度收录服务
</script>
{volist name="push_js" id="vo"} {volist name="push_js" id="vo"}
{$vo.jscode|raw} {$vo.jscode|raw}
{/volist} {/volist}

View File

@ -44,7 +44,9 @@
<hr> <hr>
{// 内容} {// 内容}
<div class="detail-body photos" id="content">{$article.content}</div> <div class="detail-body photos" id="content">{$article.content}</div>
</div>
<div class="fly-panel detail-box" >
{//管理} {//管理}
{if (($article.upzip !== '') || session('?user_name'))} {if (($article.upzip !== '') || session('?user_name'))}
<div class="detail-assist"> <div class="detail-assist">
@ -79,10 +81,6 @@
{/if} {/if}
</div> </div>
<div class="fly-panel detail-box" >
</div>
{//评论} {//评论}
<div class="fly-panel detail-box" id="flyReply"> <div class="fly-panel detail-box" id="flyReply">
<span style="font-size:18px;">评论 {$article.comments_count}</span> <span style="font-size:18px;">评论 {$article.comments_count}</span>

View File

@ -1,3 +1,12 @@
<!--
* @Author: TaoLer <alipey_tao@qq.com>
* @Date: 2021-12-06 16:04:51
* @LastEditTime: 2022-04-29 15:08:24
* @LastEditors: TaoLer
* @Description: 搜索引擎SEO优化设置
* @FilePath: \TaoLer\view\taoler\index\user\index.html
* Copyright (c) 2020~2022 http://www.aieok.com All rights reserved.
-->
{extend name="public/user" /} {extend name="public/user" /}
{block name="content"} {block name="content"}
@ -21,15 +30,12 @@
<li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('user/set')}"><i class="layui-icon"></i><cite>修改信息</cite></a> </li> <li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('user/set')}"><i class="layui-icon"></i><cite>修改信息</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('user/set#avatar')}"><i class="layui-icon"></i><cite>修改头像</cite></a> </li> <li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('user/set#avatar')}"><i class="layui-icon"></i><cite>修改头像</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('user/set#pass')}"><i class="layui-icon"></i><cite>修改密码</cite></a> </li> <li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('user/set#pass')}"><i class="layui-icon"></i><cite>修改密码</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="/user/set/#bind"><i class="layui-icon"></i><cite>帐号绑定</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('article/add')}"><i class="layui-icon"></i><cite>发表新帖</cite></a> </li> <li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('article/add')}"><i class="layui-icon"></i><cite>发表新帖</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="/column/share/"><i class="layui-icon"></i><cite>查看分享</cite></a> </li> <li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('user/post#collection')}"><i class="layui-icon"></i><cite>我的收藏</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="#"><i class="layui-icon"></i><cite>帐号绑定</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="#"><i class="layui-icon"></i><cite>查看分享</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4 LAY_search "> <a href="javascript:;"><i class="layui-icon"></i><cite>搜索资源</cite></a> </li> <li class="layui-col-sm3 layui-col-xs4 LAY_search "> <a href="javascript:;"><i class="layui-icon"></i><cite>搜索资源</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="{:url('user/post/#collection')}"><i class="layui-icon"></i><cite>我的收藏</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="/jie/15697/"><i class="layui-icon"></i><cite>成为赞助商</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="/jie/2461/"><i class="layui-icon"></i><cite>关注公众号</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="http://www.test.com/doc/"><i class="layui-icon"></i><cite>文档</cite></a> </li>
<li class="layui-col-sm3 layui-col-xs4"> <a href="http://www.test.com/demo/"><i class="layui-icon"></i><cite>示例</cite></a> </li>
</ul> </ul>
</div> </div>
</div> </div>
@ -39,10 +45,10 @@
{block name="script"} {block name="script"}
<script> <script>
var replyUrl = "{:url('index/reply')}"; var replyUrl = "{:url('index/reply')}";
var signStatusUrl = "{:url('sign/status')}"; var signStatusUrl = "{:url('sign/status')}";
var signInUrl = "{:url('sign/sign')}"; var signInUrl = "{:url('sign/sign')}";
var signRuleUrl = "{:url('sign/getsignrule')}"; var signRuleUrl = "{:url('sign/getsignrule')}";
var signJsonUrl = "{:url('sign/signJson')}"; var signJsonUrl = "{:url('sign/signJson')}";
</script> </script>
{/block} {/block}