修复一些bug

This commit is contained in:
taoser 2021-05-24 18:46:16 +08:00
parent b30da861ff
commit d8d6ce1a15
6 changed files with 23 additions and 37 deletions

View File

@ -7,7 +7,7 @@
* 后台http://adm.aieok.com
* 账号test
* 密码test123
* 版本TaoLer 1.7.5
* 版本TaoLer 1.7.6
* 日期2021.5.25
#### 项目地址

View File

@ -221,11 +221,11 @@ class Upgrade extends AdminController
Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'50%','msg'=>'升级文件解压成功!']);
$upSql = $zipPath.'runtime/mysql_update.sql';
//升级执行mysql操作
if(file_exists($zipPath.'mysql/mysql_update.sql'))
if(file_exists($upSql))
{
$result = $this->db_update($zipPath.'mysql/mysql_update.sql');
$result = $this->db_update($upSql);
if(!$result && $result < 0)
{
return json(['code'=>-1,'msg'=>'数据库升级失败']);
@ -256,10 +256,9 @@ class Upgrade extends AdminController
}
Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'70%','msg'=>'升级文件执行成功!']);
//把解压的升级包清除
//$del_zip = unlink($package_file);
Files::delDirAndFile($this->upload_dir);
Files::delDirAndFile($this->backup_dir);
Files::delDirAndFile("../mysql/");
unlink('../runtime/mysql_update.sql');
Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'100%','msg'=>'升级成功!']);
//更新系统的版本号了

View File

@ -723,7 +723,7 @@ body .fly-user-main{position: relative; min-height: 600px;}
.site-tree-mobile-user{display: block!important; position: fixed; z-index: 100000; bottom: 20px; left: 10px; width: 50px; height: 50px; line-height: 50px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;}
.site-mobile .site-tree-mobile-user{display: none !important;}
.site-mobile .fly-user-main>.layui-nav{left: 0;}
.site-mobile .site-mobile-shade-user{content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.9); z-index: 999;}
.site-mobile .site-mobile-shade-user{content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 999;}
}
/*前台公用样式*/

View File

@ -31,12 +31,12 @@ layui.define(['laypage', 'fly', 'element', 'flow'], function(exports){
//发贴list
var post = table.render({
elem: '#art-post'
,url: artListUrl //进列表接口
,url: artListUrl
,title: ''
,cols: [[
{type: 'numbers', fixed: 'left'}
,{field: 'title', title: '标题',minWidth: 250 ,templet: '<div><a href="{{d.url}}">{{d.title}}</a></div>'}
,{field: 'status', title: '状态', Width: 80}
,{field: 'title', title: '标题',minWidth: 250 ,templet: '<div><a href="{{d.url}}" target="_blank">{{d.title}}</a></div>'}
,{field: 'status', title: '状态', width: 80}
,{field: 'ctime', title: '时间', width: 120}
,{field: 'datas', title: '数据', width: 120}
,{title: '操作', width: 150, align: 'center', toolbar: '#artTool'}
@ -48,11 +48,11 @@ layui.define(['laypage', 'fly', 'element', 'flow'], function(exports){
//收藏list
table.render({
elem: '#coll-post'
,url: collListUrl //进列表接口
,url: collListUrl
,title: ''
,cols: [[
{type: 'numbers', fixed: 'left'}
,{field: 'title', title: '标题',minWidth: 250,templet: '<div><a href="{{d.url}}">{{d.title}}</a></div>'}
,{field: 'title', title: '标题',minWidth: 250,templet: '<div><a href="{{d.url}}" target="_blank">{{d.title}}</a></div>'}
,{field: 'auther', title: '作者', width: 120}
,{field: 'ctime', title: '时间', width: 120}
,{title: '取消', width: 80, align: 'center', toolbar: '#collTool'}
@ -128,16 +128,6 @@ layui.define(['laypage', 'fly', 'element', 'flow'], function(exports){
}
});
var elemUC = $('#LAY_uc'), elemUCM = $('#LAY_ucm');
gather.minelog = {};
if(elemUC[0]){
layui.each(dom.mine.children(), function(index, item){
var othis = $(item)
gather.mine(index, othis.data('type'), othis.data('url'));
});
}
//显示当前tab
if(location.hash){
element.tabChange('user', location.hash.replace(/^#/, ''));

View File

@ -1,4 +1,3 @@
<!DOCTYPE html>
<html>
<head>
@ -20,9 +19,16 @@
{block name="content"}
{/block}
</div>
{include file="public/footer" /}
</div>
{include file="public/footer" /}
<script>
var articleUrl = "{:url('user/article')}";
var artListUrl = "{:url('User/artList')}";
var collListUrl = "{:url('User/collList')}";
var atrDelUrl = "{:url('article/delete')}";
var artEditUrl = "{:url('article/edit')}";
var collDelUrl = "{:url('user/colltDel')}";
layui.cache.page = 'user';
layui.cache.user = {
username: '{$user.name??'游客'}'
@ -39,7 +45,8 @@
}).use('fly');
</script>
{block name="script"}
js脚本
<script>
</script>
{/block}
</body>
</html>

View File

@ -32,15 +32,5 @@
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">取消</a>
</script>
{/block}
{block name="script"}
<script>
var articleUrl = "{:url('user/article')}";
var artListUrl = "{:url('User/artList')}";
var collListUrl = "{:url('User/collList')}";
var atrDelUrl = "{:url('article/delete')}";
var artEditUrl = "{:url('article/edit')}";
var collDelUrl = "{:url('user/colltDel')}";
</script>
{/block}