Преглед изворни кода

卸载edward-captcha扩展

Yahoo пре 4 година
родитељ
комит
a3c9d131b5
36 измењених фајлова са 119 додато и 494 уклоњено
  1. 0 1
      composer.json
  2. 1 56
      composer.lock
  3. 110 0
      cores/library/Version.php
  4. 1 2
      vendor/composer/autoload_files.php
  5. 0 1
      vendor/composer/autoload_psr4.php
  6. 1 10
      vendor/composer/autoload_static.php
  7. 0 58
      vendor/composer/installed.json
  8. 2 11
      vendor/composer/installed.php
  9. 0 5
      vendor/edward1108/edward-captcha/.gitignore
  10. 0 26
      vendor/edward1108/edward-captcha/LICENSE
  11. 0 42
      vendor/edward1108/edward-captcha/README.md
  12. BIN
      vendor/edward1108/edward-captcha/assets/bgs/1.jpg
  13. BIN
      vendor/edward1108/edward-captcha/assets/bgs/2.jpg
  14. BIN
      vendor/edward1108/edward-captcha/assets/bgs/3.jpg
  15. BIN
      vendor/edward1108/edward-captcha/assets/bgs/4.jpg
  16. BIN
      vendor/edward1108/edward-captcha/assets/bgs/5.jpg
  17. BIN
      vendor/edward1108/edward-captcha/assets/bgs/6.jpg
  18. BIN
      vendor/edward1108/edward-captcha/assets/bgs/7.jpg
  19. BIN
      vendor/edward1108/edward-captcha/assets/bgs/8.jpg
  20. BIN
      vendor/edward1108/edward-captcha/assets/ttfs/1.ttf
  21. BIN
      vendor/edward1108/edward-captcha/assets/ttfs/2.ttf
  22. BIN
      vendor/edward1108/edward-captcha/assets/ttfs/3.ttf
  23. BIN
      vendor/edward1108/edward-captcha/assets/ttfs/4.ttf
  24. BIN
      vendor/edward1108/edward-captcha/assets/ttfs/5.ttf
  25. BIN
      vendor/edward1108/edward-captcha/assets/ttfs/6.ttf
  26. BIN
      vendor/edward1108/edward-captcha/assets/zhttfs/1.ttf
  27. 0 34
      vendor/edward1108/edward-captcha/composer.json
  28. 0 40
      vendor/edward1108/edward-captcha/src/Captcha.php
  29. 0 31
      vendor/edward1108/edward-captcha/src/CaptchaApi.php
  30. 0 20
      vendor/edward1108/edward-captcha/src/CaptchaController.php
  31. 0 23
      vendor/edward1108/edward-captcha/src/CaptchaService.php
  32. 0 39
      vendor/edward1108/edward-captcha/src/config.php
  33. 0 18
      vendor/edward1108/edward-captcha/src/facade/Captcha.php
  34. 0 18
      vendor/edward1108/edward-captcha/src/facade/CaptchaApi.php
  35. 0 54
      vendor/edward1108/edward-captcha/src/helper.php
  36. 4 5
      vendor/services.php

+ 0 - 1
composer.json

@@ -40,7 +40,6 @@
         "kosinix/grafika": "dev-master",
         "myclabs/php-enum": "^1.6",
         "lvht/geohash": "^1.1",
-        "edward1108/edward-captcha": "^1.1",
         "phpoffice/phpspreadsheet": "^1.18",
         "overtrue/easy-sms": "^2.0"
     },

+ 1 - 56
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "cf40a283306f6aa7e8efb2cf562da734",
+    "content-hash": "0f9f50572ec0a76614af87a4b1acdb01",
     "packages": [
         {
             "name": "aliyuncs/oss-sdk-php",
@@ -53,61 +53,6 @@
             "homepage": "http://www.aliyun.com/product/oss/",
             "time": "2019-11-15T11:05:42+00:00"
         },
-        {
-            "name": "edward1108/edward-captcha",
-            "version": "1.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/Edward1108/edward-captcha.git",
-                "reference": "426ceee34507c30d4b21e0dd349b571371aef700"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/Edward1108/edward-captcha/zipball/426ceee34507c30d4b21e0dd349b571371aef700",
-                "reference": "426ceee34507c30d4b21e0dd349b571371aef700",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1.0",
-                "topthink/framework": "^6.0.0"
-            },
-            "type": "library",
-            "extra": {
-                "think": {
-                    "services": [
-                        "edward\\captcha\\CaptchaService"
-                    ],
-                    "config": {
-                        "captcha": "src/config.php"
-                    }
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "edward\\captcha\\": "src/"
-                },
-                "files": [
-                    "src/helper.php"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "edward",
-                    "email": "xuyuanhua1987@163.com"
-                }
-            ],
-            "description": "ThinkPHP6验证码(图片、短信)支持api友好化",
-            "homepage": "https://github.com/Edward1108/edward-captcha",
-            "support": {
-                "issues": "https://github.com/Edward1108/edward-captcha/issues",
-                "source": "https://github.com/Edward1108/edward-captcha/tree/master"
-            },
-            "time": "2020-07-22T06:49:35+00:00"
-        },
         {
             "name": "ezyang/htmlpurifier",
             "version": "v4.13.0",

+ 110 - 0
cores/library/Version.php

@@ -0,0 +1,110 @@
+<?php
+
+namespace cores\library;
+
+use app\common\library\helper;
+use cores\exception\BaseException;
+
+/**
+ * 版本号工具类
+ */
+class Version
+{
+    /**
+     * 获取当前系统版本号
+     * @return string
+     * @throws BaseException
+     */
+    public static function getVersion(): string
+    {
+        static $version = [];
+        if (empty($version)) {
+            // 读取version.json文件
+            $filePath = root_path() . '/version.json';
+            !file_exists($filePath) && throwError('version.json not found');
+            // 解析json数据
+            $version = helper::jsonDecode(file_get_contents($filePath));
+            !is_array($version) && throwError('version cannot be decoded');
+        }
+        return $version['version'];
+    }
+
+    /**
+     * 获取下一个版本号
+     * @param string $currentVersion 当前的版本号
+     * @param array $versionCollection 版本号列表
+     * @return false|string
+     * @throws BaseException
+     */
+    public static function nextVersion(string $currentVersion, array $versionCollection)
+    {
+        $vers1 = self::versionToInteger($currentVersion);
+        $dataset = [];
+        foreach ($versionCollection as $value) {
+            $vers2 = self::versionToInteger($value);
+            $vers2 > $vers1 && $dataset[] = $vers2;
+        }
+        if (empty($dataset)) {
+            return false;
+        }
+        return self::integerToVersion(min($dataset));
+    }
+
+    /**
+     * 将版本转为数字
+     * @param string $version
+     * @return int
+     * @throws BaseException
+     */
+    public static function versionToInteger(string $version): int
+    {
+        if (!self::check($version)) {
+            throwError('version Validate Error');
+        }
+        list($major, $minor, $sub) = explode('.', $version);
+        return intval($major * 10000 + $minor * 100 + $sub);
+    }
+
+    /**
+     * 将数字转为版本
+     * @param int $versionCode 版本的数字表示
+     * @return string
+     * @throws BaseException
+     */
+    public static function integerToVersion(int $versionCode): string
+    {
+        if (!is_numeric($versionCode) || $versionCode >= 100000) {
+            throwError('version code Validate Error');
+        }
+        $version = array();
+        $version[0] = (int)($versionCode / 10000);
+        $version[1] = (int)($versionCode % 10000 / 100);
+        $version[2] = $versionCode % 100;
+        return implode('.', $version);
+    }
+
+    /**
+     * 检查版本格式是否正确
+     * @param string $version 版本
+     * @return bool
+     */
+    public static function check(string $version): bool
+    {
+        return (bool)preg_match('/^[0-9]{1,3}\.[0-9]{1,2}\.[0-9]{1,2}$/', $version);
+    }
+
+    /**
+     * 比较两个版本的值
+     * @param string $version1 版本1
+     * @param string $version2 版本2
+     * @return int -1:版本1小于版本2, 0:相等, 1:版本1大于版本2
+     * @throws BaseException
+     */
+    public static function compare(string $version1, string $version2): int
+    {
+        if (!self::check($version1) || !self::check($version2)) {
+            throwError('version1 or version2 Validate Error');
+        }
+        return version_compare($version1, $version2);
+    }
+}

+ 1 - 2
vendor/composer/autoload_files.php

@@ -10,8 +10,8 @@ return array(
     '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
     'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
     '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
-    '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
     '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
+    '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
     '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
     'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php',
     '21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php',
@@ -73,7 +73,6 @@ return array(
     'eef6fa3879d3efa347cd24d5eb348f85' => $vendorDir . '/markbaker/matrix/classes/src/Operations/divideinto.php',
     '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
     'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
-    'b2759b3fbd06631840a9638abcd22485' => $vendorDir . '/edward1108/edward-captcha/src/helper.php',
     '841780ea2e1d6545ea3a253239d59c05' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/functions.php',
     '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
 );

+ 0 - 1
vendor/composer/autoload_psr4.php

@@ -10,7 +10,6 @@ return array(
     'think\\trace\\' => array($vendorDir . '/topthink/think-trace/src'),
     'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'),
     'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src'),
-    'edward\\captcha\\' => array($vendorDir . '/edward1108/edward-captcha/src'),
     'cores\\' => array($baseDir . '/cores'),
     'app\\' => array($baseDir . '/app'),
     'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'),

+ 1 - 10
vendor/composer/autoload_static.php

@@ -11,8 +11,8 @@ class ComposerStaticInitb17d9cf9df517c3dd2f492a1c933c315
         '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
         'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
         '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
-        '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
         '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
+        '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
         '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
         'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php',
         '21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php',
@@ -74,7 +74,6 @@ class ComposerStaticInitb17d9cf9df517c3dd2f492a1c933c315
         'eef6fa3879d3efa347cd24d5eb348f85' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/divideinto.php',
         '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
         'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
-        'b2759b3fbd06631840a9638abcd22485' => __DIR__ . '/..' . '/edward1108/edward-captcha/src/helper.php',
         '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
         '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
     );
@@ -87,10 +86,6 @@ class ComposerStaticInitb17d9cf9df517c3dd2f492a1c933c315
             'think\\app\\' => 10,
             'think\\' => 6,
         ),
-        'e' => 
-        array (
-            'edward\\captcha\\' => 15,
-        ),
         'c' => 
         array (
             'cores\\' => 6,
@@ -178,10 +173,6 @@ class ComposerStaticInitb17d9cf9df517c3dd2f492a1c933c315
             1 => __DIR__ . '/..' . '/topthink/think-helper/src',
             2 => __DIR__ . '/..' . '/topthink/think-orm/src',
         ),
-        'edward\\captcha\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/edward1108/edward-captcha/src',
-        ),
         'cores\\' => 
         array (
             0 => __DIR__ . '/../..' . '/cores',

+ 0 - 58
vendor/composer/installed.json

@@ -50,64 +50,6 @@
             "homepage": "http://www.aliyun.com/product/oss/",
             "install-path": "../aliyuncs/oss-sdk-php"
         },
-        {
-            "name": "edward1108/edward-captcha",
-            "version": "1.1",
-            "version_normalized": "1.1.0.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/Edward1108/edward-captcha.git",
-                "reference": "426ceee34507c30d4b21e0dd349b571371aef700"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/Edward1108/edward-captcha/zipball/426ceee34507c30d4b21e0dd349b571371aef700",
-                "reference": "426ceee34507c30d4b21e0dd349b571371aef700",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1.0",
-                "topthink/framework": "^6.0.0"
-            },
-            "time": "2020-07-22T06:49:35+00:00",
-            "type": "library",
-            "extra": {
-                "think": {
-                    "services": [
-                        "edward\\captcha\\CaptchaService"
-                    ],
-                    "config": {
-                        "captcha": "src/config.php"
-                    }
-                }
-            },
-            "installation-source": "dist",
-            "autoload": {
-                "psr-4": {
-                    "edward\\captcha\\": "src/"
-                },
-                "files": [
-                    "src/helper.php"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "edward",
-                    "email": "xuyuanhua1987@163.com"
-                }
-            ],
-            "description": "ThinkPHP6验证码(图片、短信)支持api友好化",
-            "homepage": "https://github.com/Edward1108/edward-captcha",
-            "support": {
-                "issues": "https://github.com/Edward1108/edward-captcha/issues",
-                "source": "https://github.com/Edward1108/edward-captcha/tree/master"
-            },
-            "install-path": "../edward1108/edward-captcha"
-        },
         {
             "name": "ezyang/htmlpurifier",
             "version": "v4.13.0",

+ 2 - 11
vendor/composer/installed.php

@@ -5,7 +5,7 @@
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
-        'reference' => '3c61d97d46a61a4d12312a4ccf194bfb127a2afa',
+        'reference' => '8c86675460affa759294bac5d9ca3530b972921c',
         'name' => 'topthink/think',
         'dev' => true,
     ),
@@ -19,15 +19,6 @@
             'reference' => '053d7ba9e798e4c09b9c5c1edab153d25ea9643a',
             'dev_requirement' => false,
         ),
-        'edward1108/edward-captcha' => array(
-            'pretty_version' => '1.1',
-            'version' => '1.1.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../edward1108/edward-captcha',
-            'aliases' => array(),
-            'reference' => '426ceee34507c30d4b21e0dd349b571371aef700',
-            'dev_requirement' => false,
-        ),
         'ezyang/htmlpurifier' => array(
             'pretty_version' => 'v4.13.0',
             'version' => '4.13.0.0',
@@ -472,7 +463,7 @@
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
-            'reference' => '3c61d97d46a61a4d12312a4ccf194bfb127a2afa',
+            'reference' => '8c86675460affa759294bac5d9ca3530b972921c',
             'dev_requirement' => false,
         ),
         'topthink/think-helper' => array(

+ 0 - 5
vendor/edward1108/edward-captcha/.gitignore

@@ -1,5 +0,0 @@
-/vendor
-/.idea
-composer.phar
-composer.lock
-.DS_Store

+ 0 - 26
vendor/edward1108/edward-captcha/LICENSE

@@ -1,26 +0,0 @@
-Apache Licence是著名的非盈利开源组织Apache采用的协议。
-该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
-允许代码修改,再作为开源或商业软件发布。需要满足
-的条件:
-1. 需要给代码的用户一份Apache Licence ;
-2. 如果你修改了代码,需要在被修改的文件中说明;
-3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
-带有原来代码中的协议,商标,专利声明和其他原来作者规
-定需要包含的说明;
-4. 如果再发布的产品中包含一个Notice文件,则在Notice文
-件中需要带有本协议内容。你可以在Notice中增加自己的
-许可,但不可以表现为对Apache Licence构成更改。
-具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.

Разлика између датотеке није приказан због своје велике величине
+ 0 - 42
vendor/edward1108/edward-captcha/README.md


BIN
vendor/edward1108/edward-captcha/assets/bgs/1.jpg


BIN
vendor/edward1108/edward-captcha/assets/bgs/2.jpg


BIN
vendor/edward1108/edward-captcha/assets/bgs/3.jpg


BIN
vendor/edward1108/edward-captcha/assets/bgs/4.jpg


BIN
vendor/edward1108/edward-captcha/assets/bgs/5.jpg


BIN
vendor/edward1108/edward-captcha/assets/bgs/6.jpg


BIN
vendor/edward1108/edward-captcha/assets/bgs/7.jpg


BIN
vendor/edward1108/edward-captcha/assets/bgs/8.jpg


BIN
vendor/edward1108/edward-captcha/assets/ttfs/1.ttf


BIN
vendor/edward1108/edward-captcha/assets/ttfs/2.ttf


BIN
vendor/edward1108/edward-captcha/assets/ttfs/3.ttf


BIN
vendor/edward1108/edward-captcha/assets/ttfs/4.ttf


BIN
vendor/edward1108/edward-captcha/assets/ttfs/5.ttf


BIN
vendor/edward1108/edward-captcha/assets/ttfs/6.ttf


BIN
vendor/edward1108/edward-captcha/assets/zhttfs/1.ttf


+ 0 - 34
vendor/edward1108/edward-captcha/composer.json

@@ -1,34 +0,0 @@
-{
-  "name": "edward1108/edward-captcha",
-  "description": "ThinkPHP6验证码(图片、短信)支持api友好化",
-  "authors": [
-    {
-      "name": "edward",
-      "email": "xuyuanhua1987@163.com"
-    }
-  ],
-  "require": {
-    "php": ">=7.1.0",
-    "topthink/framework": "^6.0.0"
-  },
-  "homepage": "https://github.com/Edward1108/edward-captcha",
-  "license": "MIT",
-  "autoload": {
-    "psr-4": {
-      "edward\\captcha\\": "src/"
-    },
-    "files": [
-      "src/helper.php"
-    ]
-  },
-  "extra": {
-    "think": {
-      "services": [
-        "edward\\captcha\\CaptchaService"
-      ],
-      "config": {
-        "captcha": "src/config.php"
-      }
-    }
-  }
-}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 40
vendor/edward1108/edward-captcha/src/Captcha.php


Разлика између датотеке није приказан због своје велике величине
+ 0 - 31
vendor/edward1108/edward-captcha/src/CaptchaApi.php


+ 0 - 20
vendor/edward1108/edward-captcha/src/CaptchaController.php

@@ -1,20 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | ThinkPHP [ WE CAN DO IT JUST THINK ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
-// +----------------------------------------------------------------------
-// | Author: yunwuxin <448901948@qq.com>
-// +----------------------------------------------------------------------
-
-namespace edward\captcha;
-
-class CaptchaController
-{
-    public function index(Captcha $captcha, $config = null)
-    {
-        return $captcha->create($config);
-    }
-}

+ 0 - 23
vendor/edward1108/edward-captcha/src/CaptchaService.php

@@ -1,23 +0,0 @@
-<?php
-
-namespace edward\captcha;
-
-use think\Route;
-use think\Service;
-use think\Validate;
-
-class CaptchaService extends Service
-{
-    public function boot()
-    {
-        Validate::maker(function ($validate) {
-            $validate->extend('captcha', function ($value) {
-                return captcha_check($value);
-            }, ':attribute错误!');
-        });
-
-        $this->registerRoutes(function (Route $route) {
-            $route->get('captcha/[:config]', "\\edward\\captcha\\CaptchaController@index");
-        });
-    }
-}

+ 0 - 39
vendor/edward1108/edward-captcha/src/config.php

@@ -1,39 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | Captcha配置文件
-// +----------------------------------------------------------------------
-
-return [
-    //验证码位数
-    'length' => 5,
-    // 验证码字符集合
-    'codeSet' => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY',
-    // 验证码过期时间
-    'expire' => 1800,
-    // 是否使用中文验证码
-    'useZh' => false,
-    // 是否使用算术验证码
-    'math' => false,
-    // 是否使用背景图
-    'useImgBg' => false,
-    //验证码字符大小
-    'fontSize' => 25,
-    // 是否使用混淆曲线
-    'useCurve' => true,
-    //是否添加杂点
-    'useNoise' => true,
-    // 验证码字体 不设置则随机
-    'fontttf' => '',
-    //背景颜色
-    'bg' => [243, 251, 254],
-    // 验证码图片高度
-    'imageH' => 0,
-    // 验证码图片宽度
-    'imageW' => 0,
-
-    // 添加额外的验证码设置
-    // verify => [
-    //     'length'=>4,
-    //    ...
-    //],
-];

+ 0 - 18
vendor/edward1108/edward-captcha/src/facade/Captcha.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace edward\captcha\facade;
-
-use think\Facade;
-
-/**
- * Class Captcha
- * @package edward\captcha\facade
- * @mixin \edward\captcha\Captcha
- */
-class Captcha extends Facade
-{
-    protected static function getFacadeClass()
-    {
-        return \edward\captcha\Captcha::class;
-    }
-}

+ 0 - 18
vendor/edward1108/edward-captcha/src/facade/CaptchaApi.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace edward\captcha\facade;
-
-use think\Facade;
-
-/**
- * Class Captcha
- * @package edward\captcha\facade
- * @mixin \edward\captcha\CaptchaApi
- */
-class CaptchaApi extends Facade
-{
-    protected static function getFacadeClass()
-    {
-        return \edward\captcha\CaptchaApi::class;
-    }
-}

+ 0 - 54
vendor/edward1108/edward-captcha/src/helper.php

@@ -1,54 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | ThinkPHP [ WE CAN DO IT JUST THINK ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
-// +----------------------------------------------------------------------
-// | Author: yunwuxin <448901948@qq.com>
-// +----------------------------------------------------------------------
-
-use edward\captcha\facade\Captcha;
-use think\facade\Route;
-use think\Response;
-
-/**
- * @param string $config
- * @return \think\Response
- */
-function captcha($config = null): Response
-{
-    return Captcha::create($config);
-}
-
-/**
- * @param $config
- * @return string
- */
-function captcha_src($config = null): string
-{
-    return Route::buildUrl('/captcha' . ($config ? "/{$config}" : ''));
-}
-
-/**
- * @param $id
- * @return string
- */
-function captcha_img($id = '', $domid = ''): string
-{
-    $src = captcha_src($id);
-
-    $domid = empty($domid) ? $domid : "id='" . $domid . "'";
-
-    return "<img src='{$src}' alt='captcha' " . $domid . " onclick='this.src=\"{$src}?\"+Math.random();' />";
-}
-
-/**
- * @param string $value
- * @return bool
- */
-function captcha_check($value)
-{
-    return Captcha::check($value);
-}

+ 4 - 5
vendor/services.php

@@ -1,9 +1,8 @@
 <?php 
-// This file is automatically generated at:2021-11-30 00:24:58
+// This file is automatically generated at:2021-11-30 01:09:12
 declare (strict_types = 1);
 return array (
-  0 => 'edward\\captcha\\CaptchaService',
-  1 => 'think\\app\\Service',
-  2 => 'think\\trace\\Service',
-  3 => 'think\\worker\\Service',
+  0 => 'think\\app\\Service',
+  1 => 'think\\trace\\Service',
+  2 => 'think\\worker\\Service',
 );

Неке датотеке нису приказане због велике количине промена