From 422f9d8d6a5146999b248320640df130d52937c9 Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Sun, 3 Mar 2019 20:26:25 +0800 Subject: [PATCH] Feat:initial test --- application/config.php | 2 +- application/index/controller/File.php | 2 +- application/index/view/home/home.html | 127 +- application/index/view/home/home1.html | 100 + composer.lock | 981 ++ static/js/uploader/i18n/zh_CN.js | 2 + static/js/uploader/main.js | 274 + static/js/uploader/moxie.js | 11509 ++++++++++++++++ static/js/uploader/plupload.dev.js | 2476 ++++ static/js/uploader/qiniu.js | 1831 +++ static/js/uploader/ui.js | 278 + thinkphp/.gitignore | 4 + thinkphp/CONTRIBUTING.md | 4 +- thinkphp/LICENSE.txt | 2 +- thinkphp/README.md | 114 + thinkphp/base.php | 6 +- thinkphp/convention.php | 15 +- thinkphp/helper.php | 4 +- thinkphp/lang/zh-cn.php | 172 +- thinkphp/library/think/App.php | 451 +- thinkphp/library/think/Build.php | 167 +- thinkphp/library/think/Cache.php | 111 +- thinkphp/library/think/Collection.php | 330 +- thinkphp/library/think/Config.php | 160 +- thinkphp/library/think/Console.php | 388 +- thinkphp/library/think/Controller.php | 105 +- thinkphp/library/think/Cookie.php | 164 +- thinkphp/library/think/Db.php | 81 +- thinkphp/library/think/Debug.php | 128 +- thinkphp/library/think/Env.php | 13 +- thinkphp/library/think/Error.php | 75 +- thinkphp/library/think/Exception.php | 21 +- thinkphp/library/think/File.php | 246 +- thinkphp/library/think/Hook.php | 62 +- thinkphp/library/think/Lang.php | 127 +- thinkphp/library/think/Loader.php | 501 +- thinkphp/library/think/Log.php | 180 +- thinkphp/library/think/Model.php | 353 +- thinkphp/library/think/Paginator.php | 58 +- thinkphp/library/think/Request.php | 242 +- thinkphp/library/think/Response.php | 11 +- thinkphp/library/think/Route.php | 342 +- thinkphp/library/think/Session.php | 7 +- thinkphp/library/think/Template.php | 60 +- thinkphp/library/think/Url.php | 27 +- thinkphp/library/think/Validate.php | 300 +- thinkphp/library/think/View.php | 23 +- thinkphp/library/think/cache/Driver.php | 42 +- thinkphp/library/think/cache/driver/File.php | 64 +- thinkphp/library/think/cache/driver/Lite.php | 22 +- .../library/think/cache/driver/Memcache.php | 13 +- .../library/think/cache/driver/Memcached.php | 11 +- thinkphp/library/think/cache/driver/Redis.php | 50 +- .../library/think/cache/driver/Sqlite.php | 16 +- .../library/think/cache/driver/Wincache.php | 11 +- .../library/think/cache/driver/Xcache.php | 11 +- thinkphp/library/think/config/driver/Ini.php | 2 +- thinkphp/library/think/config/driver/Json.php | 2 +- thinkphp/library/think/config/driver/Xml.php | 2 +- .../library/think/console/command/Clear.php | 13 +- .../think/console/command/optimize/Config.php | 2 +- .../think/console/command/optimize/Route.php | 5 + .../think/console/command/optimize/Schema.php | 6 +- .../think/console/output/Descriptor.php | 10 +- thinkphp/library/think/controller/Rest.php | 6 +- thinkphp/library/think/db/Builder.php | 177 +- thinkphp/library/think/db/Connection.php | 113 +- thinkphp/library/think/db/Expression.php | 48 + thinkphp/library/think/db/Query.php | 580 +- thinkphp/library/think/db/builder/Mysql.php | 81 +- thinkphp/library/think/db/builder/Pgsql.php | 14 +- thinkphp/library/think/db/builder/Sqlite.php | 13 +- thinkphp/library/think/db/builder/Sqlsrv.php | 50 +- thinkphp/library/think/db/connector/Mysql.php | 15 +- thinkphp/library/think/db/connector/Pgsql.php | 2 +- .../library/think/db/connector/Sqlite.php | 2 +- .../library/think/db/connector/Sqlsrv.php | 5 +- .../think/db/exception/BindParamException.php | 2 +- .../db/exception/DataNotFoundException.php | 2 +- .../db/exception/ModelNotFoundException.php | 2 +- thinkphp/library/think/debug/Console.php | 2 +- thinkphp/library/think/debug/Html.php | 2 +- .../library/think/exception/DbException.php | 3 +- .../think/exception/ErrorException.php | 2 +- thinkphp/library/think/exception/Handle.php | 18 +- .../library/think/exception/PDOException.php | 2 +- .../exception/RouteNotFoundException.php | 2 +- thinkphp/library/think/log/driver/File.php | 243 +- thinkphp/library/think/log/driver/Socket.php | 2 +- thinkphp/library/think/model/Collection.php | 18 +- thinkphp/library/think/model/Merge.php | 2 +- thinkphp/library/think/model/Pivot.php | 8 +- thinkphp/library/think/model/Relation.php | 35 +- .../think/model/relation/BelongsTo.php | 54 +- .../think/model/relation/BelongsToMany.php | 104 +- .../library/think/model/relation/HasMany.php | 77 +- .../think/model/relation/HasManyThrough.php | 25 +- .../library/think/model/relation/HasOne.php | 78 +- .../think/model/relation/MorphMany.php | 47 +- .../library/think/model/relation/MorphOne.php | 44 +- .../library/think/model/relation/MorphTo.php | 42 +- .../library/think/model/relation/OneToOne.php | 42 +- .../think/paginator/driver/Bootstrap.php | 2 +- thinkphp/library/think/response/Json.php | 2 +- thinkphp/library/think/response/Jsonp.php | 2 +- thinkphp/library/think/response/Redirect.php | 8 +- thinkphp/library/think/response/View.php | 2 +- thinkphp/library/think/response/Xml.php | 9 +- .../library/think/session/driver/Memcache.php | 2 +- .../think/session/driver/Memcached.php | 2 +- .../library/think/session/driver/Redis.php | 2 +- thinkphp/library/think/template/TagLib.php | 6 +- .../library/think/template/driver/File.php | 7 +- thinkphp/library/think/template/taglib/Cx.php | 2 +- thinkphp/library/think/view/driver/Php.php | 32 +- thinkphp/library/think/view/driver/Think.php | 6 +- thinkphp/library/traits/controller/Jump.php | 110 +- thinkphp/library/traits/model/SoftDelete.php | 101 +- thinkphp/library/traits/think/Instance.php | 35 +- thinkphp/start.php | 7 +- thinkphp/tests/.gitignore | 4 - thinkphp/tests/README.md | 132 - thinkphp/tests/application/config.php | 33 - thinkphp/tests/application/database.php | 44 - .../application/index/controller/Index.php | 10 - thinkphp/tests/application/route.php | 22 - thinkphp/tests/conf/apcu.ini | 3 - thinkphp/tests/conf/apcu_bc.ini | 4 - thinkphp/tests/conf/memcached.ini | 1 - thinkphp/tests/conf/redis.ini | 1 - thinkphp/tests/conf/timezone.ini | 1 - thinkphp/tests/extensions/5.4/apcu.so | Bin 404136 -> 0 bytes thinkphp/tests/extensions/5.5/apcu.so | Bin 402984 -> 0 bytes thinkphp/tests/extensions/5.6/apcu.so | Bin 404405 -> 0 bytes thinkphp/tests/extensions/7.0/apc.so | Bin 43511 -> 0 bytes thinkphp/tests/extensions/7.0/apcu.so | Bin 320965 -> 0 bytes thinkphp/tests/extensions/7.0/memcached.so | Bin 323764 -> 0 bytes thinkphp/tests/extensions/7.0/redis.so | Bin 1541380 -> 0 bytes thinkphp/tests/mock.php | 20 - thinkphp/tests/script/install.sh | 18 - thinkphp/tests/thinkphp/baseTest.php | 39 - .../tests/thinkphp/library/think/appTest.php | 90 - .../thinkphp/library/think/behavior/One.php | 15 - .../thinkphp/library/think/behavior/Three.php | 9 - .../thinkphp/library/think/behavior/Two.php | 9 - .../thinkphp/library/think/buildTest.php | 73 - .../think/cache/driver/cacheTestCase.php | 207 - .../library/think/cache/driver/fileTest.php | 46 - .../library/think/cache/driver/liteTest.php | 69 - .../think/cache/driver/memcacheTest.php | 49 - .../think/cache/driver/memcachedTest.php | 72 - .../library/think/cache/driver/redisTest.php | 66 - .../think/config/driver/fixtures/config.ini | 1 - .../think/config/driver/fixtures/config.json | 1 - .../think/config/driver/fixtures/config.xml | 6 - .../library/think/config/driver/iniTest.php | 33 - .../library/think/config/driver/jsonTest.php | 33 - .../library/think/config/driver/xmlTest.php | 33 - .../thinkphp/library/think/configTest.php | 169 - .../library/think/controller/.gitignore | 2 - .../thinkphp/library/think/controllerTest.php | 194 - .../thinkphp/library/think/cookieTest.php | 150 - .../library/think/db/driver/.gitignore | 2 - .../tests/thinkphp/library/think/dbTest.php | 352 - .../thinkphp/library/think/debugTest.php | 179 - .../tests/thinkphp/library/think/display.html | 1 - .../thinkphp/library/think/exceptionTest.php | 52 - .../tests/thinkphp/library/think/extend.html | 2 - .../tests/thinkphp/library/think/extend2.html | 17 - .../tests/thinkphp/library/think/hookTest.php | 67 - .../tests/thinkphp/library/think/include.html | 2 - .../thinkphp/library/think/include2.html | 1 - .../thinkphp/library/think/lang/lang.php | 4 - .../tests/thinkphp/library/think/langTest.php | 76 - .../tests/thinkphp/library/think/layout.html | 2 - .../tests/thinkphp/library/think/layout2.html | 2 - .../library/think/loader/test/Hello.php | 7 - .../thinkphp/library/think/loaderTest.php | 71 - .../library/think/log/driver/fileTest.php | 34 - .../tests/thinkphp/library/think/logTest.php | 39 - .../thinkphp/library/think/model/.gitignore | 2 - .../thinkphp/library/think/paginateTest.php | 40 - .../thinkphp/library/think/requestTest.php | 187 - .../thinkphp/library/think/responseTest.php | 95 - .../thinkphp/library/think/routeTest.php | 287 - .../thinkphp/library/think/session/.gitignore | 2 - .../thinkphp/library/think/sessionTest.php | 319 - .../library/think/template/driver/.gitignore | 2 - .../library/think/template/taglib/cxTest.php | 575 - .../thinkphp/library/think/templateTest.php | 414 - .../tests/thinkphp/library/think/urlTest.php | 127 - .../thinkphp/library/think/validateTest.php | 200 - .../library/think/view/driver/.gitignore | 2 - .../think/view/theme/index/template.html | 14 - .../tests/thinkphp/library/think/viewTest.php | 76 - .../library/traits/controller/.gitignore | 2 - .../thinkphp/library/traits/model/.gitignore | 2 - thinkphp/tpl/dispatch_jump.tpl | 1 + thinkphp/tpl/think_exception.tpl | 10 +- 199 files changed, 22557 insertions(+), 7588 deletions(-) create mode 100644 application/index/view/home/home1.html create mode 100644 composer.lock create mode 100644 static/js/uploader/i18n/zh_CN.js create mode 100644 static/js/uploader/main.js create mode 100644 static/js/uploader/moxie.js create mode 100644 static/js/uploader/plupload.dev.js create mode 100644 static/js/uploader/qiniu.js create mode 100644 static/js/uploader/ui.js create mode 100644 thinkphp/.gitignore create mode 100644 thinkphp/README.md create mode 100644 thinkphp/library/think/db/Expression.php delete mode 100644 thinkphp/tests/.gitignore delete mode 100644 thinkphp/tests/README.md delete mode 100644 thinkphp/tests/application/config.php delete mode 100644 thinkphp/tests/application/database.php delete mode 100644 thinkphp/tests/application/index/controller/Index.php delete mode 100644 thinkphp/tests/application/route.php delete mode 100644 thinkphp/tests/conf/apcu.ini delete mode 100644 thinkphp/tests/conf/apcu_bc.ini delete mode 100644 thinkphp/tests/conf/memcached.ini delete mode 100644 thinkphp/tests/conf/redis.ini delete mode 100644 thinkphp/tests/conf/timezone.ini delete mode 100644 thinkphp/tests/extensions/5.4/apcu.so delete mode 100644 thinkphp/tests/extensions/5.5/apcu.so delete mode 100644 thinkphp/tests/extensions/5.6/apcu.so delete mode 100644 thinkphp/tests/extensions/7.0/apc.so delete mode 100644 thinkphp/tests/extensions/7.0/apcu.so delete mode 100644 thinkphp/tests/extensions/7.0/memcached.so delete mode 100644 thinkphp/tests/extensions/7.0/redis.so delete mode 100644 thinkphp/tests/mock.php delete mode 100644 thinkphp/tests/script/install.sh delete mode 100644 thinkphp/tests/thinkphp/baseTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/appTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/behavior/One.php delete mode 100644 thinkphp/tests/thinkphp/library/think/behavior/Three.php delete mode 100644 thinkphp/tests/thinkphp/library/think/behavior/Two.php delete mode 100644 thinkphp/tests/thinkphp/library/think/buildTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/cache/driver/cacheTestCase.php delete mode 100644 thinkphp/tests/thinkphp/library/think/cache/driver/fileTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/cache/driver/liteTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/cache/driver/memcacheTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/cache/driver/memcachedTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/cache/driver/redisTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/config/driver/fixtures/config.ini delete mode 100644 thinkphp/tests/thinkphp/library/think/config/driver/fixtures/config.json delete mode 100644 thinkphp/tests/thinkphp/library/think/config/driver/fixtures/config.xml delete mode 100644 thinkphp/tests/thinkphp/library/think/config/driver/iniTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/config/driver/jsonTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/config/driver/xmlTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/configTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/controller/.gitignore delete mode 100644 thinkphp/tests/thinkphp/library/think/controllerTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/cookieTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/db/driver/.gitignore delete mode 100644 thinkphp/tests/thinkphp/library/think/dbTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/debugTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/display.html delete mode 100644 thinkphp/tests/thinkphp/library/think/exceptionTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/extend.html delete mode 100644 thinkphp/tests/thinkphp/library/think/extend2.html delete mode 100644 thinkphp/tests/thinkphp/library/think/hookTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/include.html delete mode 100644 thinkphp/tests/thinkphp/library/think/include2.html delete mode 100644 thinkphp/tests/thinkphp/library/think/lang/lang.php delete mode 100644 thinkphp/tests/thinkphp/library/think/langTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/layout.html delete mode 100644 thinkphp/tests/thinkphp/library/think/layout2.html delete mode 100644 thinkphp/tests/thinkphp/library/think/loader/test/Hello.php delete mode 100644 thinkphp/tests/thinkphp/library/think/loaderTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/log/driver/fileTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/logTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/model/.gitignore delete mode 100644 thinkphp/tests/thinkphp/library/think/paginateTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/requestTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/responseTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/routeTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/session/.gitignore delete mode 100644 thinkphp/tests/thinkphp/library/think/sessionTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/template/driver/.gitignore delete mode 100644 thinkphp/tests/thinkphp/library/think/template/taglib/cxTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/templateTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/urlTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/validateTest.php delete mode 100644 thinkphp/tests/thinkphp/library/think/view/driver/.gitignore delete mode 100644 thinkphp/tests/thinkphp/library/think/view/theme/index/template.html delete mode 100644 thinkphp/tests/thinkphp/library/think/viewTest.php delete mode 100644 thinkphp/tests/thinkphp/library/traits/controller/.gitignore delete mode 100644 thinkphp/tests/thinkphp/library/traits/model/.gitignore diff --git a/application/config.php b/application/config.php index 38405e4a..fd8a9488 100644 --- a/application/config.php +++ b/application/config.php @@ -18,7 +18,7 @@ return [ // 应用命名空间 'app_namespace' => 'app', // 应用调试模式 - 'app_debug' => false, + 'app_debug' => true, // 应用Trace 'app_trace' => false, // 应用模式状态 diff --git a/application/index/controller/File.php b/application/index/controller/File.php index eb729005..fd744e59 100644 --- a/application/index/controller/File.php +++ b/application/index/controller/File.php @@ -44,7 +44,7 @@ class File extends Controller{ */ public function ListFile(){ $reqPath = stripslashes(json_decode(file_get_contents("php://input"),true)['path']); - return FileManage::ListFile($reqPath,$this->userObj->uid); + return json(FileManage::ListFile($reqPath,$this->userObj->uid)); } public function Delete(){ diff --git a/application/index/view/home/home.html b/application/index/view/home/home.html index 76332275..fa7b77ed 100644 --- a/application/index/view/home/home.html +++ b/application/index/view/home/home.html @@ -1,25 +1,26 @@ - - -
- - - -