mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
53e6a2a6a0
commit
70e5894b67
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -893,12 +893,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "141fa175f3cdbdb4ad2e9927d6de379fb618e75a"
|
"reference": "b55328975855e44d2947ccd5503e52b30385a117"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/141fa175f3cdbdb4ad2e9927d6de379fb618e75a",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b55328975855e44d2947ccd5503e52b30385a117",
|
||||||
"reference": "141fa175f3cdbdb4ad2e9927d6de379fb618e75a",
|
"reference": "b55328975855e44d2947ccd5503e52b30385a117",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -915,7 +915,7 @@
|
|||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2020-09-29T05:20:22+00:00",
|
"time": "2020-10-09T01:50:18+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-09-30 09:44:47
|
// This file is automatically generated at:2020-10-09 09:38:02
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\admin\\Library',
|
0 => 'think\\admin\\Library',
|
||||||
|
@ -35,7 +35,7 @@ class FormHelper extends Helper
|
|||||||
* @param string $field 指定数据主键
|
* @param string $field 指定数据主键
|
||||||
* @param array $where 额外更新条件
|
* @param array $where 额外更新条件
|
||||||
* @param array $data 表单扩展数据
|
* @param array $data 表单扩展数据
|
||||||
* @return array|boolean|mixed
|
* @return array|boolean|mixed|void
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
@ -36,7 +36,7 @@ class PageHelper extends Helper
|
|||||||
* @param boolean|integer $total 集合分页记录数
|
* @param boolean|integer $total 集合分页记录数
|
||||||
* @param integer $limit 集合每页记录数
|
* @param integer $limit 集合每页记录数
|
||||||
* @param string $template 模板文件名称
|
* @param string $template 模板文件名称
|
||||||
* @return array|mixed
|
* @return array|mixed|void
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
@ -45,15 +45,15 @@ class PageHelper extends Helper
|
|||||||
{
|
{
|
||||||
$this->query = $this->buildQuery($dbQuery);
|
$this->query = $this->buildQuery($dbQuery);
|
||||||
// 数据列表排序自动处理
|
// 数据列表排序自动处理
|
||||||
if ($this->app->request->isPost()) $this->sortAction();
|
if ($this->app->request->isPost()) $this->_sortAction();
|
||||||
// 列表设置默认排序处理
|
// 列表设置默认排序处理
|
||||||
if (!$this->query->getOptions('order')) $this->orderAction();
|
if (!$this->query->getOptions('order')) $this->_orderAction();
|
||||||
// 列表分页及结果集处理
|
// 列表分页及结果集处理
|
||||||
if ($page) {
|
if ($page) {
|
||||||
if ($limit > 0) {
|
if ($limit > 0) {
|
||||||
$limit = intval($limit);
|
$limit = intval($limit);
|
||||||
} else {
|
} else {
|
||||||
$limit = $this->app->request->get('limit', $this->app->cookie->get('limit'));
|
$limit = $this->app->request->get('limit', $this->app->cookie->get('limit', 20));
|
||||||
$this->app->cookie->set('limit', ($limit = intval($limit >= 10 ? $limit : 20)) . '');
|
$this->app->cookie->set('limit', ($limit = intval($limit >= 10 ? $limit : 20)) . '');
|
||||||
}
|
}
|
||||||
[$options, $query] = ['', $this->app->request->get()];
|
[$options, $query] = ['', $this->app->request->get()];
|
||||||
@ -91,11 +91,11 @@ class PageHelper extends Helper
|
|||||||
* POST 提交 {action:sort,PK:$PK,SORT:$SORT}
|
* POST 提交 {action:sort,PK:$PK,SORT:$SORT}
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
*/
|
*/
|
||||||
private function sortAction()
|
private function _sortAction()
|
||||||
{
|
{
|
||||||
if ($this->app->request->post('action') === 'sort') {
|
if ($this->app->request->post('action') === 'sort') {
|
||||||
if (method_exists($this->query, 'getTableFields') && in_array('sort', $this->query->getTableFields())) {
|
if (method_exists($this->query, 'getTableFields') && in_array('sort', $this->query->getTableFields())) {
|
||||||
$pk = $this->query->getPk() ?? 'id';
|
$pk = $this->query->getPk() ?: 'id';
|
||||||
if ($this->app->request->has($pk, 'post')) {
|
if ($this->app->request->has($pk, 'post')) {
|
||||||
$map = [$pk => $this->app->request->post($pk, 0)];
|
$map = [$pk => $this->app->request->post($pk, 0)];
|
||||||
$data = ['sort' => intval($this->app->request->post('sort', 0))];
|
$data = ['sort' => intval($this->app->request->post('sort', 0))];
|
||||||
@ -112,7 +112,7 @@ class PageHelper extends Helper
|
|||||||
* 列表默认排序处理
|
* 列表默认排序处理
|
||||||
* 未配置排序规则时自动按SORT排序
|
* 未配置排序规则时自动按SORT排序
|
||||||
*/
|
*/
|
||||||
private function orderAction()
|
private function _orderAction()
|
||||||
{
|
{
|
||||||
if (method_exists($this->query, 'getTableFields')) {
|
if (method_exists($this->query, 'getTableFields')) {
|
||||||
if (in_array('sort', $this->query->getTableFields())) {
|
if (in_array('sort', $this->query->getTableFields())) {
|
||||||
|
@ -34,7 +34,7 @@ class SaveHelper extends Helper
|
|||||||
* @param array $data 表单扩展数据
|
* @param array $data 表单扩展数据
|
||||||
* @param string $field 数据对象主键
|
* @param string $field 数据对象主键
|
||||||
* @param array $where 额外更新条件
|
* @param array $where 额外更新条件
|
||||||
* @return boolean
|
* @return boolean|void
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
*/
|
*/
|
||||||
public function init($dbQuery, array $data = [], string $field = '', array $where = [])
|
public function init($dbQuery, array $data = [], string $field = '', array $where = [])
|
||||||
|
@ -65,9 +65,7 @@ class App
|
|||||||
*/
|
*/
|
||||||
public function handle(Request $request, Closure $next)
|
public function handle(Request $request, Closure $next)
|
||||||
{
|
{
|
||||||
if (!$this->parseMultiApp()) {
|
if (!$this->parseMultiApp()) return $next($request);
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
return $this->app->middleware->pipeline('app')->send($request)->then(function ($request) use ($next) {
|
return $this->app->middleware->pipeline('app')->send($request)->then(function ($request) use ($next) {
|
||||||
return $next($request);
|
return $next($request);
|
||||||
});
|
});
|
||||||
@ -155,7 +153,6 @@ class App
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前运行入口名称
|
* 获取当前运行入口名称
|
||||||
* @access protected
|
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user