mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
3e98e7aea7
commit
ee8ad30b2b
@ -6,8 +6,4 @@
|
|||||||
<li data-open="{:url('index')}?type={$k}">{$v}</li>
|
<li data-open="{:url('index')}?type={$k}">{$v}</li>
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<style>
|
|
||||||
body{min-width:1000}
|
|
||||||
</style>
|
|
8
composer.lock
generated
8
composer.lock
generated
@ -909,12 +909,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "1cc8c40ac3bcdfa92dfb831445635946d69a6582"
|
"reference": "271cc2b1bc58c87c43391f4f4df253875019d4fb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/1cc8c40ac3bcdfa92dfb831445635946d69a6582",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/271cc2b1bc58c87c43391f4f4df253875019d4fb",
|
||||||
"reference": "1cc8c40ac3bcdfa92dfb831445635946d69a6582",
|
"reference": "271cc2b1bc58c87c43391f4f4df253875019d4fb",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -958,7 +958,7 @@
|
|||||||
],
|
],
|
||||||
"description": "ThinkPHP v6.0 Development Library",
|
"description": "ThinkPHP v6.0 Development Library",
|
||||||
"homepage": "http://framework.thinkadmin.top",
|
"homepage": "http://framework.thinkadmin.top",
|
||||||
"time": "2020-03-03T02:45:58+00:00"
|
"time": "2020-03-04T02:06:25+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "zoujingli/wechat-developer",
|
"name": "zoujingli/wechat-developer",
|
||||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -935,12 +935,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "1cc8c40ac3bcdfa92dfb831445635946d69a6582"
|
"reference": "271cc2b1bc58c87c43391f4f4df253875019d4fb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/1cc8c40ac3bcdfa92dfb831445635946d69a6582",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/271cc2b1bc58c87c43391f4f4df253875019d4fb",
|
||||||
"reference": "1cc8c40ac3bcdfa92dfb831445635946d69a6582",
|
"reference": "271cc2b1bc58c87c43391f4f4df253875019d4fb",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -956,7 +956,7 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2020-03-03T02:45:58+00:00",
|
"time": "2020-03-04T02:06:25+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-03-03 10:52:00
|
// This file is automatically generated at:2020-03-04 10:11:13
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\app\\Service',
|
0 => 'think\\app\\Service',
|
||||||
|
@ -55,11 +55,6 @@ class Library extends Service
|
|||||||
$header['Access-Control-Allow-Headers'] = 'Authorization,Content-Type,If-Match,If-Modified-Since,If-None-Match,If-Unmodified-Since,X-Requested-With';
|
$header['Access-Control-Allow-Headers'] = 'Authorization,Content-Type,If-Match,If-Modified-Since,If-None-Match,If-Unmodified-Since,X-Requested-With';
|
||||||
$header['Access-Control-Expose-Headers'] = 'User-Form-Token,User-Token,Token';
|
$header['Access-Control-Expose-Headers'] = 'User-Form-Token,User-Token,Token';
|
||||||
}
|
}
|
||||||
// 未配置数据库,跳过所有检查
|
|
||||||
$host = $this->app->config->get('database.host', '[host]');
|
|
||||||
if (empty($host) || $host === '[host]') {
|
|
||||||
return $next($request)->header($header);
|
|
||||||
}
|
|
||||||
// 访问模式及访问权限检查
|
// 访问模式及访问权限检查
|
||||||
if ($request->isOptions()) {
|
if ($request->isOptions()) {
|
||||||
return response()->code(204)->header($header);
|
return response()->code(204)->header($header);
|
||||||
|
@ -26,16 +26,17 @@ class CodeExtend
|
|||||||
* 获取随机字符串编码
|
* 获取随机字符串编码
|
||||||
* @param integer $size 字符串长度
|
* @param integer $size 字符串长度
|
||||||
* @param integer $type 字符串类型(1纯数字,2纯字母,3数字字母)
|
* @param integer $type 字符串类型(1纯数字,2纯字母,3数字字母)
|
||||||
|
* @param string $prefix 编码前缀
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function random($size = 10, $type = 1)
|
public static function random($size = 10, $type = 1, $prefix = '')
|
||||||
{
|
{
|
||||||
$numbs = '0123456789';
|
$numbs = '0123456789';
|
||||||
$chars = 'abcdefghijklmnopqrstuvwxyz';
|
$chars = 'abcdefghijklmnopqrstuvwxyz';
|
||||||
if (intval($type) === 1) $chars = $numbs;
|
if (intval($type) === 1) $chars = $numbs;
|
||||||
if (intval($type) === 2) $chars = "a{$chars}";
|
if (intval($type) === 2) $chars = "{$chars}";
|
||||||
if (intval($type) === 3) $chars = "{$numbs}{$chars}";
|
if (intval($type) === 3) $chars = "{$numbs}{$chars}";
|
||||||
$string = $chars[rand(1, strlen($chars) - 1)];
|
$string = $prefix . $chars[rand(1, strlen($chars) - 1)];
|
||||||
if (isset($chars)) while (strlen($string) < $size) {
|
if (isset($chars)) while (strlen($string) < $size) {
|
||||||
$string .= $chars[rand(0, strlen($chars) - 1)];
|
$string .= $chars[rand(0, strlen($chars) - 1)];
|
||||||
}
|
}
|
||||||
@ -45,12 +46,13 @@ class CodeExtend
|
|||||||
/**
|
/**
|
||||||
* 唯一日期编码
|
* 唯一日期编码
|
||||||
* @param integer $size
|
* @param integer $size
|
||||||
|
* @param string $prefix
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function uniqidDate($size = 16)
|
public static function uniqidDate($size = 16, $prefix = '')
|
||||||
{
|
{
|
||||||
if ($size < 14) $size = 14;
|
if ($size < 14) $size = 14;
|
||||||
$string = date('Ymd') . (date('H') + date('i')) . date('s');
|
$string = $prefix . date('Ymd') . (date('H') + date('i')) . date('s');
|
||||||
while (strlen($string) < $size) $string .= rand(0, 9);
|
while (strlen($string) < $size) $string .= rand(0, 9);
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
@ -58,13 +60,14 @@ class CodeExtend
|
|||||||
/**
|
/**
|
||||||
* 唯一数字编码
|
* 唯一数字编码
|
||||||
* @param integer $size
|
* @param integer $size
|
||||||
|
* @param string $prefix
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function uniqidNumber($size = 12)
|
public static function uniqidNumber($size = 12, $prefix = '')
|
||||||
{
|
{
|
||||||
$time = time() . '';
|
$time = time() . '';
|
||||||
if ($size < 10) $size = 10;
|
if ($size < 10) $size = 10;
|
||||||
$string = ($time[0] + $time[1]) . substr($time, 2) . rand(0, 9);
|
$string = $prefix . ($time[0] + $time[1]) . substr($time, 2) . rand(0, 9);
|
||||||
while (strlen($string) < $size) $string .= rand(0, 9);
|
while (strlen($string) < $size) $string .= rand(0, 9);
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user