Compare commits

...

7 Commits

Author SHA1 Message Date
Anyon
ba5afc2fa3 Update image.html 2022-06-24 18:19:25 +08:00
Anyon
12b0bb2692 Update image.html 2022-06-24 18:12:28 +08:00
Anyon
fad1836dbd Update image.html 2022-06-24 18:11:04 +08:00
Anyon
3fcfb760fd Update image.html 2022-06-24 18:01:29 +08:00
Anyon
c1cfaa5ec0 Update image.html 2022-06-24 17:56:13 +08:00
Anyon
e6bf3a294d Update SQL01-数据表结构.sql 2022-06-24 17:25:30 +08:00
Anyon
95596bf3b7 修改代码 2022-06-24 17:24:05 +08:00
6 changed files with 950 additions and 907 deletions

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,7 @@ class Config extends Controller
{
$this->title = '系统参数配置';
$this->super = AdminService::isSuper();
$this->version = ModuleService::instance()->getVersion();
$this->version = ModuleService::getVersion();
$this->fetch();
}

View File

@ -34,7 +34,7 @@ class Module extends Controller
public function index()
{
$this->title = '系统模块管理';
$this->modules = ModuleService::instance()->change();
$this->modules = ModuleService::change();
$this->fetch();
}
@ -45,7 +45,7 @@ class Module extends Controller
public function install()
{
$data = $this->_vali(['name.require' => '模块名称不能为空!']);
[$state, $message] = ModuleService::instance()->install($data['name']);
[$state, $message] = ModuleService::install($data['name']);
$state ? $this->success($message) : $this->error($message);
}
@ -56,8 +56,8 @@ class Module extends Controller
public function change()
{
$data = $this->_vali(['name.require' => '模块名称不能为空!']);
$online = ModuleService::instance()->online();
$locals = ModuleService::instance()->getModules();
$online = ModuleService::online();
$locals = ModuleService::getModules();
if (isset($online[$data['name']])) {
$this->module = $online[$data['name']];
$this->current = $locals[$data['name']] ?? [];

View File

@ -45,7 +45,7 @@ class Queue extends Controller
SystemQueue::mQuery()->layTable(function () {
$this->title = '系统任务管理';
$this->iswin = ProcessService::instance()->iswin();
if ($this->super = AdminService::instance()->isSuper()) {
if ($this->super = AdminService::isSuper()) {
$process = ProcessService::instance();
if ($process->iswin() || empty($_SERVER['USER'])) {
$this->command = $process->think('xadmin:queue start');

View File

@ -44,7 +44,7 @@ class Update extends Controller
public function get()
{
$filename = decode(input('encode', '0'));
if (!ModuleService::instance()->checkAllowDownload($filename)) {
if (!ModuleService::checkAllowDownload($filename)) {
$this->error('下载的文件不在认证规则中!');
}
if (file_exists($realname = $this->app->getRootPath() . $filename)) {
@ -61,7 +61,7 @@ class Update extends Controller
*/
public function node()
{
$this->success('获取文件列表成功!', ModuleService::instance()->getChanges(
$this->success('获取文件列表成功!', ModuleService::getChanges(
json_decode($this->request->post('rules', '[]', ''), true),
json_decode($this->request->post('ignore', '[]', ''), true)
));
@ -72,6 +72,6 @@ class Update extends Controller
*/
public function version()
{
$this->success('获取模块信息成功!', ModuleService::instance()->getModules());
$this->success('获取模块信息成功!', ModuleService::getModules());
}
}

View File

@ -1,37 +1,78 @@
<div class="image-dialog" id="ImageDialog">
<div class="image-dialog-head">
<div class="pull-left flex">
<input class="layui-input margin-right-5" v-model="keys" style="height:30px;line-height:30px" placeholder="请输入搜索关键词">
<a class="layui-btn layui-btn-sm layui-btn-normal" @click="search"> </a>
</div>
<div class="pull-right">
<a data-file="one" data-type="jpg,png" class="layui-btn layui-btn-sm">上传图片</a>
</div>
</div>
<div class="image-dialog-body upload-image-mdbox flex flex-wrap flex-align-start">
<div class="image-dialog-body">
<div class="image-dialog-item" v-for="x in items">
<div class="uploadimage" :style="x.style"></div>
<p class="image-dialog-item-name layui-elip" v-text="x.name"></p>
</div>
</div>
<div class="image-dialog-foot">
<div id="ImageDialogPage" class="image-dialog-page"></div>
</div>
</div>
<style>
.image-dialog-head {
clear: both;
height: 30px;
padding: 10px 15px;
padding: 10px 12px;
}
.image-dialog-body {
height: 500px;
height: 470px;
background: #efefef;
padding-top: 15px;
padding-left: 15px;
padding-top: 12px;
padding-left: 12px;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
}
.image-dialog-item {
margin-right: 15px;
margin-bottom: 15px;
position: relative;
margin-right: 12px;
margin-bottom: 12px;
}
.image-dialog-item-name {
left: 0;
right: 0;
bottom: 0;
color: #fff;
padding: 3px 10px;
position: absolute;
text-align: center;
line-height: 1.5em;
white-space: nowrap;
background: rgba(0, 0, 0, 0.6);
}
.image-dialog-item .uploadimage {
margin: 0
margin: 0;
width: 145px;
height: 145px;
}
.image-dialog-foot {
padding: 0 12px;
}
.image-dialog-page {
height: 50px;
text-align: center;
}
.image-dialog-page .layui-laypage a,
.image-dialog-page .layui-laypage span {
margin-bottom: 0;
}
</style>
@ -41,21 +82,37 @@
el: '#ImageDialog',
data: {
page: 1,
items: []
keys: '',
limit: 15,
items: [],
},
created: function () {
this.loadPage();
},
methods: {
addPage: function (count) {
var that = this;
layui.laypage.render({
curr: this.page, count: count, limit: that.limit,
layout: ['count', 'prev', 'page', 'next', 'refresh'],
elem: 'ImageDialogPage', jump: function (obj, first) {
if (!first) that.loadPage(that.page = obj.curr);
},
});
},
search: function () {
this.page = 1;
this.loadPage();
},
loadPage: function () {
var that = this;
this.params = {page: this.page, output: 'layui.table'};
this.params = {page: this.page, limit: this.limit, output: 'layui.table', name: this.keys || ''};
$.form.load('{:url("image")}', this.params, 'get', function (ret) {
that.items = that.items.concat(ret.data);
that.addPage(ret.count);
that.items = ret.data;
that.items.forEach(function (item) {
item.style = 'background-image:url(' + item.xurl + ')';
});
console.log(that.items)
return false;
});
}