mirror of
				https://gitee.com/zoujingli/ThinkAdmin.git
				synced 2025-10-27 02:12:08 +08:00 
			
		
		
		
	[更新]ComposerUpdate
This commit is contained in:
		
							parent
							
								
									53c4565cda
								
							
						
					
					
						commit
						51ac97b5c6
					
				
							
								
								
									
										2
									
								
								vendor/autoload.php
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/autoload.php
									
									
									
									
										vendored
									
									
								
							| @ -4,4 +4,4 @@ | |||||||
| 
 | 
 | ||||||
| require_once __DIR__ . '/composer/autoload_real.php'; | require_once __DIR__ . '/composer/autoload_real.php'; | ||||||
| 
 | 
 | ||||||
| return ComposerAutoloaderInitf894ac9a65650ea774d251c7a7b441d3::getLoader(); | return ComposerAutoloaderInit465606aa1bf7d5d08b4f37af5e5eec56::getLoader(); | ||||||
|  | |||||||
							
								
								
									
										14
									
								
								vendor/composer/autoload_real.php
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								vendor/composer/autoload_real.php
									
									
									
									
										vendored
									
									
								
							| @ -2,7 +2,7 @@ | |||||||
| 
 | 
 | ||||||
| // autoload_real.php @generated by Composer
 | // autoload_real.php @generated by Composer
 | ||||||
| 
 | 
 | ||||||
| class ComposerAutoloaderInitf894ac9a65650ea774d251c7a7b441d3 | class ComposerAutoloaderInit465606aa1bf7d5d08b4f37af5e5eec56 | ||||||
| { | { | ||||||
|     private static $loader; |     private static $loader; | ||||||
| 
 | 
 | ||||||
| @ -19,15 +19,15 @@ class ComposerAutoloaderInitf894ac9a65650ea774d251c7a7b441d3 | |||||||
|             return self::$loader; |             return self::$loader; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         spl_autoload_register(array('ComposerAutoloaderInitf894ac9a65650ea774d251c7a7b441d3', 'loadClassLoader'), true, true); |         spl_autoload_register(array('ComposerAutoloaderInit465606aa1bf7d5d08b4f37af5e5eec56', 'loadClassLoader'), true, true); | ||||||
|         self::$loader = $loader = new \Composer\Autoload\ClassLoader(); |         self::$loader = $loader = new \Composer\Autoload\ClassLoader(); | ||||||
|         spl_autoload_unregister(array('ComposerAutoloaderInitf894ac9a65650ea774d251c7a7b441d3', 'loadClassLoader')); |         spl_autoload_unregister(array('ComposerAutoloaderInit465606aa1bf7d5d08b4f37af5e5eec56', 'loadClassLoader')); | ||||||
| 
 | 
 | ||||||
|         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); | ||||||
|         if ($useStaticLoader) { |         if ($useStaticLoader) { | ||||||
|             require_once __DIR__ . '/autoload_static.php'; |             require_once __DIR__ . '/autoload_static.php'; | ||||||
| 
 | 
 | ||||||
|             call_user_func(\Composer\Autoload\ComposerStaticInitf894ac9a65650ea774d251c7a7b441d3::getInitializer($loader)); |             call_user_func(\Composer\Autoload\ComposerStaticInit465606aa1bf7d5d08b4f37af5e5eec56::getInitializer($loader)); | ||||||
|         } else { |         } else { | ||||||
|             $map = require __DIR__ . '/autoload_namespaces.php'; |             $map = require __DIR__ . '/autoload_namespaces.php'; | ||||||
|             foreach ($map as $namespace => $path) { |             foreach ($map as $namespace => $path) { | ||||||
| @ -48,19 +48,19 @@ class ComposerAutoloaderInitf894ac9a65650ea774d251c7a7b441d3 | |||||||
|         $loader->register(true); |         $loader->register(true); | ||||||
| 
 | 
 | ||||||
|         if ($useStaticLoader) { |         if ($useStaticLoader) { | ||||||
|             $includeFiles = Composer\Autoload\ComposerStaticInitf894ac9a65650ea774d251c7a7b441d3::$files; |             $includeFiles = Composer\Autoload\ComposerStaticInit465606aa1bf7d5d08b4f37af5e5eec56::$files; | ||||||
|         } else { |         } else { | ||||||
|             $includeFiles = require __DIR__ . '/autoload_files.php'; |             $includeFiles = require __DIR__ . '/autoload_files.php'; | ||||||
|         } |         } | ||||||
|         foreach ($includeFiles as $fileIdentifier => $file) { |         foreach ($includeFiles as $fileIdentifier => $file) { | ||||||
|             composerRequiref894ac9a65650ea774d251c7a7b441d3($fileIdentifier, $file); |             composerRequire465606aa1bf7d5d08b4f37af5e5eec56($fileIdentifier, $file); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return $loader; |         return $loader; | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function composerRequiref894ac9a65650ea774d251c7a7b441d3($fileIdentifier, $file) | function composerRequire465606aa1bf7d5d08b4f37af5e5eec56($fileIdentifier, $file) | ||||||
| { | { | ||||||
|     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { | ||||||
|         require $file; |         require $file; | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								vendor/composer/autoload_static.php
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/composer/autoload_static.php
									
									
									
									
										vendored
									
									
								
							| @ -4,7 +4,7 @@ | |||||||
| 
 | 
 | ||||||
| namespace Composer\Autoload; | namespace Composer\Autoload; | ||||||
| 
 | 
 | ||||||
| class ComposerStaticInitf894ac9a65650ea774d251c7a7b441d3 | class ComposerStaticInit465606aa1bf7d5d08b4f37af5e5eec56 | ||||||
| { | { | ||||||
|     public static $files = array ( |     public static $files = array ( | ||||||
|         '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', |         '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', | ||||||
| @ -346,9 +346,9 @@ class ComposerStaticInitf894ac9a65650ea774d251c7a7b441d3 | |||||||
|     public static function getInitializer(ClassLoader $loader) |     public static function getInitializer(ClassLoader $loader) | ||||||
|     { |     { | ||||||
|         return \Closure::bind(function () use ($loader) { |         return \Closure::bind(function () use ($loader) { | ||||||
|             $loader->prefixLengthsPsr4 = ComposerStaticInitf894ac9a65650ea774d251c7a7b441d3::$prefixLengthsPsr4; |             $loader->prefixLengthsPsr4 = ComposerStaticInit465606aa1bf7d5d08b4f37af5e5eec56::$prefixLengthsPsr4; | ||||||
|             $loader->prefixDirsPsr4 = ComposerStaticInitf894ac9a65650ea774d251c7a7b441d3::$prefixDirsPsr4; |             $loader->prefixDirsPsr4 = ComposerStaticInit465606aa1bf7d5d08b4f37af5e5eec56::$prefixDirsPsr4; | ||||||
|             $loader->classMap = ComposerStaticInitf894ac9a65650ea774d251c7a7b441d3::$classMap; |             $loader->classMap = ComposerStaticInit465606aa1bf7d5d08b4f37af5e5eec56::$classMap; | ||||||
| 
 | 
 | ||||||
|         }, null, ClassLoader::class); |         }, null, ClassLoader::class); | ||||||
|     } |     } | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								vendor/composer/installed.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/composer/installed.json
									
									
									
									
										vendored
									
									
								
							| @ -499,12 +499,12 @@ | |||||||
|         "source": { |         "source": { | ||||||
|             "type": "git", |             "type": "git", | ||||||
|             "url": "https://github.com/zoujingli/ThinkLibrary.git", |             "url": "https://github.com/zoujingli/ThinkLibrary.git", | ||||||
|             "reference": "4814e484ac22b33a86f4614cc9f1b34ba383546f" |             "reference": "e7269e7e70e885390d659dccd43437c3acc02b02" | ||||||
|         }, |         }, | ||||||
|         "dist": { |         "dist": { | ||||||
|             "type": "zip", |             "type": "zip", | ||||||
|             "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/4814e484ac22b33a86f4614cc9f1b34ba383546f", |             "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/e7269e7e70e885390d659dccd43437c3acc02b02", | ||||||
|             "reference": "4814e484ac22b33a86f4614cc9f1b34ba383546f", |             "reference": "e7269e7e70e885390d659dccd43437c3acc02b02", | ||||||
|             "shasum": "", |             "shasum": "", | ||||||
|             "mirrors": [ |             "mirrors": [ | ||||||
|                 { |                 { | ||||||
| @ -523,7 +523,7 @@ | |||||||
|             "qiniu/php-sdk": "^7.2", |             "qiniu/php-sdk": "^7.2", | ||||||
|             "topthink/framework": "5.1.*" |             "topthink/framework": "5.1.*" | ||||||
|         }, |         }, | ||||||
|         "time": "2019-04-04T04:53:18+00:00", |         "time": "2019-04-09T11:46:35+00:00", | ||||||
|         "type": "library", |         "type": "library", | ||||||
|         "installation-source": "dist", |         "installation-source": "dist", | ||||||
|         "autoload": { |         "autoload": { | ||||||
|  | |||||||
| @ -38,7 +38,7 @@ class Data | |||||||
|         $db = is_string($dbQuery) ? Db::name($dbQuery) : $dbQuery; |         $db = is_string($dbQuery) ? Db::name($dbQuery) : $dbQuery; | ||||||
|         list($table, $value) = [$db->getTable(), isset($data[$key]) ? $data[$key] : null]; |         list($table, $value) = [$db->getTable(), isset($data[$key]) ? $data[$key] : null]; | ||||||
|         $map = isset($where[$key]) ? [] : (is_string($value) ? [[$key, 'in', explode(',', $value)]] : [$key => $value]); |         $map = isset($where[$key]) ? [] : (is_string($value) ? [[$key, 'in', explode(',', $value)]] : [$key => $value]); | ||||||
|         if (Db::table($table)->where($where)->where($map)->count() > 0) { |         if (Db::table($table)->master()->where($where)->where($map)->count() > 0) { | ||||||
|             return Db::table($table)->strict(false)->where($where)->where($map)->update($data) !== false; |             return Db::table($table)->strict(false)->where($where)->where($map)->update($data) !== false; | ||||||
|         } |         } | ||||||
|         return Db::table($table)->strict(false)->insert($data) !== false; |         return Db::table($table)->strict(false)->insert($data) !== false; | ||||||
| @ -138,4 +138,17 @@ class Data | |||||||
|         while (strlen($string) < $length) $string .= rand(0, 9); |         while (strlen($string) < $length) $string .= rand(0, 9); | ||||||
|         return $string; |         return $string; | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 文件大小显示转换 | ||||||
|  |      * @param integer $size | ||||||
|  |      * @param integer $dec | ||||||
|  |      * @return string | ||||||
|  |      */ | ||||||
|  |     public static function toFileSize($size, $dec = 2) | ||||||
|  |     { | ||||||
|  |         list($pos, $map) = [0, ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB']]; | ||||||
|  |         while ($size >= 1024 && $pos < 6) if (++$pos) $size /= 1024; | ||||||
|  |         return round($size, $dec) . ' ' . $map[$pos]; | ||||||
|  |     } | ||||||
| } | } | ||||||
| @ -40,15 +40,15 @@ class Express | |||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 查询物流信息 |      * 查询物流信息 | ||||||
|      * @param string $express_code 快递公司编辑 |      * @param string $expressCode 快递公司编辑 | ||||||
|      * @param string $express_no 快递物流编号 |      * @param string $expressNo 快递物流编号 | ||||||
|      * @return array |      * @return array | ||||||
|      */ |      */ | ||||||
|     public static function query($express_code, $express_no) |     public static function query($expressCode, $expressNo) | ||||||
|     { |     { | ||||||
|         list($microtime, $client_ip) = [microtime(true), request()->ip()]; |         list($microtime, $clientIp) = [microtime(true), request()->ip()]; | ||||||
|         $header = ['Host' => 'www.kuaidi100.com', 'CLIENT-IP' => $client_ip, 'X-FORWARDED-FOR' => $client_ip]; |         $header = ['Host' => 'www.kuaidi100.com', 'CLIENT-IP' => $clientIp, 'X-FORWARDED-FOR' => $clientIp]; | ||||||
|         $location = "http://www.kuaidi100.com/query?type={$express_code}&postid={$express_no}&phone=&temp={$microtime}"; |         $location = "http://www.kuaidi100.com/query?type={$expressCode}&postid={$expressNo}&phone=&temp={$microtime}"; | ||||||
|         return json_decode(Http::get($location, [], ['header' => $header, 'timeout' => 30]), true); |         return json_decode(Http::get($location, [], ['header' => $header, 'timeout' => 30]), true); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -137,12 +137,32 @@ class Node | |||||||
|      */ |      */ | ||||||
|     public static function scanDir($dir, $data = [], $ext = 'php') |     public static function scanDir($dir, $data = [], $ext = 'php') | ||||||
|     { |     { | ||||||
|         foreach (scandir($dir) as $_dir) if (strpos($_dir, '.') !== 0) { |         foreach (scandir($dir) as $curr) if (strpos($curr, '.') !== 0) { | ||||||
|             $path = realpath($dir . DIRECTORY_SEPARATOR . $_dir); |             $path = realpath($dir . DIRECTORY_SEPARATOR . $curr); | ||||||
|             if (is_dir($path)) $data = array_merge($data, self::scanDir($path)); |             if (is_dir($path)) $data = array_merge($data, self::scanDir($path)); | ||||||
|             elseif (pathinfo($path, 4) === $ext) $data[] = $path; |             elseif (pathinfo($path, PATHINFO_EXTENSION) === $ext) $data[] = $path; | ||||||
|         } |         } | ||||||
|         return $data; |         return $data; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 递归统计目录大小 | ||||||
|  |      * @param string $path 目录 | ||||||
|  |      * @return integer | ||||||
|  |      */ | ||||||
|  |     public static function totalDirSize($path) | ||||||
|  |     { | ||||||
|  |         list($total, $path) = [0, realpath($path)]; | ||||||
|  |         if (!file_exists($path)) return $total; | ||||||
|  |         if (!is_dir($path)) return filesize($path); | ||||||
|  |         if ($handle = opendir($path)) { | ||||||
|  |             while ($file = readdir($handle)) if (!in_array($file, ['.', '..'])) { | ||||||
|  |                 $temp = $path . DIRECTORY_SEPARATOR . $file; | ||||||
|  |                 $total += (is_dir($temp) ? self::totalDirSize($temp) : filesize($temp)); | ||||||
|  |             } | ||||||
|  |             if (is_resource($handle)) closedir($handle); | ||||||
|  |         } | ||||||
|  |         return $total; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user