li97 9 months ago
commit
23ee9e92e3
75 changed files with 3747 additions and 0 deletions
  1. 32 0
      LICENSE.txt
  2. 56 0
      README.md
  3. 1 0
      app/.htaccess
  4. 22 0
      app/AppService.php
  5. 121 0
      app/BaseController.php
  6. 58 0
      app/ExceptionHandle.php
  7. 8 0
      app/Request.php
  8. 200 0
      app/admin/controller/Index.php
  9. 180 0
      app/admin/controller/Indextwo.php
  10. 50 0
      app/admin/controller/Login.php
  11. 15 0
      app/admin/controller/Verify.php
  12. 18 0
      app/admin/middleware.php
  13. 14 0
      app/admin/middleware/SessionInit.php
  14. 52 0
      app/admin/view/login/index.html
  15. 24 0
      app/common.php
  16. 32 0
      app/common/business/Demo.php
  17. 15 0
      app/common/model/mysql/AdminUser.php
  18. 34 0
      app/common/model/mysql/Demo.php
  19. 156 0
      app/controller/Data.php
  20. 34 0
      app/controller/Demo.php
  21. 24 0
      app/controller/Error.php
  22. 17 0
      app/controller/Index.php
  23. 30 0
      app/controller/Learn.php
  24. 16 0
      app/demo/controller/Detail.php
  25. 26 0
      app/demo/controller/E.php
  26. 17 0
      app/demo/controller/Index.php
  27. 40 0
      app/demo/controller/M.php
  28. 33 0
      app/demo/exception/Http.php
  29. 12 0
      app/demo/middleware.php
  30. 31 0
      app/demo/middleware/Check.php
  31. 31 0
      app/demo/middleware/Detail.php
  32. 8 0
      app/demo/provider.php
  33. 11 0
      app/demo/route/demo.php
  34. 17 0
      app/event.php
  35. 10 0
      app/middleware.php
  36. 9 0
      app/provider.php
  37. 9 0
      app/service.php
  38. 196 0
      app/tytw/controller/Index.php
  39. 15 0
      app/tytw/controller/Verify.php
  40. 18 0
      app/tytw/middleware.php
  41. 14 0
      app/tytw/middleware/SessionInit.php
  42. 52 0
      app/tytw/view/login/index.html
  43. 52 0
      composer.json
  44. 1379 0
      composer.lock
  45. 32 0
      config/app.php
  46. 29 0
      config/cache.php
  47. 43 0
      config/captcha.php
  48. 11 0
      config/category.php
  49. 9 0
      config/console.php
  50. 20 0
      config/cookie.php
  51. 63 0
      config/database.php
  52. 24 0
      config/filesystem.php
  53. 27 0
      config/lang.php
  54. 45 0
      config/log.php
  55. 8 0
      config/middleware.php
  56. 45 0
      config/route.php
  57. 19 0
      config/session.php
  58. 15 0
      config/status.php
  59. 10 0
      config/trace.php
  60. 29 0
      config/view.php
  61. 2 0
      extend/.gitignore
  62. 20 0
      public/ - 副本.htaccess
  63. 8 0
      public/- 副本.htaccess
  64. 20 0
      public/.htaccess
  65. BIN
      public/favicon.ico
  66. 24 0
      public/index.php
  67. 0 0
      public/nginx.htaccess
  68. 2 0
      public/robots.txt
  69. 19 0
      public/router.php
  70. 2 0
      public/static/.gitignore
  71. 17 0
      route/app.php
  72. 2 0
      runtime/.gitignore
  73. 10 0
      think
  74. 2 0
      vendor/.gitignore
  75. 1 0
      view/README.md

+ 32 - 0
LICENSE.txt

@@ -0,0 +1,32 @@
+
+ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
+版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)
+All rights reserved。
+ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
+
+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.

+ 56 - 0
README.md

@@ -0,0 +1,56 @@
+ThinkPHP 6.0
+===============
+
+> 运行环境要求PHP7.2+,兼容PHP8.1
+
+[官方应用服务市场](https://market.topthink.com) | [`ThinkAPI`——官方统一API服务](https://docs.topthink.com/think-api)
+
+ThinkPHPV6.0版本由[亿速云](https://www.yisu.com/)独家赞助发布。
+
+## 主要新特性
+
+* 采用`PHP7`强类型(严格模式)
+* 支持更多的`PSR`规范
+* 原生多应用支持
+* 更强大和易用的查询
+* 全新的事件系统
+* 模型事件和数据库事件统一纳入事件系统
+* 模板引擎分离出核心
+* 内部功能中间件化
+* SESSION/Cookie机制改进
+* 对Swoole以及协程支持改进
+* 对IDE更加友好
+* 统一和精简大量用法
+
+## 安装
+
+~~~
+composer create-project topthink/think tp 6.0.*
+~~~
+
+如果需要更新框架使用
+~~~
+composer update topthink/framework
+~~~
+
+## 文档
+
+[完全开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content)
+
+## 参与开发
+
+请参阅 [ThinkPHP 核心框架包](https://github.com/top-think/framework)。
+
+## 版权信息
+
+ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
+
+本项目包含的第三方源码和二进制文件之版权信息另行标注。
+
+版权所有Copyright © 2006-2021 by ThinkPHP (http://thinkphp.cn)
+
+All rights reserved。
+
+ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
+
+更多细节参阅 [LICENSE.txt](LICENSE.txt)

+ 1 - 0
app/.htaccess

@@ -0,0 +1 @@
+deny from all

+ 22 - 0
app/AppService.php

@@ -0,0 +1,22 @@
+<?php
+declare (strict_types = 1);
+
+namespace app;
+
+use think\Service;
+
+/**
+ * 应用服务类
+ */
+class AppService extends Service
+{
+    public function register()
+    {
+        // 服务注册
+    }
+
+    public function boot()
+    {
+        // 服务启动
+    }
+}

+ 121 - 0
app/BaseController.php

@@ -0,0 +1,121 @@
+<?php
+declare (strict_types = 1);
+
+namespace app;
+
+use think\App;
+use think\exception\ValidateException;
+use think\Validate;
+
+/**
+ * 控制器基础类
+ */
+abstract class BaseController
+{
+    /**
+     * Request实例
+     * @var \think\Request
+     */
+    protected $request;
+
+    /**
+     * 应用实例
+     * @var \think\App
+     */
+    protected $app;
+
+    /**
+     * 是否批量验证
+     * @var bool
+     */
+    protected $batchValidate = false;
+
+    /**
+     * 控制器中间件
+     * @var array
+     */
+    protected $middleware = [];
+
+    /**
+     * 构造方法
+     * @access public
+     * @param  App  $app  应用对象
+     */
+    public function __construct(App $app)
+    {
+        $this->app     = $app;
+        $this->request = $this->app->request;
+
+        // 控制器初始化
+        $this->initialize();
+    }
+
+    // 初始化
+    protected function initialize()
+    {}
+
+    /**
+     * 验证数据
+     * @access protected
+     * @param  array        $data     数据
+     * @param  string|array $validate 验证器名或者验证规则数组
+     * @param  array        $message  提示信息
+     * @param  bool         $batch    是否批量验证
+     * @return array|string|true
+     * @throws ValidateException
+     */
+    protected function validate(array $data, $validate, array $message = [], bool $batch = false)
+    {
+        if (is_array($validate)) {
+            $v = new Validate();
+            $v->rule($validate);
+        } else {
+            if (strpos($validate, '.')) {
+                // 支持场景
+                [$validate, $scene] = explode('.', $validate);
+            }
+            $class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate);
+            $v     = new $class();
+            if (!empty($scene)) {
+                $v->scene($scene);
+            }
+        }
+
+        $v->message($message);
+
+        // 是否批量验证
+        if ($batch || $this->batchValidate) {
+            $v->batch(true);
+        }
+
+        return $v->failException(true)->check($data);
+    }
+
+
+    //自己创建一个 链接错误的放回值处理方法
+    public function __call($name, $arguments)
+    {
+        // TODO: Implement __call() method.
+//        dump($name);
+//        dump($arguments);
+
+        //逻辑:
+        //如果我们的模块是 API 模式,需要输出API的数据格式
+        //如果我们是模板引擎的方式
+        //
+//        // 改写通用方法
+//        $result = [
+//            "status" => 1,
+//            "message" => "找不到该方法--{$name}方法不存在",
+//            "result" => null,
+//        ];
+//        return json($result,400);
+
+        return show(config("status.action_not_found"),"找不到该方法--{$name}方法不存在",null,404);
+
+
+
+    }
+
+
+}

+ 58 - 0
app/ExceptionHandle.php

@@ -0,0 +1,58 @@
+<?php
+namespace app;
+
+use think\db\exception\DataNotFoundException;
+use think\db\exception\ModelNotFoundException;
+use think\exception\Handle;
+use think\exception\HttpException;
+use think\exception\HttpResponseException;
+use think\exception\ValidateException;
+use think\Response;
+use Throwable;
+
+/**
+ * 应用异常处理类
+ */
+class ExceptionHandle extends Handle
+{
+    /**
+     * 不需要记录信息(日志)的异常类列表
+     * @var array
+     */
+    protected $ignoreReport = [
+        HttpException::class,
+        HttpResponseException::class,
+        ModelNotFoundException::class,
+        DataNotFoundException::class,
+        ValidateException::class,
+    ];
+
+    /**
+     * 记录异常信息(包括日志或者其它方式记录)
+     *
+     * @access public
+     * @param  Throwable $exception
+     * @return void
+     */
+    public function report(Throwable $exception): void
+    {
+        // 使用内置的方式记录异常日志
+        parent::report($exception);
+    }
+
+    /**
+     * Render an exception into an HTTP response.
+     *
+     * @access public
+     * @param \think\Request   $request
+     * @param Throwable $e
+     * @return Response
+     */
+    public function render($request, Throwable $e): Response
+    {
+        // 添加自定义异常处理机制
+
+        // 其他错误交给系统处理
+        return parent::render($request, $e);
+    }
+}

+ 8 - 0
app/Request.php

@@ -0,0 +1,8 @@
+<?php
+namespace app;
+
+// 应用请求对象类
+class Request extends \think\Request
+{
+
+}

+ 200 - 0
app/admin/controller/Index.php

@@ -0,0 +1,200 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\admin\controller;
+
+use app\BaseController;
+
+use Darabonba\OpenApi\OpenApiClient;
+use AlibabaCloud\OpenApiUtil\OpenApiUtilClient;
+use Darabonba\OpenApi\Models\Config;
+use Darabonba\OpenApi\Models\Params;
+use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions;
+use Darabonba\OpenApi\Models\OpenApiRequest;
+
+use think\facade\Env;
+
+class Index extends BaseController{
+
+    public function index(){
+//        echo 'index-admin';
+
+         $overview = $_GET['overview'];
+         $audiourl = $_GET['audiourl'];
+         if(!$overview){
+             echo "请传入音频解析方向的描述";
+             die;
+         }
+        if(!$audiourl){
+            echo "请传入音频文件链接";
+            die;
+        }
+
+        $result = $this->createTaskOneInfo($audiourl,$overview);
+
+        var_dump($result);
+    }
+    public function indextwo(){
+//        echo 'index-admin';
+
+        $taskid = $_GET['taskid'];
+        if(!$taskid){
+            echo "请传入听悟任务的ID";
+            die;
+        }
+
+        $result = $this->getTaskOneInfo($taskid);
+        var_dump($result);
+    }
+
+
+    /**
+     * 使用AK&SK初始化账号Client
+     * @return OpenApiClient Client
+     */
+    public static function createClient(){
+        // 工程代码泄露可能会导致 AccessKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考。
+        // 建议使用更安全的 STS 方式,更多鉴权访问方式请参见:https://help.aliyun.com/document_detail/311677.html。
+        $config = new Config([
+            // 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_ID。
+            "accessKeyId" => Env::get("AliyunTingwu.AccessKeyId"),
+            // 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_SECRET。
+            "accessKeySecret" => Env::get("AliyunTingwu.AccessKeySecret")
+        ]);
+        // Endpoint 请参考 https://api.aliyun.com/product/tingwu
+        $config->endpoint = "tingwu.cn-beijing.aliyuncs.com";
+        return new OpenApiClient($config);
+    }
+
+    /**
+     * API 相关
+     * @return Params OpenApi.Params
+     */
+    public static function createTaskApiInfo(){
+        $params = new Params([
+            // 接口名称
+            "action" => "CreateTask",
+            // 接口版本
+            "version" => "2023-09-30",
+            // 接口协议
+            "protocol" => "HTTPS",
+            // 接口 HTTP 方法
+            "method" => "PUT",
+            "authType" => "AK",
+            "style" => "ROA",
+            // 接口 PATH
+            "pathname" => "/openapi/tingwu/v2/tasks",
+            // 接口请求体内容格式
+            "reqBodyType" => "json",
+            // 接口响应体内容格式
+            "bodyType" => "json"
+        ]);
+        return $params;
+    }
+
+    /**
+     * @param string[] $args
+     * @return void
+     */
+    public static function createTaskOneInfo($audiourl='',$overview=''){
+        $client = self::createClient();
+        $params = self::createTaskApiInfo();
+        // query params
+        $queries = [];
+        $queries["type"] = "offline";
+        // body params
+//        $body = [
+//            "AppKey" => "jB3lTWgWwCCmO12g",
+//            "Input" => [
+//                "SourceLanguage" => "cn",
+//                "FileUrl" => "https://crmapi.kedingdang.com/Intentionclient/getHuijieCallidRecordingFile?callid=9903ca31-b0c5-4d9b-aad1-cd6f97f87c43"
+//            ]
+//        ];
+        //  --- 之前模拟的数据
+        //设置数据项  - -  第五层
+        $contents = array();
+        $contents['Name'] = "test";
+        $contents['Prompt'] = $overview?($overview.":\n {Transcription}"):"对话中客户表达的完整内容输出出来,并且请帮我将下面的对话进行总结,分析对话中客户是否有下单意愿以及商品是否感兴趣:\n {Transcription}";
+        $contents['Model'] = "tingwu-turbo";
+        $contents['TransType'] = "chat";
+
+        //设置数据项  - -  第四层
+        $customPrompt = array();
+        $customPrompt['Contents'] = $contents;
+
+        //设置数据项  - -  第三层
+        $parameters = array();
+        $parameters['CustomPromptEnabled'] = 'True';
+        $parameters['CustomPrompt'] = $customPrompt;
+
+        $inputone = array();
+        $inputone['SourceLanguage'] = 'cn';
+        $inputone['TaskKey'] = 'task'.'123123'.time();
+        $inputone['FileUrl'] = $audiourl?$audiourl:'https://crmapi.kedingdang.com/Intentionclient/getHuijieCallidRecordingFile?callid=9903ca31-b0c5-4d9b-aad1-cd6f97f87c43';
+
+        //设置数据项  - -  第二层
+        $body = array();
+        $body['AppKey'] = 'jB3lTWgWwCCmO12g';
+        $body['Input'] = $inputone;
+        $body['Parameters'] = $parameters;
+
+
+        // runtime options
+        $runtime = new RuntimeOptions([]);
+        $request = new OpenApiRequest([
+            "query" => OpenApiUtilClient::query($queries),
+            "body" => $body
+        ]);
+        // 复制代码运行请自行打印 API 的返回值
+        // 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
+        $result = $client->callApi($params, $request, $runtime);
+        return $result;
+    }
+
+
+    /**
+     * API 相关
+     * @param string $TaskId
+     * @return Params OpenApi.Params
+     */
+    public static function getTaskApiInfo($TaskId){
+        $params = new Params([
+            // 接口名称
+            "action" => "GetTaskInfo",
+            // 接口版本
+            "version" => "2023-09-30",
+            // 接口协议
+            "protocol" => "HTTPS",
+            // 接口 HTTP 方法
+            "method" => "GET",
+            "authType" => "AK",
+            "style" => "ROA",
+            // 接口 PATH
+            "pathname" => "/openapi/tingwu/v2/tasks/" . $TaskId . "",
+            // 接口请求体内容格式
+            "reqBodyType" => "json",
+            // 接口响应体内容格式
+            "bodyType" => "json"
+        ]);
+        return $params;
+    }
+
+    /**
+     * @param string[] $args
+     * @return void
+     */
+    public static function getTaskOneInfo($args){
+        $client = self::createClient();
+        $params = self::getTaskApiInfo($args);//"5125c43149db4e01a2bf92bb6d34128b"
+        // runtime options
+        $runtime = new RuntimeOptions([]);
+        $request = new OpenApiRequest([]);
+        // 复制代码运行请自行打印 API 的返回值
+        // 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
+        $result = $client->callApi($params, $request, $runtime);
+        return $result;
+    }
+
+}

+ 180 - 0
app/admin/controller/Indextwo.php

@@ -0,0 +1,180 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\admin\controller;
+
+use app\BaseController;
+
+use AlibabaCloud\SDK\Tingwu\V20230930\Tingwu;
+use \Exception;
+use AlibabaCloud\Tea\Exception\TeaError;
+use AlibabaCloud\Tea\Utils\Utils;
+
+use Darabonba\OpenApi\Models\Config;
+use AlibabaCloud\SDK\Tingwu\V20230930\Models\CreateTaskRequest;
+use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions;
+
+use think\facade\Env;
+
+class Indextwo extends BaseController{
+
+    public function index(){
+//        echo 'index-admin';
+
+//        $ceshi = getenv("NUMBER_OF_PROCESSORS");
+//        $aaa = getenv("PROCESSOR_ARCHITECTURE");
+//        $accessKeyId = getenv("ALIBABA_CLOUD_ACCESS_KEY_ID");
+//        $accessKeySecret = getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET");
+
+//        $accessKeyId = Env::get("AliyunTingwu.AccessKeyId");
+//        $accessSecret = Env::get("AliyunTingwu.AccessKeySecret");
+//        echo $accessKeyId;
+//        echo $accessSecret;
+//        die;
+
+        $this->main(array_slice(array(), 1));
+    }
+
+
+    /**
+     * 使用AK&SK初始化账号Client
+     * @return Tingwu Client
+     */
+    public static function createClient(){
+        // 工程代码泄露可能会导致 AccessKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考。
+        // 建议使用更安全的 STS 方式,更多鉴权访问方式请参见:https://help.aliyun.com/document_detail/311677.html。
+        $config = new Config([
+            // 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_ID。
+            "accessKeyId" => Env::get("AliyunTingwu.AccessKeyId"),
+            // 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_SECRET。
+            "accessKeySecret" => Env::get("AliyunTingwu.AccessKeySecret")
+        ]);
+        // Endpoint 请参考 https://api.aliyun.com/product/tingwu
+        $config->endpoint = "tingwu.cn-beijing.aliyuncs.com";
+        return new Tingwu($config);
+    }
+
+    /**
+     * @param string[] $args
+     * @return void
+     */
+    public static function main($args){
+        $client = self::createClient();
+
+        //  --- 之前模拟的数据
+        //设置数据项  - -  第五层
+        $contents = array();
+        $contents['Name'] = "test";
+        $contents['Prompt'] = "对话中客户表达的完整内容输出出来,并且请帮我将下面的对话进行总结,分析对话中客户是否有下单意愿以及商品是否感兴趣:\n {Transcription}";
+        $contents['Model'] = "tingwu-turbo";
+        $contents['TransType'] = "chat";
+
+        //设置数据项  - -  第四层
+        $customPrompt = array();
+        $customPrompt['Contents'] = $contents;
+
+        //设置数据项  - -  第三层
+        $parameters = array();
+        $parameters['CustomPromptEnabled'] = 'True';
+        $parameters['CustomPrompt'] = $customPrompt;
+
+        $inputone = array();
+        $inputone['SourceLanguage'] = 'cn';
+        $inputone['TaskKey'] = 'task'.'123123'.time();
+        $inputone['FileUrl'] = 'https://crmapi.kedingdang.com/Intentionclient/getHuijieCallidRecordingFile?callid=9903ca31-b0c5-4d9b-aad1-cd6f97f87c43';
+
+        //设置数据项  - -  第二层
+        $body = array();
+        $body['AppKey'] = 'jB3lTWgWwCCmO12g';
+        $body['Input'] = $inputone;
+        $body['Parameters'] = $parameters;
+
+        //设置数据项  - -  第一层
+        $data = array();
+        $data['type'] = 'offline';
+        $data['body'] = $body;
+
+        $createTaskRequest = new CreateTaskRequest([
+            "type" => "offline",
+            "body" => $body
+        ]);
+        $headers = [];
+        try {
+            // 复制代码运行请自行打印 API 的返回值
+            $client->createTaskWithOptions($createTaskRequest, $headers, new RuntimeOptions([]));
+        }
+        catch (Exception $error) {
+            if (!($error instanceof TeaError)) {
+                $error = new TeaError([], $error->getMessage(), $error->getCode(), $error);
+            }
+            // 此处仅做打印展示,请谨慎对待异常处理,在工程项目中切勿直接忽略异常。
+            // 错误 message
+            var_dump($error->message);
+            // 诊断地址
+            if($error->data){
+                var_dump($error->data["Recommend"]);
+            }
+            Utils::assertAsString($error->message);
+        }
+    }
+
+
+//  --- 之前模拟的数据
+//            die;
+//            //这里开始创建听悟的任务
+//
+//            //设置数据项  - -  第五层
+//            $contents = array();
+//            $contents['Name'] = "test";
+//            $contents['Prompt'] = "对话中客户表达的完整内容输出出来,并且请帮我将下面的对话进行总结,分析对话中客户是否有下单意愿以及商品是否感兴趣:\n {Transcription}";
+//            $contents['Model'] = "tingwu-turbo";
+//            $contents['TransType'] = "chat";
+//
+//            //设置数据项  - -  第四层
+//            $customPrompt = array();
+//            $customPrompt['Contents'] = $contents;
+//
+//            //设置数据项  - -  第三层
+//            $parameters = array();
+//            $parameters['CustomPromptEnabled'] = 'True';
+//            $parameters['CustomPrompt'] = $customPrompt;
+//
+//            $inputone = array();
+//            $inputone['SourceLanguage'] = 'cn';
+//            $inputone['TaskKey'] = 'task'.'123123'.time();
+//            $inputone['FileUrl'] = 'https://crmapi.kedingdang.com/Intentionclient/getHuijieCallidRecordingFile?callid=9903ca31-b0c5-4d9b-aad1-cd6f97f87c43';
+//
+//            //设置数据项  - -  第二层
+//            $body = array();
+//            $body['AppKey'] = 'jB3lTWgWwCCmO12g';
+//            $body['Input'] = $inputone;
+//            $body['Parameters'] = $parameters;
+//
+//            //设置数据项  - -  第一层
+//            $data = array();
+//            $data['type'] = 'offline';
+//            $data['body'] = $body;
+//            //将数据转换为JSON格式
+//            $data_string = json_encode($data);
+//            //设置请求URL
+//            $url = '/openapi/tingwu/v2/tasks';
+//            //初始化curl请求
+//            $curl = curl_init();
+//            //设置curl选项
+//            curl_setopt($curl, CURLOPT_URL, $url);
+//            curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
+//            curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
+//            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
+//            curl_setopt($curl, CURLOPT_HTTPHEADER, array(
+//                    'Content-Type: application/json',
+//                    'Content-Length: ' . strlen($data_string))
+//            );
+//            //执行curl请求
+//            $response = curl_exec($curl);
+//            //关闭curl请求
+//            curl_close($curl);
+//            //输出响应信息
+//            echo $response;
+}

+ 50 - 0
app/admin/controller/Login.php

@@ -0,0 +1,50 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\admin\controller;
+
+use app\BaseController;
+use think\facade\View;
+
+class Login extends BaseController{
+
+    public function index(){
+//        echo '111';
+        return View::fetch();
+    }
+
+    public function md5(){
+        return md5("123456");
+    }
+
+    public function check(){
+//        return show(config("status.success"),"登录成功");
+
+        if(!$this->request->isPost()){
+            return show(config("status.error"),"请求方式错误");
+        }
+
+        //参数验证  1、原生方式   2、TP6验证机制
+        //原生方式
+        $username = $this->request->param("username","","trim");
+        $password = $this->request->param("password","","trim");
+        $captcha = $this->request->param("captcha","","trim");
+
+        if(empty($username) || empty($password) || empty($captcha)){
+            return show(config("status.error","参数不能为空"));
+        }
+        //需要校验验证码
+        if(!captcha_check($captcha)){//中间件中 session 需要开启才能正常验证
+            //验证码校验失败
+            return show(config("status.error"),"验证码不正确");
+        }
+
+        return show(config("status.error"),"登录成功");
+    }
+
+
+}
+
+

+ 15 - 0
app/admin/controller/Verify.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+ namespace app\admin\controller;
+
+ use think\captcha\facade\Captcha;
+
+ class Verify{
+
+     public function index(){
+         return Captcha::create('adminverify');
+     }
+ }

+ 18 - 0
app/admin/middleware.php

@@ -0,0 +1,18 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+// 全局中间件定义文件
+return [
+    // 全局请求缓存
+    // \think\middleware\CheckRequestCache::class,
+    // 多语言加载
+    // \think\middleware\LoadLangPack::class,
+    // Session初始化
+    // \think\middleware\SessionInit::class,
+
+//    \app\admin\middleware\SessionInit::class
+];
+

+ 14 - 0
app/admin/middleware/SessionInit.php

@@ -0,0 +1,14 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+namespace app\admin\middleware;
+
+class SessionInit
+{
+
+
+}
+

+ 52 - 0
app/admin/view/login/index.html

@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>后台管理-登陆</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta http-equiv="Access-Control-Allow-Origin" content="*">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="format-detection" content="telephone=no">
+    <link rel="stylesheet" href="{__STATIC_ADMIN_PATH}lib/layui-v2.5.4/css/layui.css" media="all">
+    <link rel="stylesheet" href="{__STATIC_ADMIN_PATH}css/login.css">
+    <!--[if lt IE 9]>
+    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
+    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
+    <![endif]-->
+
+</head>
+<body>
+<div id="container">
+    <div></div>
+    <div class="admin-login-background">
+        <div class="admin-header">
+            <span>singwa</span>
+        </div>
+        <form class="layui-form" action="">
+            <div>
+                <i class="layui-icon layui-icon-username admin-icon"></i>
+                <input type="text" name="username" placeholder="请输入用户名" autocomplete="off" class="layui-input admin-input admin-input-username" value="admin">
+            </div>
+            <div>
+                <i class="layui-icon layui-icon-password admin-icon"></i>
+                <input type="password" name="password" placeholder="请输入密码" autocomplete="off" class="layui-input admin-input" value="123456">
+            </div>
+            <div>
+                <input type="text" name="captcha" placeholder="请输入验证码" autocomplete="off" class="layui-input admin-input admin-input-verify input-val" value="">
+                <!--<canvas id="canvas" class="admin-captcha" width="100" height="43"></canvas>-->
+                <div class="admin-captcha" >{:captcha_img('','',100,40)}</div>
+                <!--<div><img src="/admin/verify/index" alt=""></div>    没有配置刷新 以及 cookie-->
+                <!--<div><img src="{:url('verify/index')}" alt=""></div>      没有配置刷新 以及 cookie-->
+            </div>
+            <button class="layui-btn admin-button" lay-submit="" lay-filter="login">登 陆</button>
+        </form>
+    </div>
+</div>
+<script src="{__STATIC_ADMIN_PATH}lib/layui-v2.5.4/layui.js" charset="utf-8"></script>
+<script src="{__STATIC_ADMIN_PATH}lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
+<script src="{__STATIC_ADMIN_PATH}js/common.js" charset="utf-8"></script>
+<script src="{__STATIC_ADMIN_PATH}js/login.js?v9"></script>
+</body>
+</html>

+ 24 - 0
app/common.php

@@ -0,0 +1,24 @@
+<?php
+// 应用公共文件
+
+
+
+// --------------  下边都是 自己添加的 ----------
+
+/**
+ * 通用话 API 数据格式输出
+ * @param $status
+ * @param string $message
+ * @param array $data
+ * @param int $httpStatus
+ * @return \think\response\Json
+ */
+function show($status,$message = "error",$data = [],$httpStatus = 200){
+    $result = [
+        "status" => $status,
+        "message" => $message,
+        "result" => $data,
+    ];
+
+    return json($result,$httpStatus);
+}

+ 32 - 0
app/common/business/Demo.php

@@ -0,0 +1,32 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+namespace app\common\business;
+
+use app\common\model\mysql\Demo as mysqlDemo;
+
+class Demo{
+
+    /**
+     * business 层通过 getDemoDataByCategoryId 来获取数据
+     * @param $categoryId
+     * @param int $limit
+     * @return array
+     */
+    public function getDemoDataByCategoryId($categoryId,$limit = 10){
+        $model = new mysqlDemo;
+        $results = $model->getDemoDataByCategoryId($categoryId);
+
+        if(empty($results)){
+            return [];
+        }
+        $cagegorys = config("category");
+        foreach ($results as $key=>$result){
+            $results[$key]['categoryName'] = $cagegorys[$result['category_id']] ?? '--';
+        }
+        return $results;
+    }
+}

+ 15 - 0
app/common/model/mysql/AdminUser.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\common\model\mysql;
+
+use think\Model;
+
+class AdminUser extends Model {
+
+    public function getAdminUserByUsername($username){
+
+    }
+}

+ 34 - 0
app/common/model/mysql/Demo.php

@@ -0,0 +1,34 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+namespace app\common\model\mysql;
+
+use think\Model;
+
+class Demo extends Model{
+
+    public function getStatusTextAttr($value,$data){
+        $status = [
+            0 => '待审核',
+            1 => '正常',
+            2 => '错误',
+            99 => '删除',
+        ];
+        return $status[$data['status']];
+    }
+
+    public function getDemoDataByCategoryId($categoryId,$limit = 10){
+        if(empty($categoryId)){
+            return [];
+        }
+        $results = $this->where("category_id",$categoryId)
+            ->limit($limit)
+            ->order("id","desc")
+            ->select()
+            ->toArray();
+        return $results;
+    }
+}

+ 156 - 0
app/controller/Data.php

@@ -0,0 +1,156 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+namespace app\controller;
+
+use app\BaseController;
+use think\facade\Db;//第一种  通过门面模式的方式获取
+
+use app\model\Demo;
+class Data extends BaseController{
+
+    /**
+     * 通过模型的方法获取 数据库数据
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function model1(){
+        $result = Demo::find(2);
+        dump($result->toArray());
+    }
+
+    public function model2(){
+        $modelObj = new Demo();
+        $result = $modelObj->where("category_id",3)
+            ->limit(2)
+            ->select();
+//        dump($result);
+
+        foreach ($result as $resultvar){
+//            dump($resultvar->title);
+
+            dump($resultvar['title']);
+
+
+            dump($resultvar->status_text);
+        }
+
+    }
+
+
+    /**
+     * 查询数据
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function index(){
+
+//        //第一种  通过门面模式的方式获取
+//        $result = Db::table("mall_demo")->where("id",2)->find();
+//        dump($result);
+
+//        //通过容器的方式来获取
+//        $result = app("db")->table("mall_demo")->where("id",2)->find();
+//        dump($result);
+
+        //获取一条
+        $result = Db::table("mall_demo")
+            ->order("id","desc")
+            ->find();
+        dump($result);
+
+        //获取获取多条
+        $result = Db::table("mall_demo")
+            ->order("id","desc")
+            ->limit(2,2) //可以做分页的逻辑 --- 这个需要计算开始值
+            ->select();
+        dump($result);
+
+        //获取获取多条 -- 分页方式
+        $result = Db::table("mall_demo")
+            ->order("id","desc")
+            ->page(1,2) //可以做分页的逻辑  ---  这个不需要计算开始值
+            ->select();
+        dump($result);
+
+        //获取获取多条 -- 范围值
+        $result = Db::table("mall_demo")
+            ->where("id",">",2)
+            ->select();
+        dump($result);
+
+        //获取获取多条 -- 多条件
+        $result = Db::table("mall_demo")
+            ->where("id",">",2)
+            ->where("category_id","=",3)
+            ->select();
+        dump($result);
+
+        //获取获取多条 -- 多条件
+        $result = Db::table("mall_demo")
+            ->where([
+                ["id",">",2],
+                ["category_id","=",3],
+                ["id","in","4,5,6"]
+            ])
+            ->select();
+        dump($result);
+
+    }
+
+    /**
+     * 打印sql
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public function abc(){
+        //第一种  --- 打印sql
+        $result = Db::table("mall_demo")->where("id",2)->fetchSql()->find();
+        dump($result);
+        //第二种  --- 打印sql
+        $result = Db::table("mall_demo")->where("id",2)->find();
+        echo Db::getLastSql();
+        exit;
+    }
+
+    /**
+     * 新增逻辑
+     */
+    public function demo(){
+        $data = [
+            "title" => "深刻的反思就",
+            "category_id" => 4,
+        ];
+        $result = Db::table("mall_demo")->insert($data);
+        echo Db::getLastSql();
+        dump($result);
+    }
+
+    /**
+     * 真正删除逻辑
+     */
+    public function demodel(){
+        $result = Db::table("mall_demo")->where("id",1)->delete(1);
+        echo Db::getLastSql();
+        dump($result);
+    }
+
+    /**
+     * 真正更新逻辑
+     */
+    public function demoupdate(){
+        $result = Db::table("mall_demo")
+            ->where("id",2)
+            ->update([
+                "title" => "真是的哎",
+            ]);
+        echo Db::getLastSql();
+        dump($result);
+    }
+}

+ 34 - 0
app/controller/Demo.php

@@ -0,0 +1,34 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\controller;
+
+use app\BaseController;
+
+class Demo extends BaseController{
+
+     public function show(){
+         return 'this is app demo';
+     }
+
+     public function showjson(){
+         $result = [
+             "status" => 1,
+             "message" => "OK",
+             "result" => [
+                 'id' => 1,
+             ]
+         ];
+
+         return json($result);
+     }
+
+     public function request(){
+         dump($this->request->param('aa',1,"intval"));
+     }
+
+
+
+}

+ 24 - 0
app/controller/Error.php

@@ -0,0 +1,24 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+namespace app\controller;
+
+class Error{
+    public function __call($name, $arguments)
+    {
+        // TODO: Implement __call() method.
+
+//        dump($name);
+//        dump($arguments);
+
+        $result = [
+            "status" => config("status.controller_not_found"),
+            "message" => "找不到该控制器--控制器不存在",
+            "result" => null,
+        ];
+        return json($result,400);
+    }
+}

+ 17 - 0
app/controller/Index.php

@@ -0,0 +1,17 @@
+<?php
+namespace app\controller;
+
+use app\BaseController;
+
+class Index extends BaseController
+{
+    public function index()
+    {
+        return '<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:) </h1><p> ThinkPHP V' . \think\facade\App::version() . '<br/><span style="font-size:30px;">16载初心不改 - 你值得信赖的PHP框架</span></p><span style="font-size:25px;">[ V6.0 版本由 <a href="https://www.yisu.com/" target="yisu">亿速云</a> 独家赞助发布 ]</span></div><script type="text/javascript" src="https://e.topthink.com/Public/static/client.js"></script><think id="ee9b1aa918103c4fc"></think>';
+    }
+
+    public function hello($name = 'ThinkPHP6')
+    {
+        return 'hello,' . $name;
+    }
+}

+ 30 - 0
app/controller/Learn.php

@@ -0,0 +1,30 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\controller;
+
+use think\Request;
+
+use think\facade\Request as Abc;//第五种方式获取值  框架下的门面模式
+
+class Learn{
+    public function index(Request $request){//这个是方法的依赖注入方式获取参数
+        //第二种方式获取值
+        dump($request->param('aa'));
+
+        //第三种方式获取值   ----  老师个人习惯用这个方式
+        dump(input('aa'));
+
+        //第四种方式获取值
+        dump(request()->param("aa"));
+
+        //第五种方式获取值  框架下的门面模式
+        dump(Abc::param("aa"));
+
+        $request->isPost();//等等
+
+
+    }
+}

+ 16 - 0
app/demo/controller/Detail.php

@@ -0,0 +1,16 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\demo\controller;
+
+use app\BaseController;
+
+class Detail extends BaseController{
+
+    public function index(){
+        dump($this->request->type);
+    }
+
+}

+ 26 - 0
app/demo/controller/E.php

@@ -0,0 +1,26 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\demo\controller;
+
+use app\BaseController;
+
+class E extends BaseController{
+
+    public function index(){
+        //自定一返回异常的状态码
+        throw new \think\exception\HttpException(400,"找不到对应的数据");
+    }
+
+    public function two(){
+        //接口异常报错的 异常处理显示
+        echo '1'.$aa;
+    }
+
+    public function abc(){
+        dump($this->request->type);
+    }
+
+}

+ 17 - 0
app/demo/controller/Index.php

@@ -0,0 +1,17 @@
+<?php
+namespace app\demo\controller;
+
+use app\BaseController;
+
+class Index extends BaseController{
+
+    public function abc(){
+        return 123456;
+    }
+
+    public function hello(){
+        return "hello1 ";
+    }
+
+
+}

+ 40 - 0
app/demo/controller/M.php

@@ -0,0 +1,40 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+namespace app\demo\controller;
+
+use app\BaseController;
+use app\common\business\Demo;
+class m extends BaseController{
+
+    public function index(){
+        $categoryId = $this->request->param("category_id",0,"intval");
+        if(empty($categoryId)){
+            return show(config("status.error"),"参数错误");
+        }
+        $demo = new Demo();
+        $results = $demo->getDemoDataByCategoryId($categoryId);
+
+        return show(config("status.success"),"ok",$results);
+
+        //初学者 处理放在一个位置的方式
+//  //use app\common\model\mysql\Demo;
+//        //调取数据表对应的的 model   ------ 在转移到 business 层
+//        $model = new Demo();
+//        $results = $model->getDemoDataByCategoryId($categoryId);
+//
+//        if(empty($results)){
+//            return show(config("status.error"),"数据为空");
+//        }
+//        $cagegorys = config("category");
+//        foreach ($results as $key=>$result){
+//            $results[$key]['categoryName'] = $cagegorys[$result['category_id']] ?? '--';
+//        }
+//        return show(config("status.success"),"ok",$results);
+    }
+
+
+}

+ 33 - 0
app/demo/exception/Http.php

@@ -0,0 +1,33 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\demo\exception;
+
+use think\exception\Handle;
+use think\Response;
+use Throwable;
+
+class Http extends Handle{
+
+    public $httpStatus = 500;
+    /**
+     * Render an exception into an HTTP response.
+     *
+     * @access public
+     * @param \think\Request   $request
+     * @param Throwable $e
+     * @return Response
+     */
+    public function render($request, Throwable $e): Response
+    {
+        if(method_exists($e,"getStatusCode")){
+            $httpStatus = $e->getStatusCode();
+        }else{
+            $httpStatus = $this->httpStatus;
+        }
+        // 添加自定义异常处理机制
+        return show(config("status.error"),$e->getMessage(),[],$httpStatus);
+    }
+}

+ 12 - 0
app/demo/middleware.php

@@ -0,0 +1,12 @@
+<?php
+// 全局中间件定义文件
+return [
+    // 全局请求缓存
+    // \think\middleware\CheckRequestCache::class,
+    // 多语言加载
+    // \think\middleware\LoadLangPack::class,
+    // Session初始化
+    // \think\middleware\SessionInit::class
+
+    \app\demo\middleware\Check::class,
+];

+ 31 - 0
app/demo/middleware/Check.php

@@ -0,0 +1,31 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\demo\middleware;
+
+class Check {
+
+    /**
+     * 中间件初始判断(默认方法)
+     * @param $request
+     * @param \Closure $next
+     * @return mixed
+     */
+    public function handle($request,\Closure $next){
+
+        $request->type = "测试中间件";
+
+        return $next($request);
+    }
+
+    /**
+     * 中间件结束调度
+     * @param \think\Response $response
+     */
+    public function end(\think\Response $response){
+
+    }
+
+}

+ 31 - 0
app/demo/middleware/Detail.php

@@ -0,0 +1,31 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\demo\middleware;
+
+class Detail {
+
+    /**
+     * 中间件初始判断(默认方法) --- 测试路由指定中间件
+     * @param $request
+     * @param \Closure $next
+     * @return mixed
+     */
+    public function handle($request,\Closure $next){
+
+        $request->type = "测试路由指定中间件Detail";
+
+        return $next($request);
+    }
+
+    /**
+     * 中间件结束调度
+     * @param \think\Response $response
+     */
+    public function end(\think\Response $response){
+
+    }
+
+}

+ 8 - 0
app/demo/provider.php

@@ -0,0 +1,8 @@
+<?php
+use app\ExceptionHandle;
+use app\Request;
+
+// 容器Provider定义文件
+return [
+    'think\exception\Handle' => 'app\\demo\\exception\\Http',
+];

+ 11 - 0
app/demo/route/demo.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+ use think\facade\Route;
+
+Route::rule("test","index/hello","GET");
+
+//路由指定中间件方法 (http://www.tp6102.com/demo/detail)
+Route::rule("detail","detail/index","GET")->middleware(\app\demo\middleware\Detail::class);

+ 17 - 0
app/event.php

@@ -0,0 +1,17 @@
+<?php
+// 事件定义文件
+return [
+    'bind'      => [
+    ],
+
+    'listen'    => [
+        'AppInit'  => [],
+        'HttpRun'  => [],
+        'HttpEnd'  => [],
+        'LogLevel' => [],
+        'LogWrite' => [],
+    ],
+
+    'subscribe' => [
+    ],
+];

+ 10 - 0
app/middleware.php

@@ -0,0 +1,10 @@
+<?php
+// 全局中间件定义文件
+return [
+    // 全局请求缓存
+    // \think\middleware\CheckRequestCache::class,
+    // 多语言加载
+    // \think\middleware\LoadLangPack::class,
+    // Session初始化
+     \think\middleware\SessionInit::class
+];

+ 9 - 0
app/provider.php

@@ -0,0 +1,9 @@
+<?php
+use app\ExceptionHandle;
+use app\Request;
+
+// 容器Provider定义文件
+return [
+    'think\Request'          => Request::class,
+    'think\exception\Handle' => ExceptionHandle::class,
+];

+ 9 - 0
app/service.php

@@ -0,0 +1,9 @@
+<?php
+
+use app\AppService;
+
+// 系统服务定义文件
+// 服务在完成全局初始化之后执行
+return [
+    AppService::class,
+];

+ 196 - 0
app/tytw/controller/Index.php

@@ -0,0 +1,196 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+namespace app\tytw\controller;
+
+use app\BaseController;
+
+use Darabonba\OpenApi\OpenApiClient;
+use AlibabaCloud\OpenApiUtil\OpenApiUtilClient;
+use Darabonba\OpenApi\Models\Config;
+use Darabonba\OpenApi\Models\Params;
+use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions;
+use Darabonba\OpenApi\Models\OpenApiRequest;
+
+use think\facade\Env;
+
+class Index extends BaseController{
+
+    public function addtaskone(){ 
+         $overview = $_GET['overview'];
+         $audiourl = $_GET['audiourl'];
+         if(!$overview){
+             echo "请传入音频解析方向的描述";
+             die;
+         }
+        if(!$audiourl){
+            echo "请传入音频文件链接";
+            die;
+        }
+
+        $result = $this->createTaskOneInfo($audiourl,$overview);
+
+        var_dump($result);
+    }
+    public function gettaskinfo(){
+        $taskid = $_GET['taskid'];
+        if(!$taskid){
+            echo "请传入听悟任务的ID";
+            die;
+        }
+
+        $result = $this->getTaskOneInfo($taskid);
+        var_dump($result);
+    }
+
+
+    /**
+     * 使用AK&SK初始化账号Client
+     * @return OpenApiClient Client
+     */
+    public static function createClient(){
+        // 工程代码泄露可能会导致 AccessKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考。
+        // 建议使用更安全的 STS 方式,更多鉴权访问方式请参见:https://help.aliyun.com/document_detail/311677.html。
+        $config = new Config([
+            // 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_ID。
+            "accessKeyId" => Env::get("AliyunTingwu.AccessKeyId"),
+            // 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_SECRET。
+            "accessKeySecret" => Env::get("AliyunTingwu.AccessKeySecret")
+        ]);
+        // Endpoint 请参考 https://api.aliyun.com/product/tingwu
+        $config->endpoint = "tingwu.cn-beijing.aliyuncs.com";
+        return new OpenApiClient($config);
+    }
+
+    /**
+     * API 相关
+     * @return Params OpenApi.Params
+     */
+    public static function createTaskApiInfo(){
+        $params = new Params([
+            // 接口名称
+            "action" => "CreateTask",
+            // 接口版本
+            "version" => "2023-09-30",
+            // 接口协议
+            "protocol" => "HTTPS",
+            // 接口 HTTP 方法
+            "method" => "PUT",
+            "authType" => "AK",
+            "style" => "ROA",
+            // 接口 PATH
+            "pathname" => "/openapi/tingwu/v2/tasks",
+            // 接口请求体内容格式
+            "reqBodyType" => "json",
+            // 接口响应体内容格式
+            "bodyType" => "json"
+        ]);
+        return $params;
+    }
+
+    /**
+     * @param string[] $args
+     * @return void
+     */
+    public static function createTaskOneInfo($audiourl='',$overview=''){
+        $client = self::createClient();
+        $params = self::createTaskApiInfo();
+        // query params
+        $queries = [];
+        $queries["type"] = "offline";
+        // body params
+//        $body = [
+//            "AppKey" => "jB3lTWgWwCCmO12g",
+//            "Input" => [
+//                "SourceLanguage" => "cn",
+//                "FileUrl" => "https://crmapi.kedingdang.com/Intentionclient/getHuijieCallidRecordingFile?callid=9903ca31-b0c5-4d9b-aad1-cd6f97f87c43"
+//            ]
+//        ];
+        //  --- 之前模拟的数据
+        //设置数据项  - -  第五层
+        $contents = array();
+        $contents['Name'] = "test";
+        $contents['Prompt'] = $overview?($overview.":\n {Transcription}"):"对话中客户表达的完整内容输出出来,并且请帮我将下面的对话进行总结,分析对话中客户是否有下单意愿以及商品是否感兴趣:\n {Transcription}";
+        $contents['Model'] = "tingwu-turbo";
+        $contents['TransType'] = "chat";
+
+        //设置数据项  - -  第四层
+        $customPrompt = array();
+        $customPrompt['Contents'] = $contents;
+
+        //设置数据项  - -  第三层
+        $parameters = array();
+        $parameters['CustomPromptEnabled'] = 'True';
+        $parameters['CustomPrompt'] = $customPrompt;
+
+        $inputone = array();
+        $inputone['SourceLanguage'] = 'cn';
+        $inputone['TaskKey'] = 'task'.'123123'.time();
+        $inputone['FileUrl'] = $audiourl?$audiourl:'https://crmapi.kedingdang.com/Intentionclient/getHuijieCallidRecordingFile?callid=9903ca31-b0c5-4d9b-aad1-cd6f97f87c43';
+
+        //设置数据项  - -  第二层
+        $body = array();
+        $body['AppKey'] = 'jB3lTWgWwCCmO12g';
+        $body['Input'] = $inputone;
+        $body['Parameters'] = $parameters;
+
+
+        // runtime options
+        $runtime = new RuntimeOptions([]);
+        $request = new OpenApiRequest([
+            "query" => OpenApiUtilClient::query($queries),
+            "body" => $body
+        ]);
+        // 复制代码运行请自行打印 API 的返回值
+        // 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
+        $result = $client->callApi($params, $request, $runtime);
+        return $result;
+    }
+
+
+    /**
+     * API 相关
+     * @param string $TaskId
+     * @return Params OpenApi.Params
+     */
+    public static function getTaskApiInfo($TaskId){
+        $params = new Params([
+            // 接口名称
+            "action" => "GetTaskInfo",
+            // 接口版本
+            "version" => "2023-09-30",
+            // 接口协议
+            "protocol" => "HTTPS",
+            // 接口 HTTP 方法
+            "method" => "GET",
+            "authType" => "AK",
+            "style" => "ROA",
+            // 接口 PATH
+            "pathname" => "/openapi/tingwu/v2/tasks/" . $TaskId . "",
+            // 接口请求体内容格式
+            "reqBodyType" => "json",
+            // 接口响应体内容格式
+            "bodyType" => "json"
+        ]);
+        return $params;
+    }
+
+    /**
+     * @param string[] $args
+     * @return void
+     */
+    public static function getTaskOneInfo($args){
+        $client = self::createClient();
+        $params = self::getTaskApiInfo($args);//"5125c43149db4e01a2bf92bb6d34128b"
+        // runtime options
+        $runtime = new RuntimeOptions([]);
+        $request = new OpenApiRequest([]);
+        // 复制代码运行请自行打印 API 的返回值
+        // 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
+        $result = $client->callApi($params, $request, $runtime);
+        return $result;
+    }
+
+}

+ 15 - 0
app/tytw/controller/Verify.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+ namespace app\tytw\controller;
+
+ use think\captcha\facade\Captcha;
+
+ class Verify{
+
+     public function index(){
+         return Captcha::create('adminverify');
+     }
+ }

+ 18 - 0
app/tytw/middleware.php

@@ -0,0 +1,18 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+// 全局中间件定义文件
+return [
+    // 全局请求缓存
+    // \think\middleware\CheckRequestCache::class,
+    // 多语言加载
+    // \think\middleware\LoadLangPack::class,
+    // Session初始化
+    // \think\middleware\SessionInit::class,
+
+//    \app\admin\middleware\SessionInit::class
+];
+

+ 14 - 0
app/tytw/middleware/SessionInit.php

@@ -0,0 +1,14 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+namespace app\admin\middleware;
+
+class SessionInit
+{
+
+
+}
+

+ 52 - 0
app/tytw/view/login/index.html

@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>后台管理-登陆</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta http-equiv="Access-Control-Allow-Origin" content="*">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="format-detection" content="telephone=no">
+    <link rel="stylesheet" href="{__STATIC_ADMIN_PATH}lib/layui-v2.5.4/css/layui.css" media="all">
+    <link rel="stylesheet" href="{__STATIC_ADMIN_PATH}css/login.css">
+    <!--[if lt IE 9]>
+    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
+    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
+    <![endif]-->
+
+</head>
+<body>
+<div id="container">
+    <div></div>
+    <div class="admin-login-background">
+        <div class="admin-header">
+            <span>singwa</span>
+        </div>
+        <form class="layui-form" action="">
+            <div>
+                <i class="layui-icon layui-icon-username admin-icon"></i>
+                <input type="text" name="username" placeholder="请输入用户名" autocomplete="off" class="layui-input admin-input admin-input-username" value="admin">
+            </div>
+            <div>
+                <i class="layui-icon layui-icon-password admin-icon"></i>
+                <input type="password" name="password" placeholder="请输入密码" autocomplete="off" class="layui-input admin-input" value="123456">
+            </div>
+            <div>
+                <input type="text" name="captcha" placeholder="请输入验证码" autocomplete="off" class="layui-input admin-input admin-input-verify input-val" value="">
+                <!--<canvas id="canvas" class="admin-captcha" width="100" height="43"></canvas>-->
+                <div class="admin-captcha" >{:captcha_img('','',100,40)}</div>
+                <!--<div><img src="/admin/verify/index" alt=""></div>    没有配置刷新 以及 cookie-->
+                <!--<div><img src="{:url('verify/index')}" alt=""></div>      没有配置刷新 以及 cookie-->
+            </div>
+            <button class="layui-btn admin-button" lay-submit="" lay-filter="login">登 陆</button>
+        </form>
+    </div>
+</div>
+<script src="{__STATIC_ADMIN_PATH}lib/layui-v2.5.4/layui.js" charset="utf-8"></script>
+<script src="{__STATIC_ADMIN_PATH}lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
+<script src="{__STATIC_ADMIN_PATH}js/common.js" charset="utf-8"></script>
+<script src="{__STATIC_ADMIN_PATH}js/login.js?v9"></script>
+</body>
+</html>

+ 52 - 0
composer.json

@@ -0,0 +1,52 @@
+{
+    "name": "topthink/think",
+    "description": "the new thinkphp framework",
+    "type": "project",
+    "keywords": [
+        "framework",
+        "thinkphp",
+        "ORM"
+    ],
+    "homepage": "https://www.thinkphp.cn/",
+    "license": "Apache-2.0",
+    "authors": [
+        {
+            "name": "liu21st",
+            "email": "liu21st@gmail.com"
+        },
+        {
+            "name": "yunwuxin",
+            "email": "448901948@qq.com"
+        }
+    ],
+    "require": {
+        "php": ">=7.2.5",
+        "topthink/framework": "^6.1.0",
+        "topthink/think-orm": "^2.0",
+        "topthink/think-filesystem": "^1.0",
+        "topthink/think-multi-app": "^1.0",
+        "topthink/think-view": "^1.0",
+        "topthink/think-captcha": "^3.0"
+    },
+    "require-dev": {
+        "symfony/var-dumper": "^4.2",
+        "topthink/think-trace": "^1.0"
+    },
+    "autoload": {
+        "psr-4": {
+            "app\\": "app"
+        },
+        "psr-0": {
+            "": "extend/"
+        }
+    },
+    "config": {
+        "preferred-install": "dist"
+    },
+    "scripts": {
+        "post-autoload-dump": [
+            "@php think service:discover",
+            "@php think vendor:publish"
+        ]
+    }
+}

+ 1379 - 0
composer.lock

@@ -0,0 +1,1379 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+        "This file is @generated automatically"
+    ],
+    "content-hash": "04e78688bd7119e6b1b2fcb490f8f0d4",
+    "packages": [
+        {
+            "name": "league/flysystem",
+            "version": "1.1.10",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/flysystem.git",
+                "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1",
+                "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "league/mime-type-detection": "^1.3",
+                "php": "^7.2.5 || ^8.0"
+            },
+            "conflict": {
+                "league/flysystem-sftp": "<1.0.6"
+            },
+            "require-dev": {
+                "phpspec/prophecy": "^1.11.1",
+                "phpunit/phpunit": "^8.5.8"
+            },
+            "suggest": {
+                "ext-ftp": "Allows you to use FTP server storage",
+                "ext-openssl": "Allows you to use FTPS server storage",
+                "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
+                "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
+                "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
+                "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
+                "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
+                "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
+                "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
+                "league/flysystem-webdav": "Allows you to use WebDAV storage",
+                "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
+                "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
+                "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "League\\Flysystem\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Frank de Jonge",
+                    "email": "info@frenky.net"
+                }
+            ],
+            "description": "Filesystem abstraction: Many filesystems, one API.",
+            "keywords": [
+                "Cloud Files",
+                "WebDAV",
+                "abstraction",
+                "aws",
+                "cloud",
+                "copy.com",
+                "dropbox",
+                "file systems",
+                "files",
+                "filesystem",
+                "filesystems",
+                "ftp",
+                "rackspace",
+                "remote",
+                "s3",
+                "sftp",
+                "storage"
+            ],
+            "support": {
+                "issues": "https://github.com/thephpleague/flysystem/issues",
+                "source": "https://github.com/thephpleague/flysystem/tree/1.1.10"
+            },
+            "funding": [
+                {
+                    "url": "https://offset.earth/frankdejonge",
+                    "type": "other"
+                }
+            ],
+            "time": "2022-10-04T09:16:37+00:00"
+        },
+        {
+            "name": "league/flysystem-cached-adapter",
+            "version": "1.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/flysystem-cached-adapter.git",
+                "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff",
+                "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "league/flysystem": "~1.0",
+                "psr/cache": "^1.0.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "~0.9",
+                "phpspec/phpspec": "^3.4",
+                "phpunit/phpunit": "^5.7",
+                "predis/predis": "~1.0",
+                "tedivm/stash": "~0.12"
+            },
+            "suggest": {
+                "ext-phpredis": "Pure C implemented extension for PHP"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "League\\Flysystem\\Cached\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "frankdejonge",
+                    "email": "info@frenky.net"
+                }
+            ],
+            "description": "An adapter decorator to enable meta-data caching.",
+            "support": {
+                "issues": "https://github.com/thephpleague/flysystem-cached-adapter/issues",
+                "source": "https://github.com/thephpleague/flysystem-cached-adapter/tree/master"
+            },
+            "time": "2020-07-25T15:56:04+00:00"
+        },
+        {
+            "name": "league/mime-type-detection",
+            "version": "1.11.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/mime-type-detection.git",
+                "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+                "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "php": "^7.2 || ^8.0"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^3.2",
+                "phpstan/phpstan": "^0.12.68",
+                "phpunit/phpunit": "^8.5.8 || ^9.3"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "League\\MimeTypeDetection\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Frank de Jonge",
+                    "email": "info@frankdejonge.nl"
+                }
+            ],
+            "description": "Mime-type detection for Flysystem",
+            "support": {
+                "issues": "https://github.com/thephpleague/mime-type-detection/issues",
+                "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/frankdejonge",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/league/flysystem",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-04-17T13:12:02+00:00"
+        },
+        {
+            "name": "psr/cache",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/cache.git",
+                "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
+                "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Cache\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for caching libraries",
+            "keywords": [
+                "cache",
+                "psr",
+                "psr-6"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/cache/tree/master"
+            },
+            "time": "2016-08-06T20:24:11+00:00"
+        },
+        {
+            "name": "psr/container",
+            "version": "1.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/container.git",
+                "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+                "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.4.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Container\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "https://www.php-fig.org/"
+                }
+            ],
+            "description": "Common Container Interface (PHP FIG PSR-11)",
+            "homepage": "https://github.com/php-fig/container",
+            "keywords": [
+                "PSR-11",
+                "container",
+                "container-interface",
+                "container-interop",
+                "psr"
+            ],
+            "support": {
+                "issues": "https://github.com/php-fig/container/issues",
+                "source": "https://github.com/php-fig/container/tree/1.1.2"
+            },
+            "time": "2021-11-05T16:50:12+00:00"
+        },
+        {
+            "name": "psr/http-message",
+            "version": "1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-message.git",
+                "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+                "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": "^7.2 || ^8.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Message\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for HTTP messages",
+            "homepage": "https://github.com/php-fig/http-message",
+            "keywords": [
+                "http",
+                "http-message",
+                "psr",
+                "psr-7",
+                "request",
+                "response"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/http-message/tree/1.1"
+            },
+            "time": "2023-04-04T09:50:52+00:00"
+        },
+        {
+            "name": "psr/log",
+            "version": "1.1.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/log.git",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Log\\": "Psr/Log/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "https://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for logging libraries",
+            "homepage": "https://github.com/php-fig/log",
+            "keywords": [
+                "log",
+                "psr",
+                "psr-3"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/log/tree/1.1.4"
+            },
+            "time": "2021-05-03T11:20:27+00:00"
+        },
+        {
+            "name": "psr/simple-cache",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/simple-cache.git",
+                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\SimpleCache\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interfaces for simple caching",
+            "keywords": [
+                "cache",
+                "caching",
+                "psr",
+                "psr-16",
+                "simple-cache"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/simple-cache/tree/master"
+            },
+            "time": "2017-10-23T01:57:42+00:00"
+        },
+        {
+            "name": "topthink/framework",
+            "version": "v6.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/framework.git",
+                "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/framework/zipball/67235be5b919aaaf1de5aed9839f65d8e766aca3",
+                "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-mbstring": "*",
+                "php": ">=7.2.5",
+                "psr/container": "~1.0",
+                "psr/http-message": "^1.0",
+                "psr/log": "~1.0",
+                "psr/simple-cache": "^1.0",
+                "topthink/think-helper": "^3.1.1",
+                "topthink/think-orm": "^2.0|^3.0"
+            },
+            "require-dev": {
+                "guzzlehttp/psr7": "^2.1.0",
+                "mikey179/vfsstream": "^1.6",
+                "mockery/mockery": "^1.2",
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [],
+                "psr-4": {
+                    "think\\": "src/think/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                },
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "The ThinkPHP Framework.",
+            "homepage": "http://thinkphp.cn/",
+            "keywords": [
+                "framework",
+                "orm",
+                "thinkphp"
+            ],
+            "support": {
+                "issues": "https://github.com/top-think/framework/issues",
+                "source": "https://github.com/top-think/framework/tree/v6.1.2"
+            },
+            "time": "2023-02-08T02:24:01+00:00"
+        },
+        {
+            "name": "topthink/think-captcha",
+            "version": "v3.0.9",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-captcha.git",
+                "reference": "b1ef360670578214edeebcf824aaf6ab7ee0528b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-captcha/zipball/b1ef360670578214edeebcf824aaf6ab7ee0528b",
+                "reference": "b1ef360670578214edeebcf824aaf6ab7ee0528b",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "topthink/framework": "^6.0|^8.0"
+            },
+            "type": "library",
+            "extra": {
+                "think": {
+                    "services": [
+                        "think\\captcha\\CaptchaService"
+                    ],
+                    "config": {
+                        "captcha": "src/config.php"
+                    }
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/helper.php"
+                ],
+                "psr-4": {
+                    "think\\captcha\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "captcha package for thinkphp",
+            "support": {
+                "issues": "https://github.com/top-think/think-captcha/issues",
+                "source": "https://github.com/top-think/think-captcha/tree/v3.0.9"
+            },
+            "time": "2023-04-27T07:18:40+00:00"
+        },
+        {
+            "name": "topthink/think-filesystem",
+            "version": "v1.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-filesystem.git",
+                "reference": "29f19f140a9267c717fecd7ccb22c84c2d72382e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-filesystem/zipball/29f19f140a9267c717fecd7ccb22c84c2d72382e",
+                "reference": "29f19f140a9267c717fecd7ccb22c84c2d72382e",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "league/flysystem": "^1.1.4",
+                "league/flysystem-cached-adapter": "^1.0",
+                "php": ">=7.2.5",
+                "topthink/framework": "^6.1|^8.0"
+            },
+            "require-dev": {
+                "mikey179/vfsstream": "^1.6",
+                "mockery/mockery": "^1.2",
+                "phpunit/phpunit": "^8.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "The ThinkPHP6.1 Filesystem Package",
+            "support": {
+                "issues": "https://github.com/top-think/think-filesystem/issues",
+                "source": "https://github.com/top-think/think-filesystem/tree/v1.0.3"
+            },
+            "time": "2023-02-08T01:25:15+00:00"
+        },
+        {
+            "name": "topthink/think-helper",
+            "version": "v3.1.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-helper.git",
+                "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-helper/zipball/769acbe50a4274327162f9c68ec2e89a38eb2aff",
+                "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.5"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "src/helper.php"
+                ],
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "The ThinkPHP6 Helper Package",
+            "support": {
+                "issues": "https://github.com/top-think/think-helper/issues",
+                "source": "https://github.com/top-think/think-helper/tree/v3.1.6"
+            },
+            "time": "2021-12-15T04:27:55+00:00"
+        },
+        {
+            "name": "topthink/think-multi-app",
+            "version": "v1.0.17",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-multi-app.git",
+                "reference": "4055a6187296ac16c0bc7bbab4ed5d92f82f791c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/4055a6187296ac16c0bc7bbab4ed5d92f82f791c",
+                "reference": "4055a6187296ac16c0bc7bbab4ed5d92f82f791c",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "topthink/framework": "^6.0|^8.0"
+            },
+            "type": "library",
+            "extra": {
+                "think": {
+                    "services": [
+                        "think\\app\\Service"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "think\\app\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "thinkphp multi app support",
+            "support": {
+                "issues": "https://github.com/top-think/think-multi-app/issues",
+                "source": "https://github.com/top-think/think-multi-app/tree/v1.0.17"
+            },
+            "time": "2023-03-29T02:04:29+00:00"
+        },
+        {
+            "name": "topthink/think-orm",
+            "version": "v2.0.61",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-orm.git",
+                "reference": "10528ebf4a5106b19c3bac9c6deae7a67ff49de6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-orm/zipball/10528ebf4a5106b19c3bac9c6deae7a67ff49de6",
+                "reference": "10528ebf4a5106b19c3bac9c6deae7a67ff49de6",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-pdo": "*",
+                "php": ">=7.1.0",
+                "psr/log": "^1.0|^2.0",
+                "psr/simple-cache": "^1.0|^2.0",
+                "topthink/think-helper": "^3.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7|^8|^9.5"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "stubs/load_stubs.php"
+                ],
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "think orm",
+            "keywords": [
+                "database",
+                "orm"
+            ],
+            "support": {
+                "issues": "https://github.com/top-think/think-orm/issues",
+                "source": "https://github.com/top-think/think-orm/tree/v2.0.61"
+            },
+            "time": "2023-04-20T14:27:51+00:00"
+        },
+        {
+            "name": "topthink/think-template",
+            "version": "v2.0.9",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-template.git",
+                "reference": "6d25642ae0e306166742fd7073dc7a159e18073c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-template/zipball/6d25642ae0e306166742fd7073dc7a159e18073c",
+                "reference": "6d25642ae0e306166742fd7073dc7a159e18073c",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "psr/simple-cache": "^1.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "the php template engine",
+            "support": {
+                "issues": "https://github.com/top-think/think-template/issues",
+                "source": "https://github.com/top-think/think-template/tree/v2.0.9"
+            },
+            "time": "2023-02-14T10:50:39+00:00"
+        },
+        {
+            "name": "topthink/think-view",
+            "version": "v1.0.14",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-view.git",
+                "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-view/zipball/edce0ae2c9551ab65f9e94a222604b0dead3576d",
+                "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "topthink/think-template": "^2.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "think\\view\\driver\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "thinkphp template driver",
+            "support": {
+                "issues": "https://github.com/top-think/think-view/issues",
+                "source": "https://github.com/top-think/think-view/tree/v1.0.14"
+            },
+            "time": "2019-11-06T11:40:13+00:00"
+        }
+    ],
+    "packages-dev": [
+        {
+            "name": "symfony/polyfill-mbstring",
+            "version": "v1.27.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-mbstring.git",
+                "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+                "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "provide": {
+                "ext-mbstring": "*"
+            },
+            "suggest": {
+                "ext-mbstring": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.27-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Mbstring\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for the Mbstring extension",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "mbstring",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-11-03T14:55:06+00:00"
+        },
+        {
+            "name": "symfony/polyfill-php72",
+            "version": "v1.27.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php72.git",
+                "reference": "869329b1e9894268a8a61dabb69153029b7a8c97"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97",
+                "reference": "869329b1e9894268a8a61dabb69153029b7a8c97",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.27-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php72\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-11-03T14:55:06+00:00"
+        },
+        {
+            "name": "symfony/polyfill-php80",
+            "version": "v1.27.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php80.git",
+                "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+                "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.27-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php80\\": ""
+                },
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ion Bazan",
+                    "email": "ion.bazan@gmail.com"
+                },
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-11-03T14:55:06+00:00"
+        },
+        {
+            "name": "symfony/var-dumper",
+            "version": "v4.4.47",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/var-dumper.git",
+                "reference": "1069c7a3fca74578022fab6f81643248d02f8e63"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1069c7a3fca74578022fab6f81643248d02f8e63",
+                "reference": "1069c7a3fca74578022fab6f81643248d02f8e63",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.3",
+                "symfony/polyfill-mbstring": "~1.0",
+                "symfony/polyfill-php72": "~1.5",
+                "symfony/polyfill-php80": "^1.16"
+            },
+            "conflict": {
+                "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
+                "symfony/console": "<3.4"
+            },
+            "require-dev": {
+                "ext-iconv": "*",
+                "symfony/console": "^3.4|^4.0|^5.0",
+                "symfony/process": "^4.4|^5.0",
+                "twig/twig": "^1.43|^2.13|^3.0.4"
+            },
+            "suggest": {
+                "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
+                "ext-intl": "To show region name in time zone dump",
+                "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
+            },
+            "bin": [
+                "Resources/bin/var-dump-server"
+            ],
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "Resources/functions/dump.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Component\\VarDumper\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Provides mechanisms for walking through any arbitrary PHP variable",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "debug",
+                "dump"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/var-dumper/tree/v4.4.47"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-10-03T15:15:11+00:00"
+        },
+        {
+            "name": "topthink/think-trace",
+            "version": "v1.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-trace.git",
+                "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-trace/zipball/136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
+                "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "topthink/framework": "^6.0|^8.0"
+            },
+            "type": "library",
+            "extra": {
+                "think": {
+                    "services": [
+                        "think\\trace\\Service"
+                    ],
+                    "config": {
+                        "trace": "src/config.php"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "think\\trace\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "thinkphp debug trace",
+            "support": {
+                "issues": "https://github.com/top-think/think-trace/issues",
+                "source": "https://github.com/top-think/think-trace/tree/v1.6"
+            },
+            "time": "2023-02-07T08:36:32+00:00"
+        }
+    ],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": {
+        "php": ">=7.2.5"
+    },
+    "platform-dev": [],
+    "plugin-api-version": "2.3.0"
+}

+ 32 - 0
config/app.php

@@ -0,0 +1,32 @@
+<?php
+// +----------------------------------------------------------------------
+// | 应用设置
+// +----------------------------------------------------------------------
+
+return [
+    // 应用地址
+    'app_host'         => env('app.host', ''),
+    // 应用的命名空间
+    'app_namespace'    => '',
+    // 是否启用路由
+    'with_route'       => true,
+    // 默认应用
+    'default_app'      => 'index',
+    // 默认时区
+    'default_timezone' => 'Asia/Shanghai',
+
+    // 应用映射(自动多应用模式有效)
+    'app_map'          => [],
+    // 域名绑定(自动多应用模式有效)
+    'domain_bind'      => [],
+    // 禁止URL访问的应用列表(自动多应用模式有效)
+    'deny_app_list'    => [],
+
+    // 异常页面的模板文件
+    'exception_tmpl'   => app()->getThinkPath() . 'tpl/think_exception.tpl',
+
+    // 错误显示信息,非调试模式有效
+    'error_message'    => '页面错误!请稍后再试~',
+    // 显示错误信息
+    'show_error_msg'   => false,
+];

+ 29 - 0
config/cache.php

@@ -0,0 +1,29 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | 缓存设置
+// +----------------------------------------------------------------------
+
+return [
+    // 默认缓存驱动
+    'default' => env('cache.driver', 'file'),
+
+    // 缓存连接方式配置
+    'stores'  => [
+        'file' => [
+            // 驱动方式
+            'type'       => 'File',
+            // 缓存保存目录
+            'path'       => '',
+            // 缓存前缀
+            'prefix'     => '',
+            // 缓存有效期 0表示永久缓存
+            'expire'     => 0,
+            // 缓存标签前缀
+            'tag_prefix' => 'tag:',
+            // 序列化机制 例如 ['serialize', 'unserialize']
+            'serialize'  => [],
+        ],
+        // 更多的缓存连接
+    ],
+];

+ 43 - 0
config/captcha.php

@@ -0,0 +1,43 @@
+<?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,
+    //    ...
+    //],
+     adminverify => [
+         'length'=>4,
+         'codeSet'  => '2345678abcd',
+    ],
+];

+ 11 - 0
config/category.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 97
+ */
+
+return [
+    1 => "科技",
+    2 => "衣服",
+    3 => "书籍",
+];

+ 9 - 0
config/console.php

@@ -0,0 +1,9 @@
+<?php
+// +----------------------------------------------------------------------
+// | 控制台配置
+// +----------------------------------------------------------------------
+return [
+    // 指令定义
+    'commands' => [
+    ],
+];

+ 20 - 0
config/cookie.php

@@ -0,0 +1,20 @@
+<?php
+// +----------------------------------------------------------------------
+// | Cookie设置
+// +----------------------------------------------------------------------
+return [
+    // cookie 保存时间
+    'expire'    => 0,
+    // cookie 保存路径
+    'path'      => '/',
+    // cookie 有效域名
+    'domain'    => '',
+    //  cookie 启用安全传输
+    'secure'    => false,
+    // httponly设置
+    'httponly'  => false,
+    // 是否使用 setcookie
+    'setcookie' => true,
+    // samesite 设置,支持 'strict' 'lax'
+    'samesite'  => '',
+];

+ 63 - 0
config/database.php

@@ -0,0 +1,63 @@
+<?php
+
+return [
+    // 默认使用的数据库连接配置
+    'default'         => env('database.driver', 'mysql'),
+
+    // 自定义时间查询规则
+    'time_query_rule' => [],
+
+    // 自动写入时间戳字段
+    // true为自动识别类型 false关闭
+    // 字符串则明确指定时间字段类型 支持 int timestamp datetime date
+    'auto_timestamp'  => true,
+
+    // 时间字段取出后的默认时间格式
+    'datetime_format' => 'Y-m-d H:i:s',
+
+    // 时间字段配置 配置格式:create_time,update_time
+    'datetime_field'  => '',
+
+    // 数据库连接配置信息
+    'connections'     => [
+        'mysql' => [
+            // 数据库类型
+            'type'            => env('database.type', 'mysql'),
+            // 服务器地址
+            'hostname'        => env('database.hostname', '127.0.0.1'),
+            // 数据库名
+            'database'        => env('database.database', 'tp6test'),
+            // 用户名
+            'username'        => env('database.username', 'root'),
+            // 密码
+            'password'        => env('database.password', 'root'),
+            // 端口
+            'hostport'        => env('database.hostport', '3306'),
+            // 数据库连接参数
+            'params'          => [],
+            // 数据库编码默认采用utf8
+            'charset'         => env('database.charset', 'utf8'),
+            // 数据库表前缀
+            'prefix'          => env('database.prefix', ''),
+
+            // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
+            'deploy'          => 0,
+            // 数据库读写是否分离 主从式有效
+            'rw_separate'     => false,
+            // 读写分离后 主服务器数量
+            'master_num'      => 1,
+            // 指定从服务器序号
+            'slave_no'        => '',
+            // 是否严格检查字段是否存在
+            'fields_strict'   => true,
+            // 是否需要断线重连
+            'break_reconnect' => false,
+            // 监听SQL
+            'trigger_sql'     => env('app_debug', true),
+            // 开启字段缓存
+            'fields_cache'    => false,
+        ],
+
+        // 更多的数据库配置信息
+    ],
+];

+ 24 - 0
config/filesystem.php

@@ -0,0 +1,24 @@
+<?php
+
+return [
+    // 默认磁盘
+    'default' => env('filesystem.driver', 'local'),
+    // 磁盘列表
+    'disks'   => [
+        'local'  => [
+            'type' => 'local',
+            'root' => app()->getRuntimePath() . 'storage',
+        ],
+        'public' => [
+            // 磁盘类型
+            'type'       => 'local',
+            // 磁盘路径
+            'root'       => app()->getRootPath() . 'public/storage',
+            // 磁盘路径对应的外部URL路径
+            'url'        => '/storage',
+            // 可见性
+            'visibility' => 'public',
+        ],
+        // 更多的磁盘配置信息
+    ],
+];

+ 27 - 0
config/lang.php

@@ -0,0 +1,27 @@
+<?php
+// +----------------------------------------------------------------------
+// | 多语言设置
+// +----------------------------------------------------------------------
+
+return [
+    // 默认语言
+    'default_lang'    => env('lang.default_lang', 'zh-cn'),
+    // 允许的语言列表
+    'allow_lang_list' => [],
+    // 多语言自动侦测变量名
+    'detect_var'      => 'lang',
+    // 是否使用Cookie记录
+    'use_cookie'      => true,
+    // 多语言cookie变量
+    'cookie_var'      => 'think_lang',
+    // 多语言header变量
+    'header_var'      => 'think-lang',
+    // 扩展语言包
+    'extend_list'     => [],
+    // Accept-Language转义为对应语言包名称
+    'accept_language' => [
+        'zh-hans-cn' => 'zh-cn',
+    ],
+    // 是否支持语言分组
+    'allow_group'     => false,
+];

+ 45 - 0
config/log.php

@@ -0,0 +1,45 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | 日志设置
+// +----------------------------------------------------------------------
+return [
+    // 默认日志记录通道
+    'default'      => env('log.channel', 'file'),
+    // 日志记录级别
+    'level'        => [],
+    // 日志类型记录的通道 ['error'=>'email',...]
+    'type_channel' => [],
+    // 关闭全局日志写入
+    'close'        => false,
+    // 全局日志处理 支持闭包
+    'processor'    => null,
+
+    // 日志通道列表
+    'channels'     => [
+        'file' => [
+            // 日志记录方式
+            'type'           => 'File',
+            // 日志保存目录
+            'path'           => '',
+            // 单文件日志写入
+            'single'         => false,
+            // 独立日志级别
+            'apart_level'    => [],
+            // 最大日志文件数量
+            'max_files'      => 0,
+            // 使用JSON格式记录
+            'json'           => false,
+            // 日志处理
+            'processor'      => null,
+            // 关闭通道日志写入
+            'close'          => false,
+            // 日志输出格式化
+            'format'         => '[%s][%s] %s',
+            // 是否实时写入
+            'realtime_write' => false,
+        ],
+        // 其它日志通道配置
+    ],
+
+];

+ 8 - 0
config/middleware.php

@@ -0,0 +1,8 @@
+<?php
+// 中间件配置
+return [
+    // 别名或分组
+    'alias'    => [],
+    // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行
+    'priority' => [],
+];

+ 45 - 0
config/route.php

@@ -0,0 +1,45 @@
+<?php
+// +----------------------------------------------------------------------
+// | 路由设置
+// +----------------------------------------------------------------------
+
+return [
+    // pathinfo分隔符
+    'pathinfo_depr'         => '/',
+    // URL伪静态后缀
+    'url_html_suffix'       => 'html',
+    // URL普通方式参数 用于自动生成
+    'url_common_param'      => true,
+    // 是否开启路由延迟解析
+    'url_lazy_route'        => false,
+    // 是否强制使用路由
+    'url_route_must'        => false,
+    // 合并路由规则
+    'route_rule_merge'      => false,
+    // 路由是否完全匹配
+    'route_complete_match'  => false,
+    // 访问控制器层名称
+    'controller_layer'      => 'controller',
+    // 空控制器名
+    'empty_controller'      => 'Error',
+    // 是否使用控制器后缀
+    'controller_suffix'     => false,
+    // 默认的路由变量规则
+    'default_route_pattern' => '[\w\.]+',
+    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
+    'request_cache_key'     => false,
+    // 请求缓存有效期
+    'request_cache_expire'  => null,
+    // 全局请求缓存排除规则
+    'request_cache_except'  => [],
+    // 默认控制器名
+    'default_controller'    => 'Index',
+    // 默认操作名
+    'default_action'        => 'index',
+    // 操作方法后缀
+    'action_suffix'         => '',
+    // 默认JSONP格式返回的处理方法
+    'default_jsonp_handler' => 'jsonpReturn',
+    // 默认JSONP处理方法
+    'var_jsonp_handler'     => 'callback',
+];

+ 19 - 0
config/session.php

@@ -0,0 +1,19 @@
+<?php
+// +----------------------------------------------------------------------
+// | 会话设置
+// +----------------------------------------------------------------------
+
+return [
+    // session name
+    'name'           => 'PHPSESSID',
+    // SESSION_ID的提交变量,解决flash上传跨域
+    'var_session_id' => '',
+    // 驱动方式 支持file cache
+    'type'           => 'file',
+    // 存储连接标识 当type使用cache的时候有效
+    'store'          => null,
+    // 过期时间
+    'expire'         => 1440,
+    // 前缀
+    'prefix'         => '',
+];

+ 15 - 0
config/status.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * 该文件主要是存放业务状态码相关的配置 -- 97自己添加(单站点)
+ * Created by PhpStorm.
+ * User: 97
+ */
+ 
+return [
+    "success" => 1,
+    "error" => 0,
+    "not_login" => -1,
+    "user_is_register" => -2,
+    "action_not_found" => -3,
+    "controller_not_found" => -4,
+];

+ 10 - 0
config/trace.php

@@ -0,0 +1,10 @@
+<?php
+// +----------------------------------------------------------------------
+// | Trace设置 开启调试模式后有效
+// +----------------------------------------------------------------------
+return [
+    // 内置Html和Console两种方式 支持扩展
+    'type'    => 'Html',
+    // 读取的日志通道名
+    'channel' => '',
+];

+ 29 - 0
config/view.php

@@ -0,0 +1,29 @@
+<?php
+// +----------------------------------------------------------------------
+// | 模板设置
+// +----------------------------------------------------------------------
+
+return [
+    // 模板引擎类型使用Think
+    'type'          => 'Think',
+    // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
+    'auto_rule'     => 1,
+    // 模板目录名
+    'view_dir_name' => 'view',
+    // 模板后缀
+    'view_suffix'   => 'html',
+    // 模板文件名分隔符
+    'view_depr'     => DIRECTORY_SEPARATOR,
+    // 模板引擎普通标签开始标记
+    'tpl_begin'     => '{',
+    // 模板引擎普通标签结束标记
+    'tpl_end'       => '}',
+    // 标签库标签开始标记
+    'taglib_begin'  => '{',
+    // 标签库标签结束标记
+    'taglib_end'    => '}',
+
+    'tpl_replace_string' => [
+        '{__STATIC_ADMIN_PATH}' => '/static/admin/',
+    ]
+];

+ 2 - 0
extend/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 20 - 0
public/ - 副本.htaccess

@@ -0,0 +1,20 @@
+# #原始的有点不好用
+#<IfModule mod_rewrite.c>
+#  Options +FollowSymlinks -Multiviews
+#  RewriteEngine On
+#
+#  RewriteCond %{REQUEST_FILENAME} !-d
+#  RewriteCond %{REQUEST_FILENAME} !-f
+#  RewriteRule ^(.*)$ Index.php/$1 [QSA,PT,L]
+#</IfModule>
+
+
+# #百度后更改了 一个设置
+<IfModule mod_rewrite.c>
+    Options +FollowSymlinks -Multiviews
+    RewriteEngine On
+
+    RewriteCond %{REQUEST_FILENAME} !-d
+    RewriteCond %{REQUEST_FILENAME} !-f
+    RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
+</IfModule>

+ 8 - 0
public/- 副本.htaccess

@@ -0,0 +1,8 @@
+<IfModule mod_rewrite.c>
+  Options +FollowSymlinks -Multiviews
+  RewriteEngine On
+
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
+</IfModule>

+ 20 - 0
public/.htaccess

@@ -0,0 +1,20 @@
+# #原始的有点不好用
+#<IfModule mod_rewrite.c>
+#  Options +FollowSymlinks -Multiviews
+#  RewriteEngine On
+#
+#  RewriteCond %{REQUEST_FILENAME} !-d
+#  RewriteCond %{REQUEST_FILENAME} !-f
+#  RewriteRule ^(.*)$ Index.php/$1 [QSA,PT,L]
+#</IfModule>
+
+
+# #百度后更改了 一个设置
+<IfModule mod_rewrite.c>
+    Options +FollowSymlinks -Multiviews
+    RewriteEngine On
+
+    RewriteCond %{REQUEST_FILENAME} !-d
+    RewriteCond %{REQUEST_FILENAME} !-f
+    RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
+</IfModule>

BIN
public/favicon.ico


+ 24 - 0
public/index.php

@@ -0,0 +1,24 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2019 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// [ 应用入口文件 ]
+namespace think;
+
+require __DIR__ . '/../vendor/autoload.php';
+
+// 执行HTTP应用并响应
+$http = (new App())->http;
+
+$response = $http->run();
+
+$response->send();
+
+$http->end($response);

+ 0 - 0
public/nginx.htaccess


+ 2 - 0
public/robots.txt

@@ -0,0 +1,2 @@
+User-agent: *
+Disallow:

+ 19 - 0
public/router.php

@@ -0,0 +1,19 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+// $Id$
+
+if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
+    return false;
+} else {
+    $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
+
+    require __DIR__ . "/index.php";
+}

+ 2 - 0
public/static/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 17 - 0
route/app.php

@@ -0,0 +1,17 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+use think\facade\Route;
+
+Route::get('think', function () {
+    return 'hello,ThinkPHP6!';
+});
+
+Route::get('hello/:name', 'index/hello');

+ 2 - 0
runtime/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 10 - 0
think

@@ -0,0 +1,10 @@
+#!/usr/bin/env php
+<?php
+namespace think;
+
+// 命令行入口文件
+// 加载基础文件
+require __DIR__ . '/vendor/autoload.php';
+
+// 应用初始化
+(new App())->console->run();

+ 2 - 0
vendor/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 1 - 0
view/README.md

@@ -0,0 +1 @@
+如果不使用模板,可以删除该目录