优化系统目录

This commit is contained in:
hdm 2021-05-05 10:41:27 +08:00
parent acd6c75ba3
commit e2c9aa49ed
13 changed files with 87 additions and 40 deletions

4
.gitignore vendored

@ -1,11 +1,7 @@
/.idea
/.vscode
/.gitee
/vendor/*
*.log
/.env
/public/storage/*
/runtime
/public/.user.ini
/public/backup/*
/config/install.lock

@ -111,10 +111,13 @@ class Slide extends BaseController
{
$param = get_params();
$where = array();
$where[] = ['slide_id','=',$param['id']];
$where[] = ['s.slide_id','=',$param['id']];
$rows = empty($param['limit']) ? get_config(app . page_size) : $param['limit'];
$slideInfoList = SlideInfo::where($where)
->order('sort desc, id desc')
->alias('s')
->join('file f', 's.img=f.id', 'LEFT')
->field('s.*,f.filepath')
->order('s.sort desc, s.id desc')
->paginate($rows, false, ['query' => $param]);
return table_assign(1, '', $slideInfoList);
}

@ -68,8 +68,9 @@
</table>
<div style="padding: 10px 0">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
<button lay-event="email" class="layui-btn">发送测试</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
<a class="layui-btn" href="javascript:;" id="emailto">发送测试</a>
<button lay-event="back" class="layui-btn layui-btn-primary">返回</button>
</div>
</form>
{/block}
@ -102,7 +103,7 @@
return false;
});
$('#emailto').click(function () {
$('.body-content').on('click', '[lay-event="email"]', function () {
layer.prompt({
formType: 0,
value: '',
@ -131,6 +132,11 @@
})
});
})
//监听返回
$('.body-content').on('click', '[lay-event="back"]', function () {
history.back(-1);
return false;
});
}
</script>

@ -23,6 +23,7 @@
<div style="padding: 10px 0">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
<button lay-event="back" class="layui-btn layui-btn-primary">返回</button>
</div>
</form>
{/block}
@ -57,6 +58,11 @@
})
return false;
});
//监听返回
$('.body-content').on('click', '[lay-event="back"]', function () {
history.back(-1);
return false;
});
}
</script>
{include file="common/layui" base='base' extend="[]" use="['form']" callback="init" /}

@ -83,6 +83,7 @@
<div style="padding: 10px 0">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
<button lay-event="back" class="layui-btn layui-btn-primary">返回</button>
</div>
</form>
{/block}
@ -135,6 +136,11 @@
})
return false;
});
//监听返回
$('.body-content').on('click', '[lay-event="back"]', function () {
history.back(-1);
return false;
});
}
</script>
{include file="common/layui" base='base' extend="[]" use="['upload','form']" callback="init" /}

@ -5,52 +5,63 @@
<h3 style="height:36px">微信配置</h3>
<table class="layui-table layui-table-form">
<tr>
<td class="layui-td-gray2">token<font>*</font></td>
<td class="layui-td-gray3">token<font>*</font></td>
<td>
<input type="hidden" value="{$id}" name="id">
<input type="text" name="token" lay-verify="required" autocomplete="off" placeholder="请输入Token" class="layui-input" {notempty name="$config.token"} value="{$config.token}" {/notempty}>
</td>
<td class="layui-td-gray2">登录回调地址<font>*</font></td>
<td class="layui-td-gray3">登录回调地址<font>*</font></td>
<td>
<input type="text" name="login_back_url" lay-verify="required" autocomplete="off" placeholder="请输入微信登录回调地址" class="layui-input" {notempty name="$config.login_back_url"} value="{$config.login_back_url}" {/notempty}>
</td>
</tr>
<tr>
<td class="layui-td-gray2">appid<font>*</font></td>
<td class="layui-td-gray3">公众号appid<font>*</font></td>
<td>
<input type="text" name="appid" lay-verify="required" autocomplete="off" placeholder="请输入appID" class="layui-input" {notempty name="$config.appid"} value="{$config.appid}" {/notempty}>
</td>
<td class="layui-td-gray2">appsecret<font>*</font></td>
<td class="layui-td-gray3">公众号appsecret<font>*</font></td>
<td>
<input type="text" name="appsecret" lay-verify="required" autocomplete="off" placeholder="请输入secretey" class="layui-input" {notempty name="$config.appsecret"} value="{$config.appsecret}" {/notempty}>
</td>
</tr>
<tr>
<td class="layui-td-gray2">支付商户号</td>
<td class="layui-td-gray3">支付商户号</td>
<td>
<input type="text" name="mchid" autocomplete="off" placeholder="请输入微信支付商户号" class="layui-input" {notempty name="$config.mchid"} value="{$config.mchid}" {/notempty}>
</td>
<td class="layui-td-gray2">支付API密钥</td>
<td class="layui-td-gray3">支付API密钥</td>
<td>
<input type="text" name="secrect_key" autocomplete="off" placeholder="请输入微信支付API密钥" class="layui-input"
{notempty name="$config.secrect_key"} value="{$config.secrect_key}" {/notempty}>
</td>
</tr>
<tr>
<td class="layui-td-gray2">支付证书路径</td>
<td class="layui-td-gray3">支付证书路径</td>
<td>
<input type="text" name="cert_url" autocomplete="off" placeholder="请输入微信支付证书路径" class="layui-input"
{notempty name="$config.cert_url"} value="{$config.cert_url}" {/notempty}>
</td>
<td class="layui-td-gray2">支付回调地址</td>
<td class="layui-td-gray3">支付回调地址</td>
<td>
<input type="text" name="pay_back_url" autocomplete="off" placeholder="请输入微信支付回调地址" class="layui-input" {notempty name="$config.pay_back_url"} value="{$config.pay_back_url}" {/notempty}>
</td>
</tr>
<tr>
<td class="layui-td-gray3">小程序appid<font>*</font></td>
<td>
<input type="text" name="xcx_appid" lay-verify="required" autocomplete="off" placeholder="请输入小程序appid" class="layui-input" {notempty name="$config.xcx_appid"} value="{$config.xcx_appid}" {/notempty}>
</td>
<td class="layui-td-gray3">小程序appsecret<font>*</font></td>
<td>
<input type="text" name="xcx_appsecret" lay-verify="required" autocomplete="off" placeholder="请输入小程序appsecret" class="layui-input" {notempty name="$config.xcx_appsecret"} value="{$config.xcx_appsecret}" {/notempty}>
</td>
</tr>
</table>
<div style="padding: 10px 0">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
<button lay-event="back" class="layui-btn layui-btn-primary">返回</button>
</div>
</form>
{/block}
@ -85,6 +96,11 @@
})
return false;
});
//监听返回
$('.body-content').on('click', '[lay-event="back"]', function () {
history.back(-1);
return false;
});
}
</script>
{include file="common/layui" base='base' extend="[]" use="['upload','form']" callback="init" /}

@ -51,11 +51,21 @@
}, {
field: 'sort',
title: '排序',
align: 'center',
width: 80
}, {
field: 'title',
title: '标题',
width: 300
}, {
field: 'img',
title: '图片',
width: 136,
align: 'center',
templet:function(d){
var html='<img src="'+d.filepath+'" style="max-width: 100px;" />';
return html;
}
}, {
field: 'desc',
title: '描述'

@ -4,39 +4,33 @@
<form class="layui-form body-content">
<table class="layui-table layui-table-form">
<tr>
<td class="layui-td-gray2">标题<font>*</font>
</td>
<td>
<td class="layui-td-gray">标题<font>*</font></td>
<td colspan="3">
<input type="hidden" name="id" value="{$id}" />
<input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input"
{notempty name="$slide_info.title" }value="{$slide_info.title}" {/notempty}>
</td>
<td class="layui-td-gray2">排序</td>
<td><input type="text" name="sort" placeholder="请输入排序,数字" autocomplete="off" class="layui-input" {notempty
name="$slide_info.sort" }value="{$slide_info.sort}" {/notempty}></td>
</tr>
<tr>
<td class="layui-td-gray2">链接<font>*</font>
</td>
<td>
<input type="text" name="src" autocomplete="off" placeholder="请输入链接" class="layui-input" {notempty
name="$slide_info.src" }value="{$slide_info.src}" {/notempty}>
</td>
<td class="layui-td-gray2" rowspan="2">图片</td>
<td rowspan="2">
<div class="layui-upload">
<button type="button" class="layui-btn layui-btn-normal" id="test1">上传图片</button>
<div class="layui-upload-list" id="demo1">
<td class="layui-td-gray" rowspan="3">图片</td>
<td rowspan="3" style="vertical-align:top">
<div class="layui-upload" style="text-align:center;">
<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" id="test1">选择要上传的图片</button>
<div class="layui-upload-list" id="demo1" style="width: 100%;height:100px; overflow:hidden;">
<img {notempty name="$slide_info.img" }src="{:get_file($slide_info.img)}" {/notempty}
style="max-height: 120px;" />
style="max-width: 160px;" />
<input type="hidden" name="img" {notempty name="$slide_info.img" }value="{$slide_info.img}" {/notempty}>
</div>
</div>
</td>
</tr>
<tr>
<td class="layui-td-gray2">状态<font>*</font>
<td class="layui-td-gray">链接</td>
<td colspan="3">
<input type="text" name="src" autocomplete="off" placeholder="请输入链接" class="layui-input" {notempty
name="$slide_info.src" }value="{$slide_info.src}" {/notempty}>
</td>
</tr>
<tr>
<td class="layui-td-gray2">状态<font>*</font></td>
<td>
{if condition="$id eq 0"}
<input type="radio" name="status" value="1" title="正常" checked>
@ -46,11 +40,14 @@
<input type="radio" name="status" value="-1" title="禁用" {eq name="$slide_info.status" value="-1" }checked{/eq}>
{/if}
</td>
<td class="layui-td-gray">排序</td>
<td><input type="text" name="sort" placeholder="请输入排序,数字" autocomplete="off" class="layui-input" {notempty
name="$slide_info.sort" }value="{$slide_info.sort}" {/notempty}></td>
</tr>
<tr>
<td class="layui-td-gray2">备注<font>*</font>
<td class="layui-td-gray">备注
</td>
<td colspan="3">
<td colspan="5">
<textarea name="desc" placeholder="请输入备注"
class="layui-textarea">{notempty name="$slide_info.desc" }{$slide_info.desc}{/notempty}</textarea>
</td>
@ -58,6 +55,7 @@
</table>
<div style="padding: 10px 0">
<input type="hidden" name="slide_id" value="{$slide_id}">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
<button lay-event="back" class="layui-btn layui-btn-primary">返回</button>

@ -15,7 +15,7 @@ class Auth
$action = explode('/', $pathInfo)[0];
// var_dump($pathInfo);
//验证用户登录
if ($action == 'user' || $action == 'bi') {
if ($action == 'user') {
$session_user = get_config('app.session_user');
if (!Session::has($session_user)) {
return $request->isAjax() ? to_assign(404, '请先登录') : redirect((string) url('/home/login/errorshow'));

2
public/storage/image/.gitignore vendored Normal file

@ -0,0 +1,2 @@
*
!.gitignore

2
runtime/.gitignore vendored Normal file

@ -0,0 +1,2 @@
*
!.gitignore

2
vendor/.gitignore vendored Normal file

@ -0,0 +1,2 @@
*
!.gitignore