Ver código fonte

first commit

唐金木 5 anos atrás
commit
07e2592bdb
100 arquivos alterados com 58800 adições e 0 exclusões
  1. 1 0
      README.md
  2. 1 0
      php/.env
  3. 1 0
      php/.example.env
  4. 7 0
      php/.gitattributes
  5. 28 0
      php/.idea/deployment.xml
  6. 4 0
      php/.idea/encodings.xml
  7. 6 0
      php/.idea/misc.xml
  8. 8 0
      php/.idea/modules.xml
  9. 90 0
      php/.idea/php.iml
  10. 87 0
      php/.idea/php.xml
  11. 6 0
      php/.idea/vcs.xml
  12. 31 0
      php/.idea/webServers.xml
  13. 952 0
      php/.idea/workspace.xml
  14. 0 0
      php/.keep
  15. 42 0
      php/.travis.yml
  16. 56 0
      php/adddata.sql
  17. 18 0
      php/addons/text/config.php
  18. 63 0
      php/addons/text/controller/Pugin.php
  19. 15 0
      php/addons/text/controller/Text.php
  20. 10 0
      php/addons/text/view/pugin/info.html
  21. 25238 0
      php/any_college.sql
  22. 25250 0
      php/any_college2020-2-27.sql
  23. 1 0
      php/app/.htaccess
  24. 26 0
      php/app/404.html
  25. 213 0
      php/app/BaseController.php
  26. 68 0
      php/app/ExceptionHandle.php
  27. 17 0
      php/app/Request.php
  28. 77 0
      php/app/admin/controller/Adminlog.php
  29. 255 0
      php/app/admin/controller/Adv.php
  30. 247 0
      php/app/admin/controller/Article.php
  31. 552 0
      php/app/admin/controller/Auth.php
  32. 455 0
      php/app/admin/controller/Backup.php
  33. 150 0
      php/app/admin/controller/Contents.php
  34. 330 0
      php/app/admin/controller/Curriculum.php
  35. 116 0
      php/app/admin/controller/Database.php
  36. 27 0
      php/app/admin/controller/Error.php
  37. 393 0
      php/app/admin/controller/Friendship.php
  38. 89 0
      php/app/admin/controller/Index.php
  39. 135 0
      php/app/admin/controller/Login.php
  40. 110 0
      php/app/admin/controller/Menu.php
  41. 167 0
      php/app/admin/controller/Site.php
  42. 219 0
      php/app/admin/controller/System.php
  43. 166 0
      php/app/admin/controller/Training.php
  44. 235 0
      php/app/admin/controller/Uploads.php
  45. 232 0
      php/app/admin/controller/User.php
  46. 47 0
      php/app/admin/controller/UserAddress.php
  47. 153 0
      php/app/admin/lang/zh-cn.php
  48. 22 0
      php/app/admin/middleware.php
  49. 32 0
      php/app/admin/middleware/AdminLog.php
  50. 27 0
      php/app/admin/middleware/MajorLevel.php
  51. 20 0
      php/app/admin/model/Admin.php
  52. 93 0
      php/app/admin/model/AdminLog.php
  53. 21 0
      php/app/admin/model/AdminModel.php
  54. 23 0
      php/app/admin/model/AuthGroup.php
  55. 22 0
      php/app/admin/model/AuthRule.php
  56. 21 0
      php/app/admin/model/ListPage.php
  57. 39 0
      php/app/admin/model/MajorLevel.php
  58. 15 0
      php/app/admin/model/User.php
  59. 186 0
      php/app/admin/model/Video.php
  60. 84 0
      php/app/admin/model/Ztrees.php
  61. 32 0
      php/app/admin/validate/Admin.php
  62. 31 0
      php/app/admin/validate/Adv.php
  63. 27 0
      php/app/admin/validate/AdvPosition.php
  64. 26 0
      php/app/admin/validate/AuthGroup.php
  65. 30 0
      php/app/admin/validate/Field.php
  66. 30 0
      php/app/admin/validate/Link.php
  67. 41 0
      php/app/admin/validate/Module.php
  68. 34 0
      php/app/admin/validate/User.php
  69. 31 0
      php/app/admin/validate/UserLevel.php
  70. 56 0
      php/app/admin/validate/WxAccount.php
  71. 34 0
      php/app/admin/validate/WxTag.php
  72. 34 0
      php/app/ap/config/route.php
  73. 52 0
      php/app/ap/controller/Login.php
  74. 48 0
      php/app/ap/controller/v1/Index.php
  75. 91 0
      php/app/ap/controller/v1/User.php
  76. 22 0
      php/app/ap/middleware.php
  77. 26 0
      php/app/ap/route/api.php
  78. 24 0
      php/app/cert/apiclient_cert.pem
  79. 28 0
      php/app/cert/apiclient_key.pem
  80. 27 0
      php/app/cert/pri_key.pem
  81. 9 0
      php/app/cert/pub_key.pem
  82. 31 0
      php/app/command/Hello.php
  83. 70 0
      php/app/command/Timer.php
  84. 371 0
      php/app/common.php
  85. 84 0
      php/app/common/controller/Aliyunoss.php
  86. 184 0
      php/app/common/controller/Backend.php
  87. 45 0
      php/app/common/controller/Base.php
  88. 29 0
      php/app/common/controller/Frontend.php
  89. 18 0
      php/app/common/controller/Token.php
  90. 47 0
      php/app/common/controller/Wxs.php
  91. 44 0
      php/app/common/model/BaseModel.php
  92. 14 0
      php/app/common/model/Common.php
  93. 11 0
      php/app/common/model/Config.php
  94. 23 0
      php/app/common/model/ConfigGroup.php
  95. 19 0
      php/app/common/model/FieldType.php
  96. 23 0
      php/app/common/model/User.php
  97. 19 0
      php/app/error/controller/Error.php
  98. 18 0
      php/app/event.php
  99. 18 0
      php/app/middleware.php
  100. 0 0
      php/app/middleware/Notken.php

+ 1 - 0
README.md

@@ -0,0 +1 @@
+"# bts" 

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
php/.env


+ 1 - 0
php/.example.env

@@ -0,0 +1 @@
+APP_DEBUG = true

[APP]
DEFAULT_TIMEZONE = Asia/Shanghai

[DATABASE]
TYPE = mysql
HOSTNAME = 127.0.0.1
DATABASE = lemocms
USERNAME = root
PASSWORD = root
HOSTPORT = 3306
CHARSET = utf8mb4
DEBUG = true

[LANG]
default_lang = zh-cn

+ 7 - 0
php/.gitattributes

@@ -0,0 +1,7 @@
+*.js linguist-language=php
+*.css linguist-language=php
+<<<<<<< HEAD
+*.html linguist-language=php
+=======
+*.html linguist-language=php
+>>>>>>> 8f2e737c7b356d47fc1f979eb488a24e224e8faf

+ 28 - 0
php/.idea/deployment.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="PublishConfigData" serverName="案例">
+    <serverData>
+      <paths name="医疗">
+        <serverdata>
+          <mappings>
+            <mapping deploy="/" local="$PROJECT_DIR$" web="/" />
+          </mappings>
+        </serverdata>
+      </paths>
+      <paths name="客户">
+        <serverdata>
+          <mappings>
+            <mapping deploy="/" local="$PROJECT_DIR$" web="/" />
+          </mappings>
+        </serverdata>
+      </paths>
+      <paths name="案例">
+        <serverdata>
+          <mappings>
+            <mapping deploy="/" local="$PROJECT_DIR$" web="/" />
+          </mappings>
+        </serverdata>
+      </paths>
+    </serverData>
+  </component>
+</project>

+ 4 - 0
php/.idea/encodings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
+</project>

+ 6 - 0
php/.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+</project>

+ 8 - 0
php/.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/php.iml" filepath="$PROJECT_DIR$/.idea/php.iml" />
+    </modules>
+  </component>
+</project>

+ 90 - 0
php/.idea/php.iml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/extend" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="app\" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/adbario/php-dot-notation" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/alchemy/binary-driver" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/client" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/aliyuncs/oss-sdk-php" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/bacon/bacon-qr-code" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/clagiordano/weblibs-configmanager" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/danielstjules/stringy" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/dasprid/enum" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/annotations" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/easywechat-composer/easywechat-composer" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/endroid/qr-code" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/evenement/evenement" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/khanamiryan/qrcode-detector-decoder" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/league/flysystem" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/league/flysystem-cached-adapter" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/mtdowling/jmespath.php" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/php-enum" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/neutron/temporary-filesystem" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/opis/closure" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/overtrue/socialite" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/overtrue/wechat" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/paragonie/random_compat" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/php-ffmpeg/php-ffmpeg" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/pimple/pimple" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/cache" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/event-dispatcher" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-message" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/psr/simple-cache" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/ralouphie/getallheaders" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/ramsey/uuid" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/cache" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/cache-contracts" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher-contracts" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/filesystem" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/inflector" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/mime" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/options-resolver" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-idn" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php72" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/property-access" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation-contracts" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-dumper" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-exporter" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/framework" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-captcha" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-factory" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-helper" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-image" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-multi-app" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-orm" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-queue" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-template" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-throttle" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-view" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-worker" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/workerman/gateway-worker" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/workerman/gateway-worker-for-win" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/workerman/workerman" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/workerman/workerman-for-win" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/xaboy/form-builder" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/yuege/think-addons" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 87 - 0
php/.idea/php.xml

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="PhpIncludePathManager">
+    <include_path>
+      <path value="$PROJECT_DIR$/vendor/pimple/pimple" />
+      <path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-template" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-throttle" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-view" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-multi-app" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-image" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-queue" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-factory" />
+      <path value="$PROJECT_DIR$/vendor/topthink/framework" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-orm" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-helper" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-captcha" />
+      <path value="$PROJECT_DIR$/vendor/workerman/gateway-worker" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-worker" />
+      <path value="$PROJECT_DIR$/vendor/composer" />
+      <path value="$PROJECT_DIR$/vendor/workerman/workerman" />
+      <path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
+      <path value="$PROJECT_DIR$/vendor/psr/container" />
+      <path value="$PROJECT_DIR$/vendor/psr/http-message" />
+      <path value="$PROJECT_DIR$/vendor/psr/cache" />
+      <path value="$PROJECT_DIR$/vendor/psr/log" />
+      <path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
+      <path value="$PROJECT_DIR$/vendor/league/flysystem" />
+      <path value="$PROJECT_DIR$/vendor/league/flysystem-cached-adapter" />
+      <path value="$PROJECT_DIR$/vendor/opis/closure" />
+      <path value="$PROJECT_DIR$/vendor/ramsey/uuid" />
+      <path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
+      <path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
+      <path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
+      <path value="$PROJECT_DIR$/vendor/symfony/cache" />
+      <path value="$PROJECT_DIR$/vendor/symfony/process" />
+      <path value="$PROJECT_DIR$/vendor/symfony/service-contracts" />
+      <path value="$PROJECT_DIR$/vendor/symfony/mime" />
+      <path value="$PROJECT_DIR$/vendor/symfony/var-dumper" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-idn" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php72" />
+      <path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher" />
+      <path value="$PROJECT_DIR$/vendor/easywechat-composer/easywechat-composer" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
+      <path value="$PROJECT_DIR$/vendor/symfony/translation" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
+      <path value="$PROJECT_DIR$/vendor/symfony/cache-contracts" />
+      <path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher-contracts" />
+      <path value="$PROJECT_DIR$/vendor/symfony/http-foundation" />
+      <path value="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge" />
+      <path value="$PROJECT_DIR$/vendor/overtrue/socialite" />
+      <path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" />
+      <path value="$PROJECT_DIR$/vendor/overtrue/wechat" />
+      <path value="$PROJECT_DIR$/vendor/monolog/monolog" />
+      <path value="$PROJECT_DIR$/vendor/symfony/var-exporter" />
+      <path value="$PROJECT_DIR$/vendor/nesbot/carbon" />
+      <path value="$PROJECT_DIR$/vendor/yuege/think-addons" />
+      <path value="$PROJECT_DIR$/vendor/dasprid/enum" />
+      <path value="$PROJECT_DIR$/vendor/endroid/qr-code" />
+      <path value="$PROJECT_DIR$/vendor/bacon/bacon-qr-code" />
+      <path value="$PROJECT_DIR$/vendor/alchemy/binary-driver" />
+      <path value="$PROJECT_DIR$/vendor/doctrine/cache" />
+      <path value="$PROJECT_DIR$/vendor/evenement/evenement" />
+      <path value="$PROJECT_DIR$/vendor/myclabs/php-enum" />
+      <path value="$PROJECT_DIR$/vendor/neutron/temporary-filesystem" />
+      <path value="$PROJECT_DIR$/vendor/php-ffmpeg/php-ffmpeg" />
+      <path value="$PROJECT_DIR$/vendor/khanamiryan/qrcode-detector-decoder" />
+      <path value="$PROJECT_DIR$/vendor/symfony/filesystem" />
+      <path value="$PROJECT_DIR$/vendor/symfony/inflector" />
+      <path value="$PROJECT_DIR$/vendor/symfony/options-resolver" />
+      <path value="$PROJECT_DIR$/vendor/symfony/property-access" />
+      <path value="$PROJECT_DIR$/vendor/clagiordano/weblibs-configmanager" />
+      <path value="$PROJECT_DIR$/vendor/alibabacloud/client" />
+      <path value="$PROJECT_DIR$/vendor/adbario/php-dot-notation" />
+      <path value="$PROJECT_DIR$/vendor/mtdowling/jmespath.php" />
+      <path value="$PROJECT_DIR$/vendor/danielstjules/stringy" />
+      <path value="$PROJECT_DIR$/vendor/workerman/workerman-for-win" />
+      <path value="$PROJECT_DIR$/vendor/workerman/gateway-worker-for-win" />
+      <path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" />
+      <path value="$PROJECT_DIR$/vendor/xaboy/form-builder" />
+      <path value="$PROJECT_DIR$/vendor/doctrine/annotations" />
+      <path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
+      <path value="$PROJECT_DIR$/vendor/aliyuncs/oss-sdk-php" />
+    </include_path>
+  </component>
+  <component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
+</project>

+ 6 - 0
php/.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+  </component>
+</project>

+ 31 - 0
php/.idea/webServers.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="WebServers">
+    <option name="servers">
+      <webServer id="4fcf34b1-c072-460a-a0fb-6ff10e7cab5e" name="医疗" url="http://47.93.235.183">
+        <fileTransfer host="47.93.235.183" port="22" rootFolder="/www/anyluck/yixueyuan" accessType="SFTP">
+          <advancedOptions>
+            <advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
+          </advancedOptions>
+          <option name="port" value="22" />
+        </fileTransfer>
+      </webServer>
+      <webServer id="19dd7cac-5737-4b7b-8a11-33b60c030086" name="客户" url="http://59.46.59.72">
+        <fileTransfer host="59.46.59.72" port="21">
+          <advancedOptions>
+            <advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
+          </advancedOptions>
+          <option name="port" value="21" />
+        </fileTransfer>
+      </webServer>
+      <webServer id="a17252f6-8812-48c8-a0c7-2c577aaad637" name="案例" url="http://47.105.140.108">
+        <fileTransfer host="47.105.140.108" port="22" rootFolder="/www/wwwroot/guanwang/any_admin/any_admin" accessType="SFTP">
+          <advancedOptions>
+            <advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
+          </advancedOptions>
+          <option name="port" value="22" />
+        </fileTransfer>
+      </webServer>
+    </option>
+  </component>
+</project>

+ 952 - 0
php/.idea/workspace.xml

@@ -0,0 +1,952 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="BookmarkManager">
+    <bookmark url="file://$PROJECT_DIR$/app/admin/controller/Contents.php" line="25" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="52cc2ceb-e100-4a5f-a9e2-bb6b61bdbebd" name="Default Changelist" comment="">
+      <change beforePath="$PROJECT_DIR$/.env" beforeDir="false" afterPath="$PROJECT_DIR$/.env" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/admin/controller/Index.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/admin/controller/Index.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/api/config/route.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/api/controller/v1/Token.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/api/controller/v1/User.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/api/middleware.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/api/route/api.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/common.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/About.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/Adv.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/AdvPosition.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/Article.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/ArticleCate.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/Common.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/Examination.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/ExaminationApply.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/Feedback.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/Laboratory.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/MajorLevel.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/StudentAchievement.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/StudentExam.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/Subject.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/UserLevel.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/WxAccount.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/WxFans.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/WxMaterial.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/WxMaterialInfo.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/WxMenu.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/WxMsgHistory.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/WxReply.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/model/WxTag.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/web/controller/Index.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/database.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/database.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lemocms2020-3-24.sql" beforeDir="false" afterPath="$PROJECT_DIR$/lemocms2020-3-24.sql" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/favicon.ico" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/index.html" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/css/app.3923214e.css" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/css/chunk-vendors.56b28f4e.css" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/css/home.aa2e59b3.css" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/fonts/element-icons.535877f5.woff" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/fonts/element-icons.732389de.ttf" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/a889af7e-226d-42c9-ae87-c0d4a1eabc0d.fb3a43a6.jpg" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/banner2@2x.f9b7729b.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/banner@2x.ac15f717.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/bg.1444b65e.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_diy@2x.477f05dd.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_hy@2x.b5bea374.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_kc@2x(1).2d1cb158.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_kc@2x.2d1cb158.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_kj@2x.f19dbc1d.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_logo.f3733667.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_ms@2x.33f75f26.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_qd@2x.253f25b9.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_tg@2x.f47e24c0.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/icon_yj@2x.32ee214b.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/img_1@2x.089aa8b6.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/img_2@2x.e3ca62f1.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/img_3@2x.fefa2cfa.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/img_4@2x.597aa81a.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/img_anli@2x.15392499.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/img_dhy1@2x.99e9cef2.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/img_dhy2@2x.6aa4fcd1.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/img_dhy3@2x.9126b3c2.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/img/logo.125a8805.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/js/app.38019ab9.js" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/js/chunk-vendors.947778ee.js" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/public/dist/static/js/home.1cae7556.js" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/log/202005/29.log" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/c5d116d0b0fba4a743db108afcfc6dd9.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/cache/b5/0db2208db974a3bc060e4d7255aa98.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/session/sess_e073e8c24261b8fb84910f1bf455d29f" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/view/admin/index/main.html" beforeDir="false" afterPath="$PROJECT_DIR$/view/admin/index/main.html" afterDir="false" />
+    </list>
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="ComposerSettings" doNotAsk="true" synchronizationState="SYNCHRONIZE">
+    <pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
+  </component>
+  <component name="FileEditorManager">
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/app/common/model/User.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="276">
+              <caret line="22" column="1" lean-forward="true" selection-start-line="22" selection-start-column="1" selection-end-line="22" selection-end-column="1" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/app/ap/controller/Login.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="413">
+              <caret line="46" column="28" lean-forward="true" selection-start-line="46" selection-start-column="28" selection-end-line="46" selection-end-column="28" />
+              <folding>
+                <element signature="e#99#125#0#PHP" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/adddata.sql">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="547">
+              <caret line="53" column="43" selection-start-line="53" selection-start-column="43" selection-end-line="53" selection-end-column="43" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/app/common.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="345">
+              <caret line="197" column="7" lean-forward="true" selection-start-line="197" selection-start-column="7" selection-end-line="197" selection-end-column="7" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/app/ap/route/api.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="414">
+              <caret line="21" column="44" lean-forward="true" selection-start-line="21" selection-start-column="44" selection-end-line="21" selection-end-column="44" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/app/middleware/Token.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="138">
+              <caret line="11" column="25" lean-forward="true" selection-start-line="11" selection-start-column="25" selection-end-line="11" selection-end-column="25" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="FileTemplateManagerImpl">
+    <option name="RECENT_TEMPLATES">
+      <list>
+        <option value="JavaScript File" />
+        <option value="HTML File" />
+      </list>
+    </option>
+  </component>
+  <component name="FindInProjectRecents">
+    <findStrings>
+      <find>signup</find>
+      <find>Laboratorylist</find>
+      <find>my_exam</find>
+      <find>Wx</find>
+      <find>outvodeo</find>
+      <find>delAll</find>
+      <find>all_reject</find>
+      <find>switch</find>
+      <find>status</find>
+      <find>reject</find>
+      <find>all_agree</find>
+      <find>cancel_sign</find>
+      <find>$system</find>
+      <find>video</find>
+      <find>submit</find>
+      <find>student_id</find>
+      <find>aliyuncs/oss-sdk-php</find>
+      <find>userLevel</find>
+      <find>lay-skin</find>
+      <find>auth_open</find>
+      <find>lay-filter</find>
+      <find>search</find>
+      <find>UploadedFile</find>
+      <find>addBtn</find>
+      <find>factory</find>
+      <find>init</find>
+      <find>echarts</find>
+      <find>api</find>
+      <find>Invalid authorization credentials</find>
+      <find>resultset_type</find>
+    </findStrings>
+    <dirStrings>
+      <dir>D:\phpstudy_pro\WWW\small\syyxy\php</dir>
+    </dirStrings>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
+  </component>
+  <component name="IdeDocumentHistory">
+    <option name="CHANGED_PATHS">
+      <list>
+        <option value="$PROJECT_DIR$/app/admin/controller/Laboratory.php" />
+        <option value="$PROJECT_DIR$/view/admin/examination/exam.html" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Curriculum.php" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Examination.php" />
+        <option value="$PROJECT_DIR$/view/admin/examination/index.html" />
+        <option value="$PROJECT_DIR$/app/index/controller/Login.php" />
+        <option value="$PROJECT_DIR$/view/admin/parameter/index.html" />
+        <option value="$PROJECT_DIR$/app/index/controller/Examinations.php" />
+        <option value="$PROJECT_DIR$/app/index/controller/Home.php" />
+        <option value="$PROJECT_DIR$/app/admin/model/Video.php" />
+        <option value="$PROJECT_DIR$/view/admin/auth/admin_add.html" />
+        <option value="$PROJECT_DIR$/view/admin/auth/admin_list.html" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Auth.php" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Login.php" />
+        <option value="$PROJECT_DIR$/app/common/controller/Backend.php" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/addLinks.html" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/add_links.html" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/links.html" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/add_dh.html" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/dh_list.html" />
+        <option value="$PROJECT_DIR$/app/common/controller/Aliyunoss.php" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/banner.html" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/add_banner.html" />
+        <option value="$PROJECT_DIR$/public/static/plugins/layui/extend/echarts/echarts.js" />
+        <option value="$PROJECT_DIR$/public/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js" />
+        <option value="$PROJECT_DIR$/public/static/plugins/layui/extend/echarts/echarts.min.js" />
+        <option value="$PROJECT_DIR$/lemocmsss.sql" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/statistics.html" />
+        <option value="$PROJECT_DIR$/app/web/controller/Index.php" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Friendship.php" />
+        <option value="$PROJECT_DIR$/view/admin/friendship/index.html" />
+        <option value="$PROJECT_DIR$/lemocms2020-3-24.sql" />
+        <option value="$PROJECT_DIR$/.env" />
+        <option value="$PROJECT_DIR$/view/admin/index/main.html" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Index.php" />
+        <option value="$PROJECT_DIR$/app/api/route/api.php" />
+        <option value="$PROJECT_DIR$/app/api/controller/v1/User.php" />
+        <option value="$PROJECT_DIR$/app/api/middleware.php" />
+        <option value="$PROJECT_DIR$/extend/lemo/api/Api.php" />
+        <option value="$PROJECT_DIR$/extend/lemo/api/Token.php" />
+        <option value="$PROJECT_DIR$/app/ap/controller/v1/Index.php" />
+        <option value="$PROJECT_DIR$/app/ap/controller/v1/User.php" />
+        <option value="$PROJECT_DIR$/app/ap/route/ap.php" />
+        <option value="$PROJECT_DIR$/app/ap/controller/v1/Token.php" />
+        <option value="$PROJECT_DIR$/app/middleware/Notken.php" />
+        <option value="$PROJECT_DIR$/config/database.php" />
+        <option value="$PROJECT_DIR$/app/common.php" />
+        <option value="$PROJECT_DIR$/app/middleware/Token.php" />
+        <option value="$PROJECT_DIR$/app/ap/route/api.php" />
+        <option value="$PROJECT_DIR$/app/ap/controller/Login.php" />
+        <option value="$PROJECT_DIR$/adddata.sql" />
+      </list>
+    </option>
+  </component>
+  <component name="PhpDebugGeneral" xdebug_debug_port="9001" />
+  <component name="PhpServers">
+    <servers>
+      <server host="127.0.0.1" id="6f4e8355-afd5-4149-8b51-9ae55f8f1bc1" name="本地" port="8989" />
+    </servers>
+  </component>
+  <component name="PhpWebServerValidation" path_to_validation_script="D:\phpstudy_pro\WWW\small\syyxy\php\public" selected_validation_type="LOCAL" web_path_to_validation_script="http://127.0.0.1:8989" />
+  <component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP 7.3">
+    <include_path>
+      <path value="$PROJECT_DIR$/vendor/pimple/pimple" />
+      <path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-template" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-throttle" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-view" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-multi-app" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-image" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-queue" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-factory" />
+      <path value="$PROJECT_DIR$/vendor/topthink/framework" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-orm" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-helper" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-captcha" />
+      <path value="$PROJECT_DIR$/vendor/workerman/gateway-worker" />
+      <path value="$PROJECT_DIR$/vendor/topthink/think-worker" />
+      <path value="$PROJECT_DIR$/vendor/composer" />
+      <path value="$PROJECT_DIR$/vendor/workerman/workerman" />
+      <path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
+      <path value="$PROJECT_DIR$/vendor/psr/container" />
+      <path value="$PROJECT_DIR$/vendor/psr/http-message" />
+      <path value="$PROJECT_DIR$/vendor/psr/cache" />
+      <path value="$PROJECT_DIR$/vendor/psr/log" />
+      <path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
+      <path value="$PROJECT_DIR$/vendor/league/flysystem" />
+      <path value="$PROJECT_DIR$/vendor/league/flysystem-cached-adapter" />
+      <path value="$PROJECT_DIR$/vendor/opis/closure" />
+      <path value="$PROJECT_DIR$/vendor/ramsey/uuid" />
+      <path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
+      <path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
+      <path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
+      <path value="$PROJECT_DIR$/vendor/symfony/cache" />
+      <path value="$PROJECT_DIR$/vendor/symfony/process" />
+      <path value="$PROJECT_DIR$/vendor/symfony/service-contracts" />
+      <path value="$PROJECT_DIR$/vendor/symfony/mime" />
+      <path value="$PROJECT_DIR$/vendor/symfony/var-dumper" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-idn" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php72" />
+      <path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher" />
+      <path value="$PROJECT_DIR$/vendor/easywechat-composer/easywechat-composer" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
+      <path value="$PROJECT_DIR$/vendor/symfony/translation" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
+      <path value="$PROJECT_DIR$/vendor/symfony/cache-contracts" />
+      <path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher-contracts" />
+      <path value="$PROJECT_DIR$/vendor/symfony/http-foundation" />
+      <path value="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge" />
+      <path value="$PROJECT_DIR$/vendor/overtrue/socialite" />
+      <path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" />
+      <path value="$PROJECT_DIR$/vendor/overtrue/wechat" />
+      <path value="$PROJECT_DIR$/vendor/monolog/monolog" />
+      <path value="$PROJECT_DIR$/vendor/symfony/var-exporter" />
+      <path value="$PROJECT_DIR$/vendor/nesbot/carbon" />
+      <path value="$PROJECT_DIR$/vendor/yuege/think-addons" />
+      <path value="$PROJECT_DIR$/vendor/dasprid/enum" />
+      <path value="$PROJECT_DIR$/vendor/endroid/qr-code" />
+      <path value="$PROJECT_DIR$/vendor/bacon/bacon-qr-code" />
+      <path value="$PROJECT_DIR$/vendor/alchemy/binary-driver" />
+      <path value="$PROJECT_DIR$/vendor/doctrine/cache" />
+      <path value="$PROJECT_DIR$/vendor/evenement/evenement" />
+      <path value="$PROJECT_DIR$/vendor/myclabs/php-enum" />
+      <path value="$PROJECT_DIR$/vendor/neutron/temporary-filesystem" />
+      <path value="$PROJECT_DIR$/vendor/php-ffmpeg/php-ffmpeg" />
+      <path value="$PROJECT_DIR$/vendor/khanamiryan/qrcode-detector-decoder" />
+      <path value="$PROJECT_DIR$/vendor/symfony/filesystem" />
+      <path value="$PROJECT_DIR$/vendor/symfony/inflector" />
+      <path value="$PROJECT_DIR$/vendor/symfony/options-resolver" />
+      <path value="$PROJECT_DIR$/vendor/symfony/property-access" />
+      <path value="$PROJECT_DIR$/vendor/clagiordano/weblibs-configmanager" />
+      <path value="$PROJECT_DIR$/vendor/alibabacloud/client" />
+      <path value="$PROJECT_DIR$/vendor/adbario/php-dot-notation" />
+      <path value="$PROJECT_DIR$/vendor/mtdowling/jmespath.php" />
+      <path value="$PROJECT_DIR$/vendor/danielstjules/stringy" />
+      <path value="$PROJECT_DIR$/vendor/workerman/workerman-for-win" />
+      <path value="$PROJECT_DIR$/vendor/workerman/gateway-worker-for-win" />
+      <path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" />
+      <path value="$PROJECT_DIR$/vendor/xaboy/form-builder" />
+      <path value="$PROJECT_DIR$/vendor/doctrine/annotations" />
+      <path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
+      <path value="$PROJECT_DIR$/vendor/aliyuncs/oss-sdk-php" />
+    </include_path>
+  </component>
+  <component name="PhpXdebugProxy" ide_key="PHPSTROM" host="127.0.0.1" />
+  <component name="ProjectFrameBounds" extendedState="6">
+    <option name="x" value="-8" />
+    <option name="y" value="-8" />
+    <option name="width" value="1936" />
+    <option name="height" value="1056" />
+  </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectView">
+    <navigator proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="Scope" />
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+              <item name="app" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+              <item name="route" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="DefaultHtmlFileTemplate" value="HTML File" />
+    <property name="WebServerToolWindowFactoryState" value="false" />
+    <property name="WebServerToolWindowPanel.toolwindow.highlight.mappings" value="true" />
+    <property name="WebServerToolWindowPanel.toolwindow.highlight.symlinks" value="true" />
+    <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
+    <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
+    <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/../../../company/any_admin" />
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
+    <property name="nodejs_package_manager_path" value="npm" />
+    <property name="settings.editor.selected.configurable" value="Docker" />
+  </component>
+  <component name="RecentsManager">
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="D:\phpstudy_pro\WWW\company\any_admin\public\static\admin\images" />
+      <recent name="D:\phpstudy_pro\WWW\small\syyxy\php\public\static\plugins\layui\extend\city" />
+      <recent name="D:\phpstudy_pro\WWW\small\syyxy\php\app\index\controller" />
+      <recent name="D:\phpstudy_pro\WWW\small\syyxy\php\public\static\plugins\selectmenu" />
+    </key>
+    <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\phpstudy_pro\WWW\my\fuye\php\app\ap\config" />
+      <recent name="D:\phpstudy_pro\WWW\my\fuye\php\app\ap\route" />
+      <recent name="D:\phpstudy_pro\WWW\my\fuye\php\app\ap" />
+      <recent name="D:\phpstudy_pro\WWW\company\any_admin\public\static\admin\images" />
+      <recent name="D:\phpstudy_pro\WWW\company\any_admin\public" />
+    </key>
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="RunManager">
+    <configuration name="VideoTranscodeTest.testSimpleTranscodeX264" type="PHPUnitRunConfigurationType" factoryName="PHPUnit" temporary="true">
+      <TestRunner class="Tests\FFMpeg\Functional\VideoTranscodeTest" file="$PROJECT_DIR$/vendor/php-ffmpeg/php-ffmpeg/tests/Functional/VideoTranscodeTest.php" method="testSimpleTranscodeX264" scope="Method" />
+      <method v="2" />
+    </configuration>
+    <recent_temporary>
+      <list>
+        <item itemvalue="PHPUnit.VideoTranscodeTest.testSimpleTranscodeX264" />
+      </list>
+    </recent_temporary>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="52cc2ceb-e100-4a5f-a9e2-bb6b61bdbebd" name="Default Changelist" comment="" />
+      <created>1581388378645</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1581388378645</updated>
+      <workItem from="1581388380256" duration="70000" />
+      <workItem from="1581389189361" duration="2626000" />
+      <workItem from="1581409726591" duration="1791000" />
+      <workItem from="1581468628240" duration="10762000" />
+      <workItem from="1581555213748" duration="17806000" />
+      <workItem from="1581641591509" duration="27100000" />
+      <workItem from="1581911436975" duration="10274000" />
+      <workItem from="1581994869382" duration="27993000" />
+      <workItem from="1582085166688" duration="19246000" />
+      <workItem from="1582163865824" duration="4203000" />
+      <workItem from="1582168501528" duration="16779000" />
+      <workItem from="1582191816268" duration="684000" />
+      <workItem from="1582250711093" duration="19375000" />
+      <workItem from="1582510422435" duration="25276000" />
+      <workItem from="1582596051151" duration="29779000" />
+      <workItem from="1582682448247" duration="30772000" />
+      <workItem from="1582768326052" duration="18372000" />
+      <workItem from="1582855102422" duration="30286000" />
+      <workItem from="1583114763807" duration="22614000" />
+      <workItem from="1583202713704" duration="17452000" />
+      <workItem from="1583287169409" duration="13989000" />
+      <workItem from="1583374123732" duration="305000" />
+      <workItem from="1583381132160" duration="3916000" />
+      <workItem from="1583460056466" duration="926000" />
+      <workItem from="1583462170345" duration="8621000" />
+      <workItem from="1583487991759" duration="714000" />
+      <workItem from="1583720417170" duration="11894000" />
+      <workItem from="1583734229212" duration="12291000" />
+      <workItem from="1583807111760" duration="8556000" />
+      <workItem from="1583828737356" duration="676000" />
+      <workItem from="1583831415192" duration="2728000" />
+      <workItem from="1583892039774" duration="14108000" />
+      <workItem from="1583998455016" duration="2231000" />
+      <workItem from="1584065367387" duration="9842000" />
+      <workItem from="1584080193980" duration="3368000" />
+      <workItem from="1584086598780" duration="3893000" />
+      <workItem from="1584327205805" duration="4358000" />
+      <workItem from="1584413058175" duration="6178000" />
+      <workItem from="1584510920505" duration="7015000" />
+      <workItem from="1584583198918" duration="7038000" />
+      <workItem from="1584669593820" duration="14060000" />
+      <workItem from="1584704198715" duration="618000" />
+      <workItem from="1584933158881" duration="22167000" />
+      <workItem from="1585015771326" duration="21698000" />
+      <workItem from="1585101770441" duration="4703000" />
+      <workItem from="1585188430122" duration="16003000" />
+      <workItem from="1585275106900" duration="2033000" />
+      <workItem from="1585296814300" duration="3781000" />
+      <workItem from="1585534563284" duration="4894000" />
+      <workItem from="1585548655290" duration="4084000" />
+      <workItem from="1585620191275" duration="24812000" />
+      <workItem from="1585702785356" duration="1422000" />
+      <workItem from="1585788954827" duration="1960000" />
+      <workItem from="1585876330420" duration="14773000" />
+      <workItem from="1586227112165" duration="611000" />
+      <workItem from="1586240413516" duration="2100000" />
+      <workItem from="1586308275224" duration="4312000" />
+      <workItem from="1586394607218" duration="623000" />
+      <workItem from="1586519257057" duration="876000" />
+      <workItem from="1586521877995" duration="615000" />
+      <workItem from="1586916500760" duration="1795000" />
+      <workItem from="1587087519929" duration="443000" />
+      <workItem from="1587961772564" duration="1542000" />
+      <workItem from="1587969917590" duration="180000" />
+      <workItem from="1588063898817" duration="1575000" />
+      <workItem from="1588125942461" duration="740000" />
+      <workItem from="1588743348853" duration="1570000" />
+      <workItem from="1588813721962" duration="643000" />
+      <workItem from="1589275176539" duration="1034000" />
+      <workItem from="1589339100838" duration="1130000" />
+      <workItem from="1589765600691" duration="1067000" />
+      <workItem from="1590029774411" duration="607000" />
+      <workItem from="1590041818941" duration="2806000" />
+      <workItem from="1590630319281" duration="872000" />
+      <workItem from="1590637551328" duration="21498000" />
+      <workItem from="1590714534675" duration="25886000" />
+      <workItem from="1590983110728" duration="16565000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TimeTrackingManager">
+    <option name="totallyTimeSpent" value="682005000" />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
+    <editor active="true" />
+    <layout>
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.21908316" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Find" order="1" weight="0.329718" />
+      <window_info anchor="bottom" id="Run" order="2" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" />
+      <window_info anchor="bottom" id="Docker" order="7" weight="0.329718" />
+      <window_info anchor="bottom" id="Database Changes" order="8" />
+      <window_info anchor="bottom" id="Version Control" order="9" weight="0.3290993" />
+      <window_info anchor="bottom" id="Terminal" order="10" visible="true" weight="0.22342733" />
+      <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
+      <window_info anchor="bottom" id="File Transfer" order="12" visible="true" weight="0.056399133" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+      <window_info anchor="right" id="Database" order="3" />
+      <window_info anchor="right" id="Remote Host" order="4" weight="0.32942432" />
+      <window_info anchor="right" id="Cargo" order="5" />
+    </layout>
+    <layout-to-restore>
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.21481876" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Find" order="1" weight="0.329718" />
+      <window_info anchor="bottom" id="Run" order="2" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" />
+      <window_info anchor="bottom" id="Docker" order="7" weight="0.329718" />
+      <window_info anchor="bottom" id="Database Changes" order="8" />
+      <window_info anchor="bottom" id="Version Control" order="9" weight="0.3290993" />
+      <window_info anchor="bottom" id="Terminal" order="10" weight="0.22342733" />
+      <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
+      <window_info anchor="bottom" id="File Transfer" order="12" visible="true" weight="0.056399133" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+      <window_info anchor="right" id="Database" order="3" />
+      <window_info anchor="right" id="Remote Host" order="4" weight="0.32942432" />
+      <window_info anchor="right" id="Cargo" order="5" />
+    </layout-to-restore>
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="1" />
+  </component>
+  <component name="XDebuggerManager">
+    <breakpoint-manager>
+      <breakpoints>
+        <line-breakpoint enabled="true" type="php">
+          <url>file://$PROJECT_DIR$/app/index/controller/My.php</url>
+          <line>11</line>
+          <option name="timeStamp" value="1" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="php">
+          <url>file://$PROJECT_DIR$/vendor/php-ffmpeg/php-ffmpeg/tests/Functional/FunctionalTestCase.php</url>
+          <line>4</line>
+          <option name="timeStamp" value="2" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="php">
+          <url>file://$PROJECT_DIR$/app/admin/controller/Error.php</url>
+          <line>14</line>
+          <option name="timeStamp" value="4" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="php">
+          <url>file://$PROJECT_DIR$/app/common/controller/Aliyunoss.php</url>
+          <line>9</line>
+          <option name="timeStamp" value="5" />
+        </line-breakpoint>
+      </breakpoints>
+    </breakpoint-manager>
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/config/admin/admin.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="230">
+          <caret line="18" column="63" lean-forward="true" selection-start-line="18" selection-start-column="63" selection-end-line="18" selection-end-column="64" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/config/addons.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="230">
+          <caret line="10" column="6" lean-forward="true" selection-start-line="10" selection-start-column="6" selection-end-line="10" selection-end-column="6" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/public/storage/uploads/20200529/ad110b5e57ac537529fe3c2a2bf8cdfc.png">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/public/phpinfo.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="161">
+          <caret line="7" column="10" lean-forward="true" selection-start-line="7" selection-start-column="10" selection-end-line="7" selection-end-column="10" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/web/controller/Index.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="964">
+          <caret line="52" column="5" lean-forward="true" selection-start-line="52" selection-start-column="5" selection-end-line="52" selection-end-column="5" />
+          <folding>
+            <element signature="e#128#151#0#PHP" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/error/controller/Error.php">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/worker/controller/User.php">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/controller/Wxs.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-139" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/command/Hello.php">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/command/Timer.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-207" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/extend/lemo/api/validate/ValidataBase.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="230">
+          <caret line="23" column="7" lean-forward="true" selection-start-line="23" selection-start-column="7" selection-end-line="23" selection-end-column="7" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/vendor/topthink/think-throttle/src/Throttle.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-1886">
+          <caret line="21" column="17" lean-forward="true" selection-start-line="21" selection-start-column="17" selection-end-line="21" selection-end-column="17" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/vendor/topthink/framework/src/think/middleware/LoadLangPack.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="230">
+          <caret line="23" column="6" selection-start-line="23" selection-start-column="6" selection-end-line="23" selection-end-column="6" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/api/controller/v1/User.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-161">
+          <caret line="35" column="16" selection-start-line="35" selection-start-column="7" selection-end-line="35" selection-end-column="16" />
+          <folding>
+            <element signature="e#41#66#0#PHP" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/api/config/route.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="667">
+          <caret line="29" column="17" selection-start-line="29" selection-start-column="17" selection-end-line="29" selection-end-column="17" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/api/controller/v1/Token.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="69">
+          <caret line="3" column="16" selection-start-line="3" selection-start-column="16" selection-end-line="3" selection-end-column="16" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/extend/lemo/api/Api.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="61">
+          <caret line="26" column="7" lean-forward="true" selection-start-line="26" selection-start-column="7" selection-end-line="26" selection-end-column="7" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/api/middleware.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="92">
+          <caret line="14" selection-start-line="14" selection-end-line="20" selection-end-column="2" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/ap/middleware.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="276">
+          <caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/api/route/api.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="138">
+          <caret line="16" column="21" lean-forward="true" selection-start-line="16" selection-start-column="21" selection-end-line="16" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/ap/config/route.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="552">
+          <caret line="30" column="34" lean-forward="true" selection-start-line="30" selection-start-column="34" selection-end-line="30" selection-end-column="34" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/ap/controller/v1/Index.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="253">
+          <caret line="16" column="22" selection-start-line="16" selection-start-column="22" selection-end-line="16" selection-end-column="22" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/runtime/ap/log/202006/01.log">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="368">
+          <caret line="16" column="99" selection-start-line="16" selection-start-column="99" selection-end-line="16" selection-end-column="99" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/controller/ap/v1/User1.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1885">
+          <caret line="83" column="5" lean-forward="true" selection-start-line="9" selection-start-column="3" selection-end-line="83" selection-end-column="5" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/ap/route/ap.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="184">
+          <caret line="8" selection-start-line="8" selection-end-line="8" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/vendor/topthink/framework/src/think/response/Json.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="368">
+          <caret line="42" column="29" selection-start-line="42" selection-start-column="23" selection-end-line="42" selection-end-column="29" />
+          <folding>
+            <element signature="e#650#667#0#PHP" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/vendor/topthink/framework/src/helper.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1924">
+          <caret line="324" column="45" selection-start-line="324" selection-start-column="40" selection-end-line="324" selection-end-column="45" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/extend/lemo/service/WechatApp.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-621" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/extend/lemo/service/Predis.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-690" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/extend/lemo/api/Oauth.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="176">
+          <caret line="50" column="12" lean-forward="true" selection-start-line="50" selection-start-column="12" selection-end-line="56" selection-end-column="64" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/extend/lemo/api/Token.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-3842">
+          <caret line="63" lean-forward="true" selection-start-line="63" selection-end-line="63" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/ap/controller/v1/Token.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="552">
+          <caret line="29" column="22" selection-start-line="29" selection-start-column="22" selection-end-line="29" selection-end-column="22" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/any_college.sql">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-579159">
+          <caret line="35" column="31" selection-start-line="35" selection-start-column="31" selection-end-line="35" selection-end-column="31" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lm_about.sql">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="96">
+          <caret line="13659" selection-start-line="13659" selection-end-line="13671" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/model/About.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="299">
+          <caret line="18" column="1" lean-forward="true" selection-start-line="18" selection-start-column="1" selection-end-line="18" selection-end-column="1" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/model/WxMenu.php">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/model/WxMsgHistory.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="276">
+          <caret line="22" column="1" lean-forward="true" selection-start-line="22" selection-start-column="1" selection-end-line="22" selection-end-column="1" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/model/FieldType.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="345">
+          <caret line="15" lean-forward="true" selection-start-line="15" selection-end-line="15" />
+          <folding>
+            <element signature="e#37#65#0#PHP" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/model/BaseModel.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="206">
+          <caret line="15" column="42" lean-forward="true" selection-start-line="15" selection-start-column="42" selection-end-line="15" selection-end-column="42" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/model/Config.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="69">
+          <caret line="3" column="25" selection-start-line="3" selection-start-column="25" selection-end-line="3" selection-end-column="25" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/model/Common.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="299">
+          <caret line="13" selection-start-line="13" selection-end-line="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common/model/User.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="276">
+          <caret line="22" column="1" lean-forward="true" selection-start-line="22" selection-start-column="1" selection-end-line="22" selection-end-column="1" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/ap/controller/v1/User.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-805">
+          <caret line="30" column="26" selection-start-line="30" selection-start-column="20" selection-end-line="30" selection-end-column="26" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/config/database.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="92">
+          <caret line="22" column="46" selection-start-line="22" selection-start-column="46" selection-end-line="22" selection-end-column="46" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/event.php">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/common.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="345">
+          <caret line="197" column="7" lean-forward="true" selection-start-line="197" selection-start-column="7" selection-end-line="197" selection-end-column="7" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/middleware/Notken.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="138">
+          <caret line="11" column="6" selection-start-line="11" selection-start-column="6" selection-end-line="11" selection-end-column="6" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/middleware/Token.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="138">
+          <caret line="11" column="25" lean-forward="true" selection-start-line="11" selection-start-column="25" selection-end-line="11" selection-end-column="25" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/ap/route/api.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="414">
+          <caret line="21" column="44" lean-forward="true" selection-start-line="21" selection-start-column="44" selection-end-line="21" selection-end-column="44" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app/ap/controller/Login.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="413">
+          <caret line="46" column="28" lean-forward="true" selection-start-line="46" selection-start-column="28" selection-end-line="46" selection-end-column="28" />
+          <folding>
+            <element signature="e#99#125#0#PHP" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/adddata.sql">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="547">
+          <caret line="53" column="43" selection-start-line="53" selection-start-column="43" selection-end-line="53" selection-end-column="43" />
+        </state>
+      </provider>
+    </entry>
+  </component>
+</project>

+ 0 - 0
php/.keep


Diferenças do arquivo suprimidas por serem muito extensas
+ 42 - 0
php/.travis.yml


+ 56 - 0
php/adddata.sql

@@ -0,0 +1,56 @@
+DROP TABLE IF EXISTS `lm_user`;
+CREATE TABLE `lm_user`  (
+  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `user` varchar (128) NULL DEFAULT '' COMMENT '用户',
+  `name` varchar (128) NULL DEFAULT '' COMMENT '呢称',
+  `pwd` varchar (255) NULL DEFAULT '' COMMENT '密码',
+  `openid` varchar (255) NULL DEFAULT '' COMMENT '微信登录openid',
+  `token` varchar (255) NULL DEFAULT '' COMMENT 'token',
+  `money` decimal (20,2) NULL DEFAULT '0' COMMENT '账号余额',
+  `push_money` decimal (20,2) NULL DEFAULT '0' COMMENT '发布余额',
+  `status` int (1) NULL DEFAULT '0' COMMENT '0 正常 1 禁止登录',
+  `status_time` varchar (20) NULL DEFAULT '' COMMENT '封号时间',
+  `create_time` varchar (20) NULL DEFAULT '' COMMENT '创建时间',
+  `vip_time` varchar (20) NULL DEFAULT '' COMMENT '会员到期时间',
+  `vip_level` int (1) NULL DEFAULT 0 COMMENT '0 普通会员 1 周卡 2月卡 3 年卡 ',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户表' ROW_FORMAT = Compact;
+
+
+DROP TABLE IF EXISTS `lm_task`;
+CREATE TABLE `lm_task`  (
+  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `type` int (11)  DEFAULT 0 COMMENT '0 实名制 1 下载注册 2 网页注册 3 关注投票 4 分享转发 5电子商务 6多天任务 7 特单任务',
+  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
+  `name` varchar (128)  DEFAULT '' COMMENT '任务名称',
+  `explain` varchar (255)  DEFAULT '' COMMENT '任务说明',
+  `text` text  DEFAULT '' COMMENT '任务步骤',
+`num` int (11)  DEFAULT 0 COMMENT '剩余数量',
+`nums` int (11)  DEFAULT 0 COMMENT '总数量',
+`money` decimal (11,2)  DEFAULT 0 COMMENT '实际金额',
+`put_money` decimal (11,2)  DEFAULT 0 COMMENT '上架金额',
+`status` int (11)  DEFAULT 0 COMMENT '0 审核中 1 审核通过 2 审核失败 3 已完成 4 已禁止',
+`msg` varchar (128)  DEFAULT '' COMMENT '审核失败原因 ',
+`repeat` int (11)  DEFAULT 0 COMMENT '0 可以重复做 1 不可以 ',
+  `end_task_time` varchar (20) NULL DEFAULT '' COMMENT '设置的结束时间',
+  `push_time` varchar (20) NULL DEFAULT '' COMMENT '提交时间',
+  `examine_time` varchar (20) NULL DEFAULT '' COMMENT '审核时长时间',
+  `create_time` varchar (20) NULL DEFAULT '' COMMENT '创建时间',
+  `update_time` varchar (20) NULL DEFAULT '' COMMENT '更新时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '任务列表' ROW_FORMAT = Compact;
+
+
+DROP TABLE IF EXISTS `lm_task_order`;
+CREATE TABLE `lm_task_order`  (
+  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
+  `user_id` int (11)  DEFAULT 0 COMMENT '商户id',
+  `task_id` int (11)  DEFAULT 0 COMMENT '任务id',
+  `push` int (32)  DEFAULT 0 COMMENT '提交时长',
+  `examine` int (32)  DEFAULT 0 COMMENT '审核时长',
+  `add_time` varchar (20)  DEFAULT 0 COMMENT '添加时间',
+  `push_time` varchar (20)  DEFAULT 0 COMMENT '提交任务时间',
+  `content` text DEFAULT '' COMMENT '驳回数据',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '订单列表' ROW_FORMAT = Compact;

+ 18 - 0
php/addons/text/config.php

@@ -0,0 +1,18 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: anyluck
+ * Date: 2020/1/14
+ * Time: 17:38
+ */
+return [
+    'display' => [
+        'title' => '是否显示:',
+        'type' => 'radio',
+        'options' => [
+            '1' => '显示',
+            '0' => '不显示'
+        ],
+        'value' => '1'
+    ]
+];

+ 63 - 0
php/addons/text/controller/Pugin.php

@@ -0,0 +1,63 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Administrator
+ * Date: 2020/1/14
+ * Time: 17:05
+ */
+
+namespace addons\text;
+
+
+use think\Addons;
+
+/**
+ * Class Pugin
+ * @package addons\text
+ */
+class Pugin extends Addons
+{
+    // 该插件的基础信息
+    public $info = [
+        'name' => 'test',    // 插件标识
+        'title' => '插件测试',    // 插件名称
+        'description' => 'thinkph6插件测试',    // 插件简介
+        'status' => 0,    // 状态
+        'author' => 'byron sampson',
+        'version' => '0.1'
+    ];
+
+
+    /**
+     * 插件安装方法
+     * @return bool
+     */
+    public function install()
+    {
+        // TODO: Implement install() method.
+        return true;
+    }
+    /**
+     * 插件卸载方法
+     * @return bool
+     */
+    public function uninstall()
+    {
+        // TODO: Implement uninstall() method.
+        return true;
+    }
+
+    /**
+     * 实现的testhook钩子方法
+     * @return mixed
+     */
+    public function testhook($param)
+    {
+        // 调用钩子时候的参数信息
+        print_r($param);
+        // 当前插件的配置信息,配置信息存在当前目录的config.php文件中,见下方
+        print_r($this->getConfig());
+        // 可以返回模板,模板文件默认读取的为插件目录中的文件。模板名不能为空!
+        return $this->fetch('info');
+    }
+}

+ 15 - 0
php/addons/text/controller/Text.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: anyluck
+ * Date: 2020/1/14
+ * Time: 17:29
+ */
+
+namespace addons\text;
+
+
+class Text
+{
+
+}

+ 10 - 0
php/addons/text/view/pugin/info.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+</body>
+</html>

Diferenças do arquivo suprimidas por serem muito extensas
+ 25238 - 0
php/any_college.sql


Diferenças do arquivo suprimidas por serem muito extensas
+ 25250 - 0
php/any_college2020-2-27.sql


+ 1 - 0
php/app/.htaccess

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

+ 26 - 0
php/app/404.html

@@ -0,0 +1,26 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+<title>404</title>
+<style>
+	body{
+		background-color:#444;
+		font-size:14px;
+	}
+	h3{
+		font-size:60px;
+		color:#eee;
+		text-align:center;
+		padding-top:30px;
+		font-weight:normal;
+	}
+</style>
+</head>
+
+<body>
+<h3>404,您请求的文件不存在!</h3>
+</body>
+</html>

+ 213 - 0
php/app/BaseController.php

@@ -0,0 +1,213 @@
+<?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>
+// +----------------------------------------------------------------------
+declare (strict_types = 1);
+
+namespace app;
+
+use think\App;
+use think\exception\HttpResponseException;
+use think\exception\ValidateException;
+use think\Validate;
+use think\response\Redirect;
+use HttpEncodingException;
+use think\Response;
+/**
+ * 控制器基础类
+ */
+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, '.')) {
+                // 支持场景
+                list($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);
+    }
+
+    /**
+     * 操作成功跳转的快捷方法
+     * @access protected
+     * @param  mixed     $msg 提示信息
+     * @param  string    $url 跳转的URL地址
+     * @param  mixed     $data 返回的数据
+     * @param  integer   $wait 跳转等待时间
+     * @param  array     $header 发送的Header信息
+     * @return void
+     */
+    protected function success($msg = '', string $url = null, $data = '', int $wait = 3, array $header = [])
+    {
+        if (is_null($url) && isset($_SERVER["HTTP_REFERER"])) {
+            $url = $_SERVER["HTTP_REFERER"];
+        } elseif ($url) {
+            $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : app('route')->buildUrl($url);
+        }
+
+        $result = [
+            'code' => 1,
+            'msg'  => $msg,
+            'data' => $data,
+            'url'  => $url,
+            'wait' => $wait,
+        ];
+
+        $type = $this->getResponseType();
+        if ($type == 'html'){
+            $response = view($this->app->config->get('app.dispatch_success_tmpl'), $result);
+        } else if ($type == 'json') {
+            $response = json($result);
+        }
+        throw new HttpResponseException($response);
+    }
+
+    /**
+     * 操作错误跳转的快捷方法
+     * @access protected
+     * @param  mixed     $msg 提示信息
+     * @param  string    $url 跳转的URL地址
+     * @param  mixed     $data 返回的数据
+     * @param  integer   $wait 跳转等待时间
+     * @param  array     $header 发送的Header信息
+     * @return void
+     */
+    protected function error($msg = '', string $url = null, $data = '', int $wait = 3, array $header = [])
+    {
+        if (is_null($url)) {
+            $url = $this->request->isAjax() ? '' : 'javascript:history.back(-1);';
+        } elseif ($url) {
+            $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : $this->app->route->buildUrl($url);
+        }
+
+        $result = [
+            'code' => 0,
+            'msg'  => $msg,
+            'data' => $data,
+            'url'  => $url,
+            'wait' => $wait,
+        ];
+
+        $type = $this->getResponseType();
+        if ($type == 'html'){
+            $response = view($this->app->config->get('app.dispatch_error_tmpl'), $result);
+        } else if ($type == 'json') {
+            $response = json($result);
+        }
+        throw new HttpResponseException($response);
+    }
+
+
+    /**
+     * URL重定向  自带重定向无效
+     * @access protected
+     * @param  string         $url 跳转的URL表达式
+     * @param  array|integer  $params 其它URL参数
+     * @param  integer        $code http code
+     * @param  array          $with 隐式传参
+     * @return void
+     */
+    protected function redirect($url, $params = [], $code = 302, $with = [])
+    {
+        $response = Response::create($url, 'redirect');
+
+        if (is_integer($params)) {
+            $code   = $params;
+            $params = [];
+        }
+
+        $response->code($code)->with($params);
+
+        throw new HttpResponseException($response);
+    }
+
+    /**
+     * 获取当前的response 输出类型
+     * @access protected
+     * @return string
+     */
+    protected function getResponseType()
+    {
+        return $this->request->isJson() || $this->request->isAjax() ? 'json' : 'html';
+    }
+
+
+}

+ 68 - 0
php/app/ExceptionHandle.php

@@ -0,0 +1,68 @@
+<?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 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);
+    }
+}

+ 17 - 0
php/app/Request.php

@@ -0,0 +1,17 @@
+<?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 app;
+
+class Request extends \think\Request
+{
+
+}

+ 77 - 0
php/app/admin/controller/Adminlog.php

@@ -0,0 +1,77 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+use app\common\controller\Backend;
+use think\facade\Config;
+use think\facade\Request;
+use app\admin\model\AdminLog as LogModel;
+use think\facade\View;
+class Adminlog extends Backend {
+
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+    /**
+     * @return array|string
+     * @throws \think\db\exception\DbException
+     */
+    public function index(){
+
+        if(Request::isPost()){
+            $keys=Request::post('keys','','trim');
+            $page = Request::post('page')?Request::post('page'):1;
+            $list = LogModel::where('status',1)
+               ->where('username|log_title','like','%'.$keys.'%')
+               ->order('id desc')
+               ->paginate(array('list_rows'=> $this->pageSize,'page'=>$page))
+               ->toArray();
+            if(!empty($list['data'])){
+                foreach ($list['data'] as $k => $v) {
+                    $useragent = explode('(', $v['log_agent']);
+                    $list['data'][$k]['log_agent'] = $useragent[0];
+                }
+            }
+            $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$list['data'],'count'=>$list['total']];
+            return $result;
+        }
+
+        return View::fetch();
+    }
+
+    /**
+     * @throws \Exception
+     * 删除日志 单个+批量
+     */
+    public function delete(){
+        $id = Request::post('id');
+        if(!$id){
+            $this->error(lang('id is not exist'));
+
+        }
+        if(!is_array($id)){
+            $id = [$id];
+        }
+
+        if(LogModel::destroy($id)){
+            $this->success(lang('delete success'));
+        }else{
+            $this->error(lang('delete fail'));
+        }
+
+
+
+    }
+
+}

+ 255 - 0
php/app/admin/controller/Adv.php

@@ -0,0 +1,255 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+use app\common\model\AdvPosition;
+use think\facade\Db;
+use think\facade\Request;
+use think\facade\View;
+use app\common\model\Adv as AdvModel;
+class Adv extends Backend {
+
+    public function initialize(){
+        parent::initialize();
+    }
+    /*-----------------------广告管理----------------------*/
+    // 广告列表
+    public function index()
+    {
+        if(Request::isPost()){
+            $keys = Request::post('keys','','trim');
+            $page = Request::post('page') ? Request::post('page') : 1;
+            $list=Db::name('adv')->alias('a')
+                ->join('adv_position ap','a.pid = ap.id','left')
+                ->field('a.*,ap.position_name,ap.position_desc')
+                ->where('a.ad_name','like','%'.$keys.'%')
+                ->order('a.sort desc,a.id desc')
+                ->paginate(['list_rows' => $this->pageSize, 'page' => $page])
+                ->toArray();
+            return $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$list['data'],'count'=>$list['total']];
+        }
+
+        return View::fetch();
+    }
+
+    // 广告添加
+    public function add()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            try{
+                $this->validate($data, 'Adv');
+            }catch (\Exception $e){
+                $this->error($e->getMessage());
+            }
+            if($data['time']){
+                $time = explode(' - ',$data['time']);
+                $data['start_time'] = strtotime($time[0]);
+                $data['end_time'] = strtotime($time[1]);
+            }else{
+                $data['start_time'] = '';
+                $data['end_time'] = '';
+            }
+
+            //添加
+            $result = AdvModel::create($data);
+            if ($result) {
+                $this->success(lang('add success'), url('index'));
+            } else {
+                $this->error(lang('add fail'));
+            }
+        } else {
+            $info = '';
+            $posGroup = AdvPosition::where('status', 1)->select();
+            $view = [
+                'info'  =>$info,
+                'posGroup' => $posGroup,
+                'title' => lang('add'),
+            ];
+            View::assign($view);
+            return View::fetch();
+        }
+    }
+    /**
+     * 广告修改
+     */
+    public function edit()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            try{
+                $this->validate($data, 'Adv');
+            }catch (\Exception $e){
+                $this->error($e->getMessage());
+            }
+            AdvModel::update($data);
+            $this->success(lang('edit success'), url('index'));
+
+        } else {
+            $id = Request::param('id');
+            if ($id) {
+                $posGroup = AdvPosition::where('status', 1)->select();
+                $info = AdvModel::find($id);
+                $info['time'] = date('Y-m-d',$info['start_time']).' - '.date('Y-m-d',$info['end_time']);
+                $view = [
+                    'info' => $info,
+                    'posGroup' => $posGroup,
+                    'title' => '编辑',
+                ];
+                View::assign($view);
+                return View::fetch('add');
+            }
+        }
+    }
+
+
+    // 广告删除
+    public function delete()
+    {
+        $id = Request::post('id');
+        AdvModel::destroy($id);
+        $this->success(lang('delete success'));
+
+    }
+
+
+
+    // 广告状态修改
+    public function state()
+    {
+        if (Request::isPost()) {
+            $id = Request::post('id');
+            if (empty($id)) {
+                $this->error('id'.lang('not exist'));
+            }
+            $adv = AdvModel::find($id);
+            $status = $adv['status'] == 1 ? 0 : 1;
+            $adv->status = $status;
+            $adv->save();
+            $this->success(lang('edit success'));
+        }
+    }
+
+
+    /*-----------------------广告位置管理----------------------*/
+
+    // 广告位置管理
+    public function pos()
+    {
+        if(Request::isPost()){
+            //条件筛选
+            $keys = Request::param('keys');
+
+            //查出所有数据
+            $list = AdvPosition::where('position_name','like','%'.$keys.'%')
+                ->order('id desc')
+                ->paginate(
+                    $this->pageSize, false,
+                    ['query' => Request::param()]
+                )->toArray();
+            return $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$list['data'],'count'=>$list['total']];
+
+        }
+
+
+        return View::fetch();
+
+    }
+
+
+
+    // 广告位置添加
+    public function posAdd()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            try {
+                $this->validate($data, 'AdvPosition');
+            } catch (\Exception $e) {
+                $this->error($e->getMessage());
+            }
+            $result = AdvPosition::create($data);
+            if ($result) {
+                $this->success(lang('add  success'), url('pos'));
+            } else {
+                $this->error(lang('add fail'));
+            }
+
+        } else {
+            $view = [
+                'info' => null,
+                'title' => lang('add')
+            ];
+            View::assign($view);
+            return View::fetch('pos_add');
+        }
+    }
+
+    // 广告位置修改
+    public function posEdit()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+
+            try{
+                $this->validate($data, 'AdvPosition');
+            }catch (\Exception $e){
+                $this->error($e->getMessage());
+            }
+            $where['id'] = $data['id'];
+            $res = AdvPosition::update($data, $where);
+            if($res){
+
+                $this->success(lang('edit success'), url('pos'));
+            }else{
+                $this->error(lang('edit fail'));
+
+            }
+
+        } else {
+            $id = Request::param('id');
+            $info = AdvPosition::find(['id' => $id]);
+            $view = [
+                'info' => $info,
+                'title' => lang('edit')
+            ];
+            View::assign($view);
+            return View::fetch('pos_add');
+        }
+    }
+
+    // 广告位置状态修改
+    public function posState()
+    {
+        if (Request::isPost()) {
+            $id = Request::param('id');
+            $info = AdvPosition::find($id);
+            $info->status = $info['status'] == 1 ? 0 : 1;
+            $info->save();
+            $this->success(lang('edit success'));
+
+        }
+    }
+    // 广告位置删除
+    public function posDel()
+    {
+        $id = Request::post('id');
+
+        AdvPosition::destroy($id);
+        $this->success(lang('delete success'));
+
+
+    }
+
+   }

+ 247 - 0
php/app/admin/controller/Article.php

@@ -0,0 +1,247 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/26
+ */
+namespace app\admin\controller;
+use app\common\controller\Backend;
+use app\common\model\ArticleCate;
+use think\facade\Db;
+use think\facade\Lang;
+use think\facade\Request;
+use think\facade\View;
+use lemo\helper\TreeHelper;
+class Article extends  Backend {
+
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+    public function index(){
+
+        if(Request::isPost()){
+            $keys = Request::post('keys','','trim');
+            $page = Request::post('page') ? Request::post('page') : 1;
+            $list = Db::name('article')->alias('a')
+                ->join('article_cate ac','a.pid = ac.id','left')
+                ->field('a.*,ac.title as cate_name')
+                ->where('a.title|a.content','like','%'.$keys.'%')
+                ->order('a.sort desc,a.id desc')
+                ->paginate(['list_rows' => $this->pageSize, 'page' => $page])
+                ->toArray();
+            return $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$list['data'],'count'=>$list['total']];
+
+        }
+        return View::fetch();
+
+    }
+
+    public function add(){
+        if(Request::isPost()) {
+            $data = Request::post();
+            $res = \app\common\model\Article::create($data);
+            if ($res) {
+                $this->success(lang('add success'));
+            } else {
+                $this->error(lang('add fail'));
+
+            }
+        }else{
+
+            $ArticleCate = ArticleCate::where('status',1)->select()->toArray();
+            $ArticleCate= TreeHelper::cateTree($ArticleCate);
+            $params['name'] = 'container';
+            $params['content'] = '';
+            $view = [
+                'info' => '',
+                'ArticleCate' => $ArticleCate,
+                'title' => lang('add'),
+                'ueditor'=>build_ueditor($params),
+            ];
+            View::assign($view);
+            return View::fetch('add');
+        }
+    }
+
+    public function edit()
+    {
+        if(Request::isPost()){
+            $data = Request::post();
+            if(!$data['id']){
+                $this->error(lang('invalid data'));
+            }
+
+            $res = \app\common\model\Article::update($data);
+            if($res){
+                $this->success(lang('edit success'));
+            }else{
+                $this->error(lang('edit fail'));
+
+            }
+        }else{
+            $id =  Request::get('id');
+            $ArticleCate = ArticleCate::where('status',1)->select()->toArray();
+            $ArticleCate= TreeHelper::cateTree($ArticleCate);
+
+            $info = \app\common\model\Article::find($id);
+            $params['name'] = 'container';
+            $params['content'] = $info['content'];
+            $view = [
+                'info' => $info,
+                'ArticleCate' => $ArticleCate,
+                'title' => lang('edit'),
+                'ueditor'=>build_ueditor($params),
+            ];
+            View::assign($view);
+            return View::fetch('add');
+        }
+
+
+    }
+
+    public function state()
+    {
+        $id = Request::post('id');
+        if (empty($id)) {
+            $this->error('data not exist');
+        }
+        $info = \app\common\model\Article::find($id);
+        $status = $info['status'] == 1 ? 0 : 1;
+        $info->status = $status;
+        $info->save();
+        $this->success(lang('edit success'));
+
+    }
+    public function delete(){
+
+        if(Request::isPost()){
+
+            $id = Request::post('id');
+            \app\common\model\Article::destroy($id);
+            $this->success('delete success');
+        }
+
+    }
+
+    public function articleCate(){
+        if(Request::isPost()){
+            $keys = Request::post('keys','','trim');
+            $page = Request::post('page') ? Request::post('page') : 1;
+            $list= cache('articleCate');
+            if(!$list) {
+                $list = Db::name('article_cate')
+                    ->where('title','like','%'.$keys.'%')
+                    ->paginate(['list_rows' => $this->pageSize, 'page' => $page])
+                    ->toArray();
+                foreach($list['data'] as $k=>$v){
+                    $list['data'][$k]['lay_is_open']=false;
+                }
+                cache('articleCate', $list, 3600);
+            }
+
+
+            return $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$list['data'],'count'=>$list['total']];
+
+        }
+        return View::fetch();
+    }
+
+    public function cateAdd(){
+        if(Request::isPost()) {
+            $data = Request::post();
+            $res = \app\common\model\ArticleCate::create($data);
+            if ($res) {
+                $this->success(lang('add success'));
+            } else {
+                $this->error(lang('add fail'));
+
+            }
+        }else{
+
+            $ArticleCate = ArticleCate::where('status',1)->select()->toArray();
+            $ArticleCate= TreeHelper::cateTree($ArticleCate);
+
+            $view = [
+                'info' => '',
+                'ArticleCate' => $ArticleCate,
+                'title' =>lang('add'),
+            ];
+            View::assign($view);
+            return View::fetch('cate_add');
+        }
+
+    }
+    public function cateEdit(){
+        if(Request::isPost()){
+            $data = Request::post();
+            if(!$data['id']){
+                $this->error(lang('invalid data'));
+            }
+
+            $res = \app\common\model\ArticleCate::update($data);
+            if($res){
+                $this->success(lang('edit success'));
+            }else{
+                $this->error(lang('edit fail'));
+
+            }
+        }else{
+            $id =  Request::get('id');
+            $ArticleCate = ArticleCate::where('status',1)->select()->toArray();
+            $ArticleCate= TreeHelper::cateTree($ArticleCate);
+
+            $info = \app\common\model\ArticleCate::find($id);
+
+            $view = [
+                'info' => $info,
+                'ArticleCate' => $ArticleCate,
+                'title' => lang('edit'),
+            ];
+            View::assign($view);
+            return View::fetch('cate_add');
+        }
+
+
+    }
+
+    public function cateState(){
+        $data =  Request::post();
+        $id = Request::post('id');
+        if (empty($id)) {
+            $this->error(lang('data not exist'));
+        }
+        $info  = \app\common\model\ArticleCate::find($id);
+        $status = $info['status'] == 1 ? 0 : 1;
+        $info->status = $status;
+        $info->save();
+        $this->success(lang('edit success'));
+
+    }
+    public function cateDel(){
+
+        if(Request::isPost()){
+
+            $id = Request::post('id');
+            $child = \app\common\model\ArticleCate::where('pid',$id)->find();
+            if($child){
+                $this->error(lang('delete child first'));
+            }
+            if(\app\common\model\ArticleCate::destroy($id)){
+                $this->success(lang('delete success'));
+            }else{
+                $this->error(lang('delete fail'));
+            }
+        }
+
+    }
+
+
+}

+ 552 - 0
php/app/admin/controller/Auth.php

@@ -0,0 +1,552 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+
+use app\admin\model\AuthGroup;
+use app\admin\model\AuthRule;
+use app\admin\model\Admin;
+use app\common\controller\Backend;
+use lemo\helper\SignHelper;
+use lemo\helper\StringHelper;
+use lemo\helper\TreeHelper;
+use think\facade\Cache;
+use think\facade\Config;
+use think\facade\Db;
+use think\facade\Request;
+use think\facade\Session;
+use think\facade\View;
+
+class Auth extends Backend
+{
+    public $uid = '';
+    public function initialize()
+    {
+        $this->uid = Session::get('admin.id');
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+    /*-----------------------管理员管理----------------------*/
+    // 管理员列表
+    public function adminList()
+    {
+        if(Request::isPost()){
+            $where=Request::post();
+            $map=[];
+            $map1=[];
+            $map2=[];
+            if(isset($where['keys'])) {
+                $map = [
+                    ['a.username', 'like', "%" . $where['keys'] . "%"],
+
+                ];
+                $map1 = [
+                    ['a.email', 'like', "%" . $where['keys'] . "%"],
+
+                ];
+                $map2= [
+                    ['a.mobile', 'like', "%" . $where['keys'] . "%"],
+                ];
+            }
+
+            $page=input("page")?:1;
+            $limit=input("limit")?:10;
+            $list=Db::name('admin')->order("id desc")->alias('a')
+                ->join('auth_group ag','a.group_id = ag.id','left')
+                ->field('a.*,ag.title')
+                ->whereOr($map,$map1,$map2)
+                ->paginate(['list_rows' =>$limit, 'page' => $page])->toArray();
+//                ->select();
+//            var_dump($list);
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+//            return $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$list];
+        }
+
+        return View::fetch();
+    }
+
+    // 管理员添加
+    public function adminAdd()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            try{
+                $this->validate($data, 'Admin');
+            }catch (\Exception $e){
+                $this->error($e->getMessage());
+            }
+            $data['password'] = StringHelper::filterWords($data['password']);
+            if(!$data['password']){
+                $data['password']='123456';
+            }
+            $data['password'] = password_hash($data['password'],PASSWORD_BCRYPT, SignHelper::passwordSalt());
+            //添加
+            $result = Admin::create($data);
+            if ($result) {
+                $this->success(lang('add success'), url('adminList'));
+            } else {
+                $this->error(lang('add fail'));
+            }
+        } else {
+            $info = '';
+            $auth_group = AuthGroup::where('status', 1)->select();
+            $view = [
+                'info'  =>$info,
+                'authGroup' => $auth_group,
+                'title' => lang('add'),
+            ];
+            View::assign($view);
+            return View::fetch();
+        }
+    }
+
+    // 管理员删除
+    public function adminDel()
+    {
+        $id = Request::post('id');
+        if ($id > 1) {
+            Admin::destroy($id);
+            $this->success(lang('delete success'));
+        } else {
+            $this->error(lang('supper man cannot delete'));
+
+        }
+    }
+
+
+
+    // 管理员状态修改
+    public function adminState()
+    {
+        if (Request::isPost()) {
+            $id = Request::post('id');
+            if (empty($id)) {
+                $this->error('id'.lang('not exist'));
+            }
+            if ($id == 1) {
+                $this->error(lang('supper man cannot edit state'));
+            }
+//            if($this->uid==3){
+//                $this->error(lang('test data cannot edit'));
+//
+//            }
+
+            $admin = Admin::find($id);
+            $status = $admin['status'] == 1 ? 0 : 1;
+            $admin->status = $status;
+            $admin->save();
+            $this->success(lang('edit success'));
+        }
+    }
+
+    /**
+     * 管理员修改
+     */
+    public function adminEdit()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            if(!$data['username']) $this->error(lang('username').lang('cannot null'));
+//            if(!$data['password'])
+            if(!$data['group_id']) $this->error(lang('adminGroup').lang('cannot null'));
+            $admin = Admin::find($data['id']);
+
+//            if(password_verify($data['password'],$admin['password'])){
+//                unset($data['password']);
+//
+//            }else{
+//                $data['password'] = Request::post('password', '123456', 'lemo\helper\StringHelper::filterWords');
+//                $data['password'] = password_hash($data['password'],PASSWORD_BCRYPT, SignHelper::passwordSalt());
+//            }
+
+            if ($data["password"]){
+                $data['password'] = password_hash($data['password'],PASSWORD_BCRYPT, SignHelper::passwordSalt());
+            }else{
+                unset($data['password']);
+            }
+
+            Admin::update($data);
+
+//            if($this->uid==$data['id']){
+//                Session::set('admin',null);
+//            }
+
+            $this->success(lang('edit success'), url('Auth/adminList'));
+
+        } else {
+            $id = Request::param('id')?Request::param('id'):$this->uid;
+            if ($id) {
+                $auth_group = AuthGroup::select();
+                $admin = Admin::field("id,group_id,username,mobile")->find($id);
+                $view = [
+                    'info' => $admin,
+                    'authGroup' => $auth_group,
+                    'title' => lang('edit'),
+                ];
+                View::assign($view);
+                return View::fetch('admin_add');
+            }
+        }
+    }
+
+    /********************************权限管理*******************************/
+    // 权限列表
+    public function adminRule()
+    {
+        if(Request::isPost()){
+            $uid = $this->uid;
+
+            $arr = Db::name('auth_rule')
+                ->where("status","<>",0)
+                ->order('pid asc,sort asc')
+                ->select()->toArray();
+            foreach($arr as $k=>$v){
+                $arr[$k]['lay_is_open']=false;
+            }
+            cache('authRuleList_'.$uid, $arr, 3600);
+
+            return $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$arr,'is'=>true,'tip'=>'操作成功'];
+        }
+        return View::fetch('admin_rule');
+    }
+
+    // 权限菜单显示或者隐藏
+    public function ruleState()
+    {
+        if (Request::isPost()) {
+            $id = Request::param('id');
+            $info = AuthRule::find($id);
+            $info->menu_status = $info['menu_status'] == 1 ? 0 : 1;
+            $info->save();
+            $this->success(lang('edit success'));
+
+        }
+    }
+
+    // 设置权限是否验证
+    public function ruleOpen()
+    {
+        if (Request::isPost()) {
+            $id = Request::param('id');
+            $info = AuthRule::find($id);
+            $info->auth_open = $info['auth_open'] == 1 ? 0 : 1;
+            $info->save();
+            $this->success(lang('edit success'));
+        }
+    }
+
+    // 设置权限排序
+    public function ruleSort()
+    {
+        if (Request::isPost()) {
+            $id = Request::param('id');
+            $sort = Request::param('sort');
+            $info = AuthRule::find($id);
+            $info->sort = $sort;
+            $info->save();
+            $this->success(lang('edit success'));
+        }
+    }
+
+    // 权限删除
+    public function ruleDel()
+    {
+        $id = Request::param('id');
+        $child = AuthRule::where('pid',$id)->find();
+        if ($id && !$child) {
+            AuthRule::destroy($id);
+            $this->success(lang('delete success'));
+        }elseif($child){
+            $this->error(lang('delete child first'));
+
+        }else{
+            $this->error('id'.lang('not exist'));
+        }
+    }
+
+    // 权限批量删除
+    public function ruleSelectDel()
+    {
+        $ids = Request::param('ids');
+        if ($ids) {
+
+            AuthRule::destroy($ids);
+            $this->success(lang('delete success'));
+        }
+
+    }
+
+    // 权限增加
+    public function ruleAdd()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            if (empty($data['title'])) {
+                $this->error(lang('rule name cannot null'));
+            }
+            if (empty($data['sort'])) {
+                $this->error(lang('sort').lang(' cannot null'));
+            }
+            $data['icon'] = $data['icon']?$data['icon']:'fa fa-adjust';
+            if (AuthRule::create($data)) {
+                $this->success(lang('add success'), url('adminRule'));
+            } else {
+                $this->error(lang('add fail'));
+            }
+        } else {
+            $list = Db::name('auth_rule')
+                ->order('sort ASC')
+                ->select();
+            $list = TreeHelper::cateTree($list);
+            $pid = Request::param('id') ? Request::param('id') : 0;
+            $rule = '';
+            if(Request::get('rule_id')){
+                $rule = Db::name('auth_rule')
+                    ->find(Request::get('rule_id'));
+            }
+
+            $view = [
+                'info' => null,
+                'pid' => $pid,
+                'ruleList' => $list,
+                'rule' =>$rule,
+            ];
+
+            View::assign($view);
+            return View::fetch('rule_add');
+        }
+    }
+
+    //权限修改
+    public function ruleEdit()
+    {
+        if (request()->isPost()) {
+            $data = Request::param();
+            $data['icon'] = $data['icon']?$data['icon']:'fa fa-adjust';
+            $where['id'] = $data['id'];
+            AuthRule::update($data);
+            $this->success(lang('edit success'), url('Auth/adminRule'));
+        } else {
+            $list = Db::name('auth_rule')
+                ->order('sort asc')
+                ->select();
+            $list = TreeHelper::cateTree($list);
+            $id = Request::param('id');
+            $info = AuthRule::find($id)->toArray();
+            $rule = '';
+            if(Request::get('rule_id')){
+                $rule = Db::name('auth_rule')
+                    ->find(Request::get('rule_id'));
+            }
+            $view = [
+                'info' => $info,
+                'ruleList' => $list,
+                'rule' => $rule,
+            ];
+            View::assign($view);
+            return View::fetch('rule_add');
+        }
+    }
+
+
+    /*-----------------------用户组管理----------------------*/
+
+    // 用户组管理
+    public function group()
+    {
+        if(Request::isPost()){
+            //条件筛选
+            $title = Request::param('title');
+            //全局查询条件
+            $where = [];
+            if ($title) {
+                $where[] = ['title', 'like', '%' . $title . '%'];
+            }
+            //显示数量
+            $pageSize = Request::param('page_size', Config::get('app.page_size'));
+
+            //查出所有数据
+            $list = AuthGroup::where($where)
+                ->paginate(
+                    $this->pageSize, false,
+                    ['query' => Request::param()]
+                )->toArray();
+            return $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$list['data']];
+        }
+        return View::fetch();
+    }
+
+    // 用户组删除
+    public function groupDel()
+    {
+        $id = Request::post('id');
+        if ($id > 1) {
+            AuthGroup::destroy($id);
+            $this->success(lang('delete success'));
+        } else {
+            $this->error(lang('supper man cannot delete'));
+        }
+
+    }
+
+    // 用户组添加
+    public function groupAdd()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            try {
+                $this->validate($data, 'AuthGroup');
+            } catch (\Exception $e) {
+                $this->error($e->getMessage());
+            }
+            $result = AuthGroup::create($data);
+            if ($result) {
+                $this->success(lang('add success'), 'Auth/adminGroup');
+            } else {
+                $this->error(lang('add fail'));
+            }
+
+        } else {
+            $view = [
+                'info' => null
+            ];
+            View::assign($view);
+            return View::fetch('group_add');
+        }
+    }
+
+    // 用户组修改
+    public function groupEdit()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            if($data['id']==1){
+                $this->error(lang('supper man cannot edit'));
+            }
+            try{
+                $this->validate($data, 'AuthGroup');
+            }catch (\Exception $e){
+                $this->error($e->getMessage());
+            }
+            $where['id'] = $data['id'];
+            $res = AuthGroup::update($data, $where);
+            if($res){
+
+                $this->success(lang('edit success'), url('group'));
+            }else{
+                $this->error(lang('edit fail'));
+
+            }
+
+        } else {
+            $id = Request::param('id');
+            $info = AuthGroup::find(['id' => $id]);
+            $view = [
+                'info' => $info,
+                'title' => lang('edit')
+            ];
+            View::assign($view);
+            return View::fetch();
+        }
+    }
+
+    // 用户组状态修改
+    public function groupState()
+    {
+        if (Request::isPost()) {
+            $id = Request::param('id');
+            $info = AuthGroup::find($id);
+            $info->status = $info['status'] == 1 ? 0 : 1;
+//            if($this->uid==3){
+//                $this->error(lang('test data cannot edit'));
+//            }
+            $info->save();
+            $this->success(lang('edit success'));
+
+        }
+    }
+
+    // 用户组批量删除
+    public function groupSelectDel()
+    {
+        $id = Request::post('id');
+        if ($id > 1) {
+            AuthGroup::destroy($id);
+            $this->success(lang('delete success'));
+        } else {
+            $this->error(lang('delete fail'));
+        }
+    }
+
+    // 用户组显示权限
+    public function groupAccess()
+    {
+//        Cache::set('AuthChecked',"");
+        $id= Request::param('id');
+//        $list = Cache::get('AuthChecked'.$id);
+//        if(!$list){
+            $admin_rule = AuthRule::field('id, pid, title')
+                ->where('status',1)
+//                ->order('sort asc')->cache(3600)
+                ->order('sort asc')
+//                ->order('sort asc')
+                ->select()->toArray();
+            $rules = AuthGroup::where('id', Request::param('id'))
+//                ->where('status',1)->cache(3600)
+                ->where('status',1)
+//                ->where('status',1)
+                ->value('rules');
+            $list = TreeHelper::authChecked($admin_rule, $pid = 0, $rules);
+//            Cache::set('AuthChecked'.$id,$list,3600);
+//            Cache::set('AuthChecked',$list);
+
+//        }
+        $group_id = Request::param('id');
+        $idList = AuthRule::column('id');
+        sort($idList);
+        $view = [
+            'list' => $list,
+            'idList' => $idList,
+            'group_id' => $group_id,
+        ];
+        View::assign($view);
+        return View::fetch('group_access');
+    }
+    // 用户组保存权限
+    public function groupSetaccess()
+    {
+        $rules = Request::post('rules');
+        if (empty($rules)) {
+            $this->error(lang('please choose rule'));
+        }
+        $data = Request::post();
+        $rules = TreeHelper::authNormal($rules);
+        $rls = '';
+        foreach ($rules as $k=>$v){
+            $rls.=$v['id'].',';
+        }
+        $where['id'] = $data['group_id'];
+        $where['rules'] = $rls;
+
+        if (AuthGroup::update($where)) {
+            $admin = Session::get('admin');
+            $admin['rules'] = $rls;
+            Session::set('admin', $admin);
+
+            $this->success(lang('rule assign success'),url('group'));
+        } else {
+            $this->error(lang('rule assign fail'));
+        }
+    }
+
+
+
+}

+ 455 - 0
php/app/admin/controller/Backup.php

@@ -0,0 +1,455 @@
+<?php
+// +----------------------------------------------------------------------
+// | Author: tp5er <tp5er@qq.com>
+// | QQ Group: 368683534
+// +----------------------------------------------------------------------
+namespace app\admin\controller;
+use think\facade\Db;
+use think\facade\Config;
+class Backup
+{
+    /**
+     * 文件指针
+     * @var resource
+     */
+    private $fp;
+    /**
+     * 备份文件信息 part - 卷号,name - 文件名
+     * @var array
+     */
+    private $file;
+    /**
+     * 当前打开文件大小
+     * @var integer
+     */
+    private $size = 0;
+
+    /**
+     * 数据库配置
+     * @var integer
+     */
+    private $dbconfig = array();
+    /**
+     * 备份配置
+     * @var integer
+     */
+    private $config = array(
+        'path' => './Data/',
+        //数据库备份路径
+        'part' => 20971520,
+        //数据库备份卷大小
+        'compress' => 0,
+        //数据库备份文件是否启用压缩 0不压缩 1 压缩
+        'level' => 9,
+    );
+    /**
+     * 数据库备份构造方法
+     * @param array  $file   备份或还原的文件信息
+     * @param array  $config 备份配置信息
+     */
+    public function __construct($config = [])
+    {
+        $this->config = array_merge($this->config, $config);
+        //初始化文件名
+        $this->setFile();
+        //初始化数据库连接参数
+        $this->setDbConn();
+        //检查文件是否可写
+        if (!$this->checkPath($this->config['path'])) {
+            throw new \Exception("The current directory is not writable");
+        }
+    }
+    /**
+     * 设置脚本运行超时时间
+     * 0表示不限制,支持连贯操作
+     */
+    public function setTimeout($time=null)
+    {
+        if (!is_null($time)) {
+            set_time_limit($time)||ini_set("max_execution_time", $time);
+        }
+        return $this;
+    }
+    /**
+     * 设置数据库连接必备参数
+     * @param array  $dbconfig   数据库连接配置信息
+     * @return object
+     */
+    public function setDbConn($dbconfig = [])
+    {
+        if (empty($dbconfig)) {
+            $this->dbconfig = config('database');
+            //$this->dbconfig = Config::get('database');
+        } else {
+            $this->dbconfig = $dbconfig;
+        }
+        return $this;
+    }
+    /**
+     * 设置备份文件名
+     * @param Array  $file  文件名字
+     * @return object
+     */
+    public function setFile($file = null)
+    {
+        if (is_null($file)) {
+            $this->file = ['name' => date('Ymd-His'), 'part' => 1];
+        } else {
+            if (!array_key_exists("name", $file) && !array_key_exists("part", $file)) {
+                $this->file = $file['1'];
+            } else {
+                $this->file = $file;
+            }
+        }
+        return $this;
+    }
+    //数据类连接
+    public static function connect()
+    {
+        return \think\facade\Db::connect();
+    }
+    //数据库表列表
+    public function dataList($table = null,$type=1)
+    {
+        $db = self::connect();
+        if (is_null($table)) {
+            $list = $db->query("SHOW TABLE STATUS");
+        } else {
+            if ($type) {
+                $list = $db->query("SHOW FULL COLUMNS FROM {$table}");
+            }else{
+                $list = $db->query("show columns from {$table}");
+            }
+        }
+        return array_map('array_change_key_case', $list);
+        //$list;
+    }
+    //数据库备份文件列表
+    public function fileList()
+    {
+        if (!is_dir($this->config['path'])) {
+            mkdir($this->config['path'], 0755, true);
+        }
+        $path = realpath($this->config['path']);
+        $flag = \FilesystemIterator::KEY_AS_FILENAME;
+        $glob = new \FilesystemIterator($path, $flag);
+        $list = array();
+        foreach ($glob as $name => $file) {
+            if (preg_match('/^\\d{8,8}-\\d{6,6}-\\d+\\.sql(?:\\.gz)?$/', $name)) {
+                $name = sscanf($name, '%4s%2s%2s-%2s%2s%2s-%d');
+                $date = "{$name[0]}-{$name[1]}-{$name[2]}";
+                $time = "{$name[3]}:{$name[4]}:{$name[5]}";
+                $part = $name[6];
+                if (isset($list["{$date} {$time}"])) {
+                    $info = $list["{$date} {$time}"];
+                    $info['part'] = max($info['part'], $part);
+                    $info['size'] = $info['size'] + $file->getSize();
+                } else {
+                    $info['part'] = $part;
+                    $info['size'] = $file->getSize();
+                }
+                $extension = strtoupper(pathinfo($file->getFilename(), PATHINFO_EXTENSION));
+                $info['compress'] = $extension === 'SQL' ? '-' : $extension;
+                $info['name'] = $file->getFilename();
+                $info['time'] = strtotime("{$date} {$time}");
+                $list["{$date} {$time}"] = $info;
+            }
+        }
+        return $list;
+    }
+    public function getFile($type = '', $time = 0)
+    {
+        //
+        if (!is_numeric($time)) {
+            throw new \Exception("{$time} Illegal data type");
+        }
+        switch ($type) {
+            case 'time':
+                $name = date('Ymd-His', $time) . '-*.sql*';
+                $path = realpath($this->config['path']) . DIRECTORY_SEPARATOR . $name;
+                return glob($path);
+                break;
+            case 'timeverif':
+                $name = date('Ymd-His', $time) . '-*.sql*';
+                $path = realpath($this->config['path']) . DIRECTORY_SEPARATOR . $name;
+                $files = glob($path);
+                $list = array();
+                foreach ($files as $name) {
+                    $basename = basename($name);
+                    $match = sscanf($basename, '%4s%2s%2s-%2s%2s%2s-%d');
+                    $gz = preg_match('/^\\d{8,8}-\\d{6,6}-\\d+\\.sql.gz$/', $basename);
+                    $list[$match[6]] = array($match[6], $name, $gz);
+                }
+                $last = end($list);
+                if (count($list) === $last[0]) {
+                    return $list;
+                } else {
+                    throw new \Exception("File {$files['0']} may be damaged, please check again");
+                }
+                break;
+            case 'pathname':
+                return "{$this->config['path']}{$this->file['name']}-{$this->file['part']}.sql";
+                break;
+            case 'filename':
+                return "{$this->file['name']}-{$this->file['part']}.sql";
+                break;
+            case 'filepath':
+                return $this->config['path'];
+                break;
+            default:
+                $arr = array('pathname' => "{$this->config['path']}{$this->file['name']}-{$this->file['part']}.sql", 'filename' => "{$this->file['name']}-{$this->file['part']}.sql", 'filepath' => $this->config['path'], 'file' => $this->file);
+                return $arr;
+        }
+    }
+    //删除备份文件
+    public function delFile($time)
+    {
+        if ($time) {
+            $file = $this->getFile('time', $time);
+            array_map("unlink", $this->getFile('time', $time));
+            if (count($this->getFile('time', $time))) {
+                throw new \Exception("File {$path} deleted failed");
+            } else {
+                return $time;
+            }
+        } else {
+            throw new \Exception("{$time} Time parameter is incorrect");
+        }
+    }
+    /**
+     * 下载备份
+     * @Author: 浪哥 <939881475@qq.com>
+     * @param string $time
+     * @param integer $part
+     * @return array|mixed|string
+     */
+    public function downloadFile($time, $part = 0)
+    {
+        $file = $this->getFile('time', $time);
+        $fileName = $file[$part];
+        if (file_exists($fileName)) {
+            ob_end_clean();
+            header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
+            header('Content-Description: File Transfer');
+            header('Content-Type: application/octet-stream');
+            header('Content-Length: ' . filesize($fileName));
+            header('Content-Disposition: attachment; filename=' . basename($fileName));
+            readfile($fileName);
+        } else {
+            throw new \Exception("{$time} File is abnormal");
+        }
+    }
+    public function import($start)
+    {
+        //还原数据
+        $db = self::connect();
+        if ($this->config['compress']) {
+            $gz = gzopen($this->file[1], 'r');
+            $size = 0;
+        } else {
+            $size = filesize($this->file[1]);
+            $gz = fopen($this->file[1], 'r');
+        }
+        $sql = '';
+        if ($start) {
+            $this->config['compress'] ? gzseek($gz, $start) : fseek($gz, $start);
+        }
+        for ($i = 0; $i < 1000; $i++) {
+            $sql .= $this->config['compress'] ? gzgets($gz) : fgets($gz);
+            if (preg_match('/.*;$/', trim($sql))) {
+                if (false !== $db->execute($sql)) {
+                    $start += strlen($sql);
+                } else {
+                    return false;
+                }
+                $sql = '';
+            } elseif ($this->config['compress'] ? gzeof($gz) : feof($gz)) {
+                return 0;
+            }
+        }
+        return array($start, $size);
+    }
+    /**
+     * 写入初始数据
+     * @return boolean true - 写入成功,false - 写入失败
+     */
+    public function Backup_Init()
+    {
+        $sql = "-- -----------------------------\n";
+        $sql .= "-- Think MySQL Data Transfer \n";
+        $sql .= "-- \n";
+        $sql .= "-- Host     : " . $this->dbconfig['hostname'] . "\n";
+        $sql .= "-- Port     : " . $this->dbconfig['hostport'] . "\n";
+        $sql .= "-- Database : " . $this->dbconfig['database'] . "\n";
+        $sql .= "-- \n";
+        $sql .= "-- Part : #{$this->file['part']}\n";
+        $sql .= "-- Date : " . date("Y-m-d H:i:s") . "\n";
+        $sql .= "-- -----------------------------\n\n";
+        $sql .= "SET FOREIGN_KEY_CHECKS = 0;\n\n";
+        return $this->write($sql);
+    }
+    /**
+     * 备份表结构
+     * @param  string  $table 表名
+     * @param  integer $start 起始行数
+     * @return boolean        false - 备份失败
+     */
+    public function backup($table, $start)
+    {
+        $db = self::connect();
+        // 备份表结构
+        if (0 == $start) {
+            $result = $db->query("SHOW CREATE TABLE `{$table}`");
+            $sql = "\n";
+            $sql .= "-- -----------------------------\n";
+            $sql .= "-- Table structure for `{$table}`\n";
+            $sql .= "-- -----------------------------\n";
+            $sql .= "DROP TABLE IF EXISTS `{$table}`;\n";
+            $sql .= trim($result[0]['Create Table']) . ";\n\n";
+            if (false === $this->write($sql)) {
+                return false;
+            }
+        }
+        //数据总数
+        $result = $db->query("SELECT COUNT(*) AS count FROM `{$table}`");
+        $count = $result['0']['count'];
+        //备份表数据
+        if ($count) {
+            //写入数据注释
+            if (0 == $start) {
+                $sql = "-- -----------------------------\n";
+                $sql .= "-- Records of `{$table}`\n";
+                $sql .= "-- -----------------------------\n";
+                $this->write($sql);
+            }
+            //备份数据记录
+            $result = $db->query("SELECT * FROM `{$table}` LIMIT {$start}, 1000");
+            foreach ($result as $row) {
+                $row = array_map('addslashes', $row);
+                $sql = "INSERT INTO `{$table}` VALUES ('" . str_replace(array("\r", "\n"), array('\\r', '\\n'), implode("', '", $row)) . "');\n";
+                if (false === $this->write($sql)) {
+                    return false;
+                }
+            }
+            //还有更多数据
+            if ($count > $start + 1000) {
+                //return array($start + 1000, $count);
+                return $this->backup($table, $start + 1000);
+            }
+        }
+        //备份下一表
+        return 0;
+    }
+    /**
+     * 优化表
+     * @param  String $tables 表名
+     * @return String $tables
+     */
+    public function optimize($tables = null)
+    {
+        if ($tables) {
+            $db = self::connect();
+            if (is_array($tables)) {
+                $tables = implode('`,`', $tables);
+                $list = $db->query("OPTIMIZE TABLE `{$tables}`");
+            } else {
+                $list = $db->query("OPTIMIZE TABLE `{$tables}`");
+            }
+            if ($list) {
+                return $tables;
+            } else {
+                throw new \Exception("data sheet'{$tables}'Repair mistakes please try again!");
+            }
+        } else {
+            throw new \Exception("Please specify the table to be repaired!");
+        }
+    }
+    /**
+     * 修复表
+     * @param  String $tables 表名
+     * @return String $tables
+     */
+    public function repair($tables = null)
+    {
+        if ($tables) {
+            $db = self::connect();
+            if (is_array($tables)) {
+                $tables = implode('`,`', $tables);
+                $list = $db->query("REPAIR TABLE `{$tables}`");
+            } else {
+                $list = $db->query("REPAIR TABLE `{$tables}`");
+            }
+            if ($list) {
+                return $list;
+            } else {
+                throw new \Exception("data sheet'{$tables}'Repair mistakes please try again!");
+            }
+        } else {
+            throw new \Exception("Please specify the table to be repaired!");
+        }
+    }
+    /**
+     * 写入SQL语句
+     * @param  string $sql 要写入的SQL语句
+     * @return boolean     true - 写入成功,false - 写入失败!
+     */
+    private function write($sql)
+    {
+        $size = strlen($sql);
+        //由于压缩原因,无法计算出压缩后的长度,这里假设压缩率为50%,
+        //一般情况压缩率都会高于50%;
+        $size = $this->config['compress'] ? $size / 2 : $size;
+        $this->open($size);
+        return $this->config['compress'] ? @gzwrite($this->fp, $sql) : @fwrite($this->fp, $sql);
+    }
+    /**
+     * 打开一个卷,用于写入数据
+     * @param  integer $size 写入数据的大小
+     */
+    private function open($size)
+    {
+        if ($this->fp) {
+            $this->size += $size;
+            if ($this->size > $this->config['part']) {
+                $this->config['compress'] ? @gzclose($this->fp) : @fclose($this->fp);
+                $this->fp = null;
+                $this->file['part']++;
+                session('backup_file', $this->file);
+                $this->Backup_Init();
+            }
+        } else {
+            $backuppath = $this->config['path'];
+            $filename = "{$backuppath}{$this->file['name']}-{$this->file['part']}.sql";
+            if ($this->config['compress']) {
+                $filename = "{$filename}.gz";
+                $this->fp = @gzopen($filename, "a{$this->config['level']}");
+            } else {
+                $this->fp = @fopen($filename, 'a');
+            }
+            $this->size = filesize($filename) + $size;
+        }
+    }
+    /**
+     * 检查目录是否可写
+     * @param  string   $path    目录
+     * @return boolean
+     */
+    protected function checkPath($path)
+    {
+        if (is_dir($path)) {
+            return true;
+        }
+        if (mkdir($path, 0755, true)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+    /**
+     * 析构方法,用于关闭文件资源
+     */
+    public function __destruct()
+    {
+        $this->config['compress'] ? @gzclose($this->fp) : @fclose($this->fp);
+    }
+}

+ 150 - 0
php/app/admin/controller/Contents.php

@@ -0,0 +1,150 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\admin\controller;
+
+
+use app\common\controller\Backend;
+use think\facade\Db;
+use think\facade\Request;
+use think\facade\View;
+
+class Contents extends Backend
+{
+    // todo 内容管理
+
+    //轮播图
+    public function index()
+    {
+        if (Request::isPost()){
+
+            $page=input("page")?:1;
+            $limit=input("limit")?:10;
+
+
+            $url="http://".$_SERVER['HTTP_HOST'];
+            $list=Db::name("banner")->order("id desc")->paginate(['list_rows' => $limit, 'page' => $page])->each(function ($item) use (&$url){
+
+                $item["url"]=$url;
+                return $item;
+            })->toArray();
+            return  $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data']?:[], 'count' => $list['total']?:0];
+        }
+
+        return View::fetch();
+    }
+
+// 添加轮播图
+    public function addbanner()
+    {
+        $name=input("text");
+        $img=input("img")?:"";
+        $id=input("id");
+
+        $add["text"]=$name;
+        $add["img"]=$img;
+//        $add["centos"]=$centos;
+
+        if ($id){
+            $where["id"]=$id;
+            $res=Db::name("banner")->where($where)->update($add);
+        }else{
+            $res=Db::name("banner")->insert($add);
+        }
+
+
+        if ($res){
+            json_result(1,"添加成功");
+        }
+        json_result(2,"添加失败");
+
+
+    }
+
+    public function add()
+    {
+
+        $id=input("id");
+        $info=[];
+        if ($id){
+            $where["id"]=$id;
+            $info=Db::name("banner")->where($where)->find();
+        }else{
+            $info["text"]='';
+            $info["img"]='';
+        }
+
+        $view = [
+            'info' => $info,
+            'title' => lang('add'),
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+// 删除轮播图
+    public function del_banner()
+    {
+        $id=input("id");
+        $where["id"]=$id;
+        Db::name("banner")->where($where)->delete();
+        json_result(1,"删除成功");
+
+    }
+//
+//关于我们
+    public function about()
+    {
+        if (Request::isPost()){
+            $centos=input("text");
+            $add["text"]=$centos;
+                $ehere["id"]=1;
+                Db::name("about")->where($ehere)->update($add);
+
+            json_result(1,"修改成功");
+        }
+        $data=Db::name("about")->where(["id"=>1])->value("text");
+//        var_dump(date("Y-m-d",time()));
+
+
+        $view = [
+            'info' => $data,
+            'title' => lang('add'),
+        ];
+        View::assign($view);
+       return View::fetch();
+
+
+    }
+
+    //
+    //意见反馈
+    public function feedback()
+    {
+
+        if (Request::isPost()){
+            $name=input("name");
+            $page=input("page")?:1;
+            $limit=input("limit")?:10;
+            $where=[];
+            if ($name){
+                $where["name"]=["like","% $name %"];
+            }
+            $list=Db::name("feedback")->order("id desc")->where($where)->paginate(["list_row"=>$limit,"page"=>$page])->each(function ($item){
+                if ($item["create_time"]){
+//                    var_dump($item["create_time"]);
+//                    $date=date('Y-m-s h:i:s',$item["create_time"]);
+//                    $item["create_time"]=$date;
+                }
+                return $item;
+
+            })->toArray();
+            return  $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data']?:[], 'count' => $list['total']?:0];
+
+        }
+
+
+        return View::fetch();
+
+
+    }
+}

+ 330 - 0
php/app/admin/controller/Curriculum.php

@@ -0,0 +1,330 @@
+<?php
+//declare (strict_types = 1);
+
+namespace app\admin\controller;
+
+use app\admin\model\Video;
+use app\common\controller\Backend;
+
+use think\facade\Db;
+use think\facade\Request;
+use think\facade\Session;
+use think\facade\View;
+use Ramsey\Uuid\Uuid;
+
+class Curriculum extends Backend
+{
+    // todo 课程管理
+
+    // 上传的课程
+    public function index()
+    {
+//        Uuid::uuid1();
+    }
+
+    // 我发布的课程
+    public function my()
+    {
+        if (Request::isPost()) {
+            $page = input("page") ?: 1;
+            $name = input("name", '', 'trim');
+//            $admin = is_admin();
+            $where = [];
+//            if ($admin) {
+//                $where["c.subject_id"] = $admin;
+//            }
+            if ($name) {
+                $where["c.grade|s.name|su.name"] = $name;
+            }
+
+            if ( $this->quanxian==1){
+                $where["c.creater_id"]=$this->adminid;
+            }
+            if ($this->project){
+                $where["c.major_id"]=$this->project;
+            }
+            $list = Db::name("course")
+                ->alias("c")
+                ->order("c.id desc")
+                ->leftJoin("subject s", "c.major_id=s.id")
+                ->leftJoin("subject su", "c.subject_id=su.id")
+                ->where($where)
+                ->field("c.*,s.name major,su.name subject")
+                ->paginate(['list_rows' => $this->pageSize, 'page' => $page])
+                ->each(function ($item) {
+                    if ($item["create_time"]) {
+                        $item["create_time"] = date('Y-m-d H:i:s', $item["create_time"]);
+                    }
+                    return $item;
+                })
+                ->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+        return View::fetch();
+    }
+
+// 删除课程
+    public function del_course()
+    {
+        $id = input("id");
+        $course = Db::name("course")->where(["id" => $id])->delete();
+        if ($course) {
+            json_result(1, "操作成功");
+        }
+        json_result(2, "操作失败");
+
+    }
+
+// 添加或者修改课程
+    public function add()
+    {
+        if (Request::isPost()) {
+            $id = input("id");
+            $add["major_id"] = input("major_id") ?: json_result(2, "请选择专业");
+            $add["subject_id"] = input("subject_id") ?: json_result(2, "请选科目");
+//            $add["founder"]=
+            $add["person"] = input("person") ?: json_result(2, "请填写加入学习计划人数");
+            $add["image"] = input("image") ?: json_result(2, "请选封面");
+            $add["teachers"] = input("teachers") ?: json_result(2, "请选任课教师");
+            $add["content"] = input("content") ?: json_result(2, "请选科目简介");
+            $add["grade"] = input("grade") ?: json_result(2, "请选年级");
+//            $add["name"] = input("name") ?: json_result(2, "请选课程名");
+            $add["class_id"] = input("class_id") ?: json_result(2, "请选课程");
+
+
+
+            $add["update_time"] = time();
+
+            $name=Db::name("subject")->where(["id"=>$add["subject_id"]])->find();
+            $add["name"] =$name["name"];
+            if ($id) {
+
+                Db::name("course")->where(["id" => $id])->update($add);
+            } else {
+
+                $add["create_time"] = time();
+                $admin=Session::get("admin");
+                $add["founder"] = $admin["username"];
+
+                    $add["creater_id"]=$this->adminid;
+
+
+                Db::name("course")->insert($add);
+            }
+            json_result(1, "操作成功");
+        }
+
+        $id = input("id");
+        if ($id) {
+            $examination = Db::name("course")->where(["id" => $id])->find();
+            $examination["teachers"]=explode(",",$examination["teachers"]);
+        } else {
+            $examination = [];
+        }
+        $data["examination"] = $examination;
+        $whers["major_id"] = ["!=", 0];
+        $data["major"] = Db::name("subject")->where($whers)->select();
+        $data["laboratory"] = Db::name("laboratory")->where("status", "=", "0")->field("id,name,person")->select();
+        $data["user"] = Db::name("user")->where("type", "=", "2")->field("id,name")->select();
+//            dump($data);
+        View::assign("info", $data);
+        return View::fetch();
+    }
+
+    // 科目
+    public function subject_kemu()
+    {
+        $id = input("id");
+        if ($id) {
+            $where["major_id"] = $id;
+            $major = Db::name("subject")->where($where)->field("id,name")->select();
+            if ($major) {
+                json_result(1, "", $major);
+            } else {
+                json_result(2, "未添加科目");
+            }
+        } else {
+            json_result(2);
+        }
+    }
+
+    //课程材料表
+    public function materiallist()
+    {
+
+        if (Request::isPost()) {
+//            dump($course_id);die();
+            $course_id = input("course_id");
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $where["course_id"] = $course_id;
+            $list = Db::name("course_material")->where($where)->paginate(["list_rows" => $limit, "page" => $page])->each(function ($item){
+                $item["create_time"]=date("Y-m-d H:i:s",(int)$item["create_time"]);
+                return $item;
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+        $course_id = input("course_id");
+        View::assign("course_id", $course_id);
+        return View::fetch();
+
+    }
+
+
+    public function getini()
+    {
+//        ini_set("upload_max_filesize","1000M");//即允许上传文件大小的最大值
+//        ini_set("post_max_size","1001M");//指通过表单POST给PHP的所能接收的最大值
+//        ini_set("memory_limit","9M");//;每个PHP页面所吃掉的最大内存
+
+       $upload_max_filesize= ini_get("upload_max_filesize");
+       $post_max_size= ini_get("post_max_size");
+       $memory_limit= ini_get("memory_limit");
+
+        d($upload_max_filesize);
+        d($post_max_size);
+        d($memory_limit);
+    }
+    // 上传资料
+    public function addmaterial()
+    {
+
+        if (Request::isPost()) {
+            $course_id = input("course_id");
+            $id = input("id");
+            $add["name"] = input("name") ?: json_result(2, "请设置材料名称");
+            $add["url"] = input("url") ?: json_result(2, "请上传材料");
+            $add["update_time"] = time();
+
+            $filesize=0;
+            $filetype="";
+                if (is_file(Pah.$add["url"])){
+                    $filesizes=filesize(Pah.$add["url"]);
+                    $filesize = round($filesizes/1024/1024,2);
+                    $filetype=pathinfo(Pah.$add["url"])["extension"];
+                }
+            $add["size"]=$filesize;
+            $add["type"]=$filetype;
+
+            if ($id) {
+                Db::name("course_material")->where(["id" => $id])->update($add);
+            } else {
+                $add["create_time"] = time();
+                $add["course_id"] = $course_id;
+
+                Db::name("course_material")->insert($add);
+            }
+            json_result(1, "操作成功");
+        }
+
+        $id = input("id");
+        $course_id = input("course_id");
+        $data = Db::name("course_material")->where(["id" => $id])->find();
+        View::assign("info", $data);
+        View::assign("course_id", $course_id);
+
+        return View::fetch();
+
+
+    }
+
+    // 删除课程材料
+    public function del_material()
+    {
+        $id = input("id");
+        Db::name("course_material")->where(["id" => $id])->delete();
+        json_result(1, "删除成功");
+
+    }
+
+    //课程视频表
+    public function videolist()
+    {
+        if (Request::isPost()) {
+            $course_id = input("course_id");
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $where["course_id"] = $course_id;
+            $list = Db::name("course_video")->order("order desc")->where($where)->paginate(["list_rows" => $limit, "page" => $page])->each(function ($item){
+                $item["create_time"]=date("Y-m-d H:i:s",(int)$item["create_time"]);
+                return $item;
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+        $course_id = input("course_id");
+        View::assign("course_id", $course_id);
+        return View::fetch();
+    }
+
+    // 上传视频
+    public function addvideo()
+    {
+        if (Request::isPost()) {
+
+            $course_id = input("course_id");
+            $id = input("id");
+            $add["name"] = input("name") ?: json_result(2, "请设置视频名称");
+            $add["url"] = input("url") ?: json_result(2, "请上传视频");
+            $add["order"] = input("order") ?: json_result(2, "第几节课程");
+            $add["backimge"] = input("image") ?: json_result(2, "视频封面");
+            $add["update_time"] = time();
+                    if (!is_numeric($add["order"])||strpos($add["order"],".")!==false){
+                        json_result(2,"课程章节 只能是 整数");
+                    }
+
+            if ($add["url"]){
+                $filesize=0;
+                $filetype="";
+                $videotime=0;
+                if (is_file(Pah.$add["url"])){
+                    $filesizes=filesize(Pah.$add["url"]);
+                    $filesize = round($filesizes/1024/1024,2);
+                    $filetype=pathinfo(Pah.$add["url"])["extension"];
+                }
+                if (!$add["backimge"]){
+                    $video=Video::ffmpeg_getTime(Pah.$add["url"]);
+                    $add["backimge"]=$video["img"];
+                    $add["time"]=$video["seconds"];
+//                    dump($video);
+                }else{
+                    $video=Video::video_time(Pah.$add["url"]);
+                    $add["time"]=$video;
+//                    dump($video);
+                }
+
+
+                $add["size"]=$filesize;
+                $add["type"]=$filetype;
+                $add["time_long"]=$tim= gmdate("H:i:s", $add["time"]);;
+            }
+
+//        dump($add);return ;
+            if ($id) {
+                Db::name("course_video")->where(["id" => $id])->update($add);
+            } else {
+                $add["create_time"] = time();
+                $add["course_id"] = $course_id;
+
+                Db::name("course_video")->insert($add);
+            }
+            json_result(1, "操作成功");
+        }
+
+        $id = input("id");
+        $data = Db::name("course_video")->where(["id" => $id])->find();
+        View::assign("info", $data);
+        $course_id = input("course_id");
+        View::assign("course_id", $course_id);
+
+        return View::fetch();
+    }
+
+    // 删除视频
+    public function del_video()
+    {
+        $id = input("id");
+        Db::name("course_video")->where(["id" => $id])->delete();
+        json_result(1, "删除成功");
+
+    }
+}

+ 116 - 0
php/app/admin/controller/Database.php

@@ -0,0 +1,116 @@
+<?php
+
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+use app\common\controller\Backend;
+use lemo\helper\StringHelper;
+use think\facade\Request;
+use think\facade\View;
+use app\admin\controller\Backup;
+// 需要修改\tp5er\backup connect()
+//以及 $info['name'] = $file->getFilename();
+class Database extends Backend
+{
+    protected $db = '';
+    function initialize(){
+        parent::initialize();
+        $this->config=array(
+            'path'     => './Data/',//数据库备份路径
+            'part'     => 20971520,//数据库备份卷大小
+            'compress' => 0,//数据库备份文件是否启用压缩 0不压缩 1 压缩
+            'level'    => 9 //数据库备份文件压缩级别 1普通 4 一般  9最高
+        );
+        $this->db = new Backup($this->config);
+    }
+    public function index(){
+        if(Request::isPost()){
+            $list = $this->db->dataList();
+            $total = 0;
+            foreach ($list as $k => $v) {
+                $list[$k]['size'] = StringHelper::formatBytes($v['data_length']);
+                $total += $v['data_length'];
+            }
+
+            return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$list,'total'=>StringHelper::formatBytes($total),'tableNum'=>count($list),'rel'=>1];
+        }
+        return View::fetch();
+    }
+    //优化
+    public function optimize() {
+        $tables = Request::param('tables');
+        if (empty($tables)) {
+            $this->success(lang('please choose table')) ;
+        }
+        if($this->db->optimize($tables)){
+            $this->success(lang('optimize success')) ;
+        }else{
+            $this->error(lang('optimize fail'));
+        }
+    }
+    //修复
+    public function repair() {
+        $tables = Request::param('tables');
+        if (empty($tables)) {
+            $this->error(lang('please choose table'));
+        }
+        if($this->db->repair($tables)){
+            $this->success(lang('repair success')) ;
+        }else{
+            $this->error(lang('repair fail'));
+        }
+    }
+    //备份
+    public function backup(){
+        $tables = Request::param('tables');
+        if (!empty($tables)) {
+            foreach ($tables as $table) {
+                $this->db->setFile()->backup($table, 0);
+            }
+            $this->success(lang('backup success')) ;
+
+        } else {
+            $this->error(lang('please choose table')) ;
+
+        }
+    }
+    //备份列表
+    public function restore(){
+        if(Request::isPost()){
+            $list =  $this->db->fileList();
+            return $result = ['code'=>0,'msg'=>lang('get info success'),'data'=>$list,'rel'=>1];
+        }
+        return View::fetch();
+    }
+    //执行还原数据库操作
+    public function import($time) {
+        $list  = $this->db->getFile('timeverif',$time);
+        $this->db->setFile($list)->import(1);
+        $this->success('restore success') ;
+    }
+
+    //下载
+    public function downFile($time) {
+        $this->db->downloadFile($time);
+    }
+    //删除sql文件
+    public function delSqlFiles() {
+        $time = input('post.time');
+        if($this->db->delFile($time)){
+            $this->success(lang('delete success')) ;
+
+        }else{
+            $this->error(lang('delete fail')) ;
+
+        }
+    }
+}

+ 27 - 0
php/app/admin/controller/Error.php

@@ -0,0 +1,27 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+
+use app\BaseController;
+use app\common\controller\Base;
+use think\facade\View;
+
+class Error extends Base {
+
+    public function __call($method, $args)
+    {
+
+//            dump(1212);
+        return View::fetch('error/error');
+    }
+}

+ 393 - 0
php/app/admin/controller/Friendship.php

@@ -0,0 +1,393 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/5/28
+ * Time: 12:13
+ */
+
+namespace app\admin\controller;
+
+use app\common\controller\Aliyunoss;
+use think\facade\Db;
+use app\common\controller\Backend;
+use think\facade\Request;
+use think\facade\View;
+
+class Friendship extends Backend
+{
+    // 上传图片
+    public function upimage()
+    {
+//        $file = request()->file('image');
+        $file = $_FILES["file"];
+//        $file = $_FILES;
+
+//        dump($file);
+//        die();
+        if (!$file) json_result(400, '请上传图片', '');
+        $Aliyun = new Aliyunoss();
+
+        $aa = $Aliyun->uploadFile($file);
+        json_result(200, '发送成功', $aa);
+    }
+
+    // 主页
+    public function index()
+    {
+
+        // 查询友情链接数量
+        $links=Db::name("links")->count();
+        $banner=Db::name("banner")->count();
+        $user_count=Db::name("admin")->count();
+        // 查询浏览量
+        $liull=Db::name("browse")->where(["type"=>0])->count();
+        $liull_zt=Db::name("browse")->where(["type"=>0])->whereDay("add_time")->count();
+        $user=0;// 独立用户
+        $zhixing=0;// 最终咨询
+
+
+
+        $view = [
+            'info' => [
+                "liull"=>$liull,
+                "liull_zt"=>$liull_zt/($liull-$liull_zt)*100,
+                "user"=>$user,
+                "zhixing"=>$zhixing,
+                "links"=>$links,
+                "banner"=>$banner,
+                "admin"=>$user_count,
+            ],
+            'title' => lang('add'),
+//            'userLevel'=>$userLevel,
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+    // 友情链接列表
+    public function links()
+    {
+        if (Request::isPost()) {
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $name = input("name");
+            $where = [];
+            if ($name) {
+                $where["name"] = ["like", "%" . $name . "%"];
+            }
+            $list = Db::name("links")->where($where)->order("pai desc")->paginate(["list_rows" => $limit, "page" => $page])->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        } else {
+            return View::fetch();
+        }
+
+    }
+
+//添加或修改友情链接
+    public function add_links()
+    {
+        if (Request::isPost()) {
+            $id = input("id");
+            $name = input("name");
+            $url = input("url");
+
+            $add["name"] = $name;
+            $add["url"] = $url;
+            if ($id) {
+                Db::name("links")->where(["id" => $id])->update($add);
+            } else {
+                Db::name("links")->insert($add);
+            }
+            $this->success(lang('add success'), url('links'));
+            return;
+//            json_result(200,"操作成功");
+        }
+        $id = input("id");
+        $info = "";
+        if ($id) {
+            $info = Db::name("links")->where(["id" => $id])->find();
+        }
+        $view = [
+            'info' => $info,
+            'title' => lang('add'),
+//            'userLevel'=>$userLevel,
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+    // 修改状态
+    public function update_links()
+    {
+        $id = input("id");
+        $status = input("status") ?: 0;
+        Db::name("links")->where(["id" => $id])->update(["status" => $status]);
+        json_result(1, "设置成功");
+    }
+
+    // 修改排序
+    public function update_pai_links()
+    {
+        $id = input("id");
+        $value = input("value");
+        $field = input("field");
+        Db::name("links")->where(["id" => $id])->update([$field => $value]);
+        json_result(1, "设置成功");
+    }
+
+    //删除友情链接
+    public function del_links()
+    {
+        $id = input("id");
+        Db::name("links")->where(["id" => $id])->delete();
+        json_result(1, "删除成功");
+    }
+
+    // 导航管理列表
+    public function dh_list()
+    {
+        if (Request::isPost()) {
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $name = input("name");
+            $type = input("type");
+            $where = [];
+            if ($name) {
+                $where["name"] = ["like", "%" . $name . "%"];
+            }
+            if ($type) {
+                $where["type"] = $type;
+            }
+            $list = Db::name("dh")->where($where)->order("pai desc")->paginate(["list_rows" => $limit, "page" => $page])->each(function ($item){
+                if ($item["type"]==1){
+                    $item["type"]="商城系统";
+                }elseif ($item["type"]==2){
+                    $item["type"]="解决方案";
+                }else{
+                    $item["type"]="";
+                }
+
+                return $item;
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        } else {
+            return View::fetch();
+        }
+    }
+
+    // 修改数据
+    public function update_pai_dh()
+    {
+        $id = input("id");
+        $value = input("value");
+        $field = input("field");
+        Db::name("dh")->where(["id" => $id])->update([$field => $value]);
+        json_result(1, "设置成功");
+    }
+
+    // 修改导航栏状态
+    public function update_dh_status()
+    {
+        $id = input("id");
+        $status = input("status") ?: 0;
+        Db::name("dh")->where(["id" => $id])->update(["status" => $status]);
+        json_result(1, "设置成功");
+    }
+
+    // 删除导航
+    public function del_dh()
+    {
+        $id = input("id");
+        Db::name("dh")->where(["id" => $id])->delete();
+        json_result(1, "删除成功");
+    }
+
+    // 添加导航
+    public function add_dh()
+    {
+        if (Request::isPost()) {
+            $id = input("id");
+            $name = input("name");
+            $type = input("type");
+            $status = input("status");
+            $add["name"] = $name;
+            $add["type"] = $type;
+            $add["status"] = $status;
+            if ($id) {
+                Db::name("dh")->where(["id" => $id])->update($add);
+            } else {
+                Db::name("dh")->insert($add);
+            }
+            $this->success(lang('add success'), url('dh_list'));
+            return;
+//            json_result(200,"操作成功");
+        }
+        $id = input("id");
+        $info = "";
+        if ($id) {
+            $info = Db::name("dh")->where(["id" => $id])->find();
+        }
+        $view = [
+            'info' => $info,
+            'title' => lang('add'),
+//            'userLevel'=>$userLevel,
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+
+
+    // 轮播图列表
+    public function banner()
+    {
+        if (Request::isPost()) {
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $name = input("name");
+            $type = input("type");
+            $where = [];
+            if ($name) {
+                $where["name"] = ["like", "%" . $name . "%"];
+            }
+            if ($type) {
+                $where["type"] = $type;
+            }
+            $list = Db::name("banner")->where($where)->order("pai desc")->paginate(["list_rows" => $limit, "page" => $page])->each(function ($item){
+
+                return $item;
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        } else {
+            return View::fetch();
+        }
+    }
+
+
+    // 修改数据轮播图
+    public function update_pai_banner()
+    {
+        $id = input("id");
+        $value = input("value");
+        $field = input("field");
+        Db::name("banner")->where(["id" => $id])->update([$field => $value]);
+        json_result(1, "设置成功");
+    }
+
+    // 修改轮播图栏状态
+    public function update_banner_status()
+    {
+        $id = input("id");
+        $status = input("status") ?: 0;
+        Db::name("banner")->where(["id" => $id])->update(["status" => $status]);
+        json_result(1, "设置成功");
+    }
+    //添加或修改轮播图
+    public function add_banner()
+    {
+        if (Request::isPost()) {
+            $id = input("id");
+            $name = input("name");
+            $image = input("image");
+            $url = input("url");
+            $status = input("status");
+            $add["name"] = $name;
+            $add["image"] =$image;
+            $add["url"] =$url;
+            $add["status"] = $status;
+            if ($id) {
+                Db::name("banner")->where(["id" => $id])->update($add);
+            } else {
+                Db::name("banner")->insert($add);
+            }
+            $this->success(lang('add success'), url('banner'));
+            return;
+//            json_result(200,"操作成功");
+        }
+        $id = input("id");
+        $info = "";
+        if ($id) {
+            $info = Db::name("banner")->where(["id" => $id])->find();
+        }
+        $view = [
+            'info' => $info,
+            'title' => lang('add'),
+//            'userLevel'=>$userLevel,
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+    // 删除轮播图
+    public function del_banner()
+    {
+        $id = input("id");
+        Db::name("banner")->where(["id" => $id])->delete();
+        json_result(1, "删除成功");
+    }
+
+    // 统计数据
+    public function statistics()
+    {
+
+        if (Request::isPost()) {
+
+            $type=input("type")?:0;//0 日指标 1 浏览量 2 独立用户 3 最终咨询
+            $day=input("day");// 选中天数
+            $start_time=input("start_time");// 开始时间
+            $end_time=input("end_time");// 结束时间
+            $where=[];
+            $where[]=["type","=",$type];
+            if ($type==0){// 日指标
+                $list=Db::name("browse")->where($where)->whereDay('add_time')->field("add_time,FROM_UNIXTIME(add_time,'%H') as posttime,sum(num) as zong")->group('posttime')->select();
+               //  处理数据
+                $data=[];
+                foreach ($list as $k=>$v){
+                    $data["day"][$k]=$v["posttime"]."点";
+                    $data["data"][$k]=$v["zong"];
+                }
+                json_result(200,"日指标",$data);
+            }elseif ($type==1){// 浏览量
+
+                if ($day){
+                    $start_time=date("Y-m-d",time()).' 23:59:59';
+                    $end_time=date('Y-m-d',strtotime('-'.($day).' days')).' 23:59:59';;
+                }
+                $start_time=strtotime($start_time);
+                $end_time=strtotime($end_time);
+                $list=Db::name("browse")->where(["type"=>0])->where("add_time",">",$end_time)->where("add_time","<",$start_time)->where(["type"=>0])->field("add_time,FROM_UNIXTIME(add_time,'%Y-%m-%d') as posttime,sum(num) as zong")->group('posttime')->select();
+//                json_result($start_time,$end_time,$list);
+                $data=[];
+                foreach ($list as $k=>$v){
+                    $data["day"][$k]=date("m.d",strtotime($v["posttime"]));
+                    $data["data"][$k]=$v["zong"];
+                }
+                json_result(200,"浏览量",$data);
+            }
+
+            $data["data"]=[];
+            $data["day"]=[];
+            json_result(200,"浏览量22",$data);
+
+        }
+
+        // 查询浏览量
+        $liull=Db::name("browse")->where(["type"=>0])->count();
+        $liull_zt=Db::name("browse")->where(["type"=>0])->whereDay("add_time")->count();
+        $user=0;// 独立用户
+        $zhixing=0;// 最终咨询
+        $view = [
+            'info' => [
+                "liull"=>$liull,
+                "liull_zt"=>$liull_zt/($liull-$liull_zt)*100,
+                "user"=>$user,
+                "zhixing"=>$zhixing,
+            ],
+            'title' => lang('add'),
+//            'userLevel'=>$userLevel,
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+}

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

@@ -0,0 +1,89 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+use app\admin\model\AuthRule;
+use app\common\controller\Backend;
+use think\facade\View;
+use think\facade\Db;
+use think\facade\Cache;
+use think\facade\Session;
+
+class Index extends Backend{
+
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+
+    }
+
+    /**
+     * @return string
+     * @throws \Exception
+     * 首页
+     */
+    public function index(){
+        // 所有显示的菜单;
+        $admin_id = Session::get('admin.id');
+        $menus = Cache::get('adminMenus_'.$admin_id);
+        $menus = '';
+
+        if(!$menus){
+            $cate = AuthRule::where('menu_status',1)->order('sort asc')->select()->toArray();
+            $menus = Menu::authMenu($cate);
+            Cache::set('adminMenus_'.$admin_id,$menus,'3600');
+
+        }
+        $href = (string)url('main');
+        $home = ["href"=>$href,"icon"=>"fa fa-home","title"=>"首页"];
+        $menusinit =['menus'=>$menus,'home'=>$home];
+        View::assign('menus',json_encode($menusinit));
+        return View::fetch();
+
+    }
+
+    /**
+     * @return string
+     * @throws \think\db\exception\BindParamException
+     * @throws \think\db\exception\PDOException
+     * 主页面
+     */
+    public function main(){
+        $version = Db::query('SELECT VERSION() AS ver');
+        var_dump($version);die();
+        $config = Cache::get('main_config');
+        if(!$config){
+            $config  = [
+                'url'             => $_SERVER['HTTP_HOST'],
+                'document_root'   => $_SERVER['DOCUMENT_ROOT'],
+                'document_protocol'   => $_SERVER['SERVER_PROTOCOL'],
+                'server_os'       => PHP_OS,
+                'server_port'     => $_SERVER['SERVER_PORT'],
+                'server_ip'       => $_SERVER['REMOTE_ADDR'],
+                'server_soft'     => $_SERVER['SERVER_SOFTWARE'],
+                'server_file'     => $_SERVER['SCRIPT_FILENAME'],
+                'php_version'     => PHP_VERSION,
+                'mysql_version'   => $version[0]['ver'],
+                'max_upload_size' => ini_get('upload_max_filesize'),
+            ];
+            Cache::set('main_config',$config,3600);
+        }
+
+        View::assign('config', $config);
+
+
+        return View::fetch();
+    }
+
+
+
+}

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

@@ -0,0 +1,135 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+use app\admin\model\Admin;
+use app\admin\model\AuthGroup;
+use app\BaseController;
+use app\common\controller\Backend;
+use app\common\controller\Base;
+use lemo\helper\SignHelper;
+use think\facade\Session;
+use think\facade\View;
+use think\facade\Request;
+use think\captcha\facade\Captcha;
+
+class Login extends Base {
+    /*
+     * 登录
+     */
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+    public function index(){
+        if (!Request::isPost()) {
+            $admin= Session::get('admin');
+            $admin_sign= Session::get('admin_sign') == SignHelper::authSign($admin) ? $admin['id'] : 0;
+            // 签名验证
+            if ($admin && $admin_sign) {
+                
+                 redirect('index/index');
+            }
+
+            return View::fetch();
+
+        } else {
+
+            $username = Request::post('username', '', 'lemo\helper\StringHelper::filterWords');
+            $password = Request::post('password', '', 'lemo\helper\StringHelper::filterWords');
+            $captcha = Request::post('captcha', '', 'lemo\helper\StringHelper::filterWords');
+            $rememberMe = Request::post('rememberMe');
+            // 用户信息验证
+
+            try {
+                if(!captcha_check($captcha)){
+                    throw new \Exception(lang('captcha error'));
+                }
+                $res = self::checkLogin($username, $password,$rememberMe);
+            } catch (\Exception $e) {
+                 $this->error(lang('login fail').":{$e->getMessage()}");
+            }
+            $this->success(lang('login success').'...', '/admin/index');
+        }
+    }
+
+    /*
+     * 验证码
+     *
+     */
+    public function verify()
+    {
+
+        return Captcha::create();
+    }
+
+
+
+    /**
+     * 根据用户名密码,验证用户是否能成功登陆
+     * @param string $user
+     * @param string $pwd
+     * @throws \Exception
+     * @return mixed
+     */
+    public static function checkLogin($user, $password,$rememberMe) {
+
+        try{
+            $where['username'] = strip_tags(trim($user));
+            $password = strip_tags(trim($password));
+
+            $info = Admin::where($where)->find();
+//            if (!$info){
+//                $info = Admin::where($where)->find();
+//            }
+
+
+            if(!$info){
+                throw new \Exception(lang('please check username or password'));
+            }
+
+            if($info['status']==0){
+                throw new \Exception(lang('account is disabled'));
+            }
+            if(!password_verify($password,$info['password'])){
+
+                throw new \Exception(lang('please check username or password'));
+
+            }
+            if(!$info['group_id']){
+                $info['group_id'] = 1;
+            }
+            Session::set('quanxian', $info["project_status"]);
+            Session::set('adminid', $info["id"]);
+            Session::set('project', $info["project"]);
+            $rules = AuthGroup::where('id',$info['group_id'])
+                ->value('rules');
+            $info['rules'] = $rules  ;
+            if(!$info['username']){
+                $info['username'] = $info['username'];
+            }
+            unset($info['password']);
+            if($rememberMe){
+                Session::set('admin', $info,7*24*3600);
+                Session::set('admin_sign',  SignHelper::authSign($info),7*24*3600);
+            }else{
+                Session::set('admin', $info);
+                Session::set('admin_sign',  SignHelper::authSign($info));
+            }
+
+        }catch (\Exception $e) {
+            throw new \Exception($e->getMessage());
+        }
+
+        return true;
+    }
+}

+ 110 - 0
php/app/admin/controller/Menu.php

@@ -0,0 +1,110 @@
+<?php
+
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+
+use app\admin\controller\Base;
+use app\admin\model\AuthRule;
+use app\common\controller\Backend;
+use think\facade\Db;
+use think\facade\Request;
+class Menu extends Backend
+{
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+    //获取左侧主菜单
+    public static function authMenu($arr,$pid=0,$rules=[]){
+        $authrules = explode(',',session('admin.rules'));
+        $list =array();
+        foreach ($arr as $k=>$v){
+            $v['href'] = strtolower(url($v['href']));
+            if (session('admin.id') != 1) {
+                if ($v['pid'] == $pid){
+                    if(in_array($v['id'],$authrules)){
+                        $v['child'] = self::authMenu($arr,$v['id']);
+                        $list[] = $v;
+                    }
+                }
+            }else{
+                if ($v['pid'] == $pid) {
+                    $v['child'] = self::authMenu($arr, $v['id']);
+                    $list[] = $v;
+                }
+            }
+
+        }
+
+        return $list;
+
+    }
+
+    /*
+    * 自定义菜单排列
+    */
+    public static function menu($cate, $lefthtml = '|— ', $pid = 0, $lvl = 0, $leftpin = 0)
+    {
+        $arr = array();
+        foreach ($cate as $v) {
+            if ($v['pid'] == $pid) {
+                $v['lvl'] = $lvl + 1;
+                $v['leftpin'] = $leftpin + 0;
+                $v['lefthtml'] = str_repeat($lefthtml, $lvl);
+                $v['ltitle'] = $v['lefthtml'] . $v['title'];
+                $arr[] = $v;
+                $arr = array_merge($arr, self::menu($cate, $lefthtml, $v['id'], $lvl + 1, $leftpin + 20));
+            }
+        }
+
+        return $arr;
+    }
+
+   public  static  function cate($cate, $lefthtml = '|— ', $pid = 0, $lvl = 0, $leftpin = 0)
+    {
+        $arr = array();
+        foreach ($cate as $v) {
+            if ($v['pid'] == $pid) {
+                $v['lvl'] = $lvl + 1;
+                $v['leftpin'] = $leftpin + 0;
+                $v['lefthtml'] = str_repeat($lefthtml, $lvl);
+                $arr[] = $v;
+                $arr = array_merge($arr, self::menu($cate, $lefthtml, $v['id'], $lvl + 1, $leftpin + 20));
+            }
+        }
+
+        return $arr;
+    }
+
+   public  static  function auth($cate, $rules, $pid = 0)
+    {
+        $arr = array();
+        $rulesArr = explode(',', $rules);
+        foreach ($cate as $v) {
+            if ($v['pid'] == $pid) {
+                if (in_array($v['id'], $rulesArr)) {
+                    $v['checked'] = true;
+                }
+                $v['open'] = true;
+                $arr[] = $v;
+                $arr = array_merge($arr, self::auth($cate, $v['id'], $rules));
+            }
+        }
+        return $arr;
+    }
+
+
+
+
+}

+ 167 - 0
php/app/admin/controller/Site.php

@@ -0,0 +1,167 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\admin\controller;
+
+
+use app\common\controller\Backend;
+use lemo\helper\TreeHelper;
+use think\facade\Cache;
+use think\facade\Db;
+use think\facade\Request;
+use think\facade\View;
+use app\common\model\Laboratory;
+
+class Site  extends Backend
+{
+    // todo 场地管理
+
+    // 场地列表
+    public function index()
+    {
+
+        if (Request::isPost()){
+            $page=input("page")?:1;
+            $limit=input("limit")?:10;
+            $name=input("name", '', 'trim');
+            $list=Db::name("laboratory")->order("id desc")
+                ->where("name","like","%".$name."%")
+                ->paginate(['list_rows' => $limit, 'page' => $page])->each(function ($item){
+                    $subject_id="";
+                    if ($item["subject_id"]){
+//                        $where["id"]=["in",$item];
+                        $resul=Db::name("subject")->whereIn("id",$item["subject_id"])->column("name");
+                        foreach ($resul as $v){
+                            if ($subject_id){
+                                $subject_id.="/".$v;
+                            }else{
+                                $subject_id=$v;
+                            }
+                        }
+                    }
+                    $item["subject_id"]=$subject_id;
+                    return $item;
+                })
+                ->toArray();
+
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+        return View::fetch();
+
+    }
+
+    public function text()
+    {
+        $name=input("name");
+//        $list=Db::name("laboratory")->alias("la")->order("id desc")
+//            ->leftJoin("subject su","su.id= in subject_id")
+////            ->where("la.name","like","%".$name."%")
+//            ->paginate(['list_rows' => 10, 'page' => 1])
+//            ->filed("la.* ,su.name")
+////            ->each(function ($item){
+////                $subject_id="";
+////                if ($item["subject_id"]){
+//////                        $where["id"]=["in",$item];
+////                    $resul=Db::name("subject")->whereIn("id",$item["subject_id"])->column("name");
+////                    foreach ($resul as $v){
+////                        if ($subject_id){
+////                            $subject_id.="/".$v;
+////                        }else{
+////                            $subject_id=$v;
+////                        }
+////                    }
+////                }
+////                $item["subject_id"]=$subject_id;
+////                return $item;
+////            })
+//            ->toArray();
+
+
+        $list=Laboratory::with("subject")->where("name","like","%".$name."%")->order("id desc")->paginate(['list_rows' => 10, 'page' => 1]);
+//        $sub=$list->subject;
+
+        json_result(1,"",$list);
+}
+
+
+
+
+    // 修改状态
+    public function updata_status()
+    {
+        $id=input("id");
+        $where["id"]=$id;
+        $result=Db::name("laboratory")->where($where)->find();
+        if ($result["status"]==1){
+            $update["status"]=0;
+        }else{
+            $update["status"]=1;
+        }
+        $res=Db::name("laboratory")->where($where)->update($update);
+        if ($res){
+
+            json_result(1,"修改成功");
+        }
+        json_result(2,"修改失败");
+    }
+
+
+    // 科目
+    public function sitetree()
+    {
+//        $list = Cache::get('SiteTree');
+        $id=input("id");
+//        if (!$list){
+            $subject=Db::name("subject")->field("id,major_id,name")->order("major_id asc")->cache(3600)->select()->toArray();
+            foreach ($subject as $k=>$v){
+                $subject[$k]["title"]=$v["name"];
+                $subject[$k]["pid"]=$v["major_id"];
+            }
+            $where["id"]=$id;
+            $laboratory=Db::name("laboratory")->where($where)->value("subject_id");
+            $list=TreeHelper::authChecked($subject,0,$laboratory);
+//            Cache::set('SiteTree',$list,3600);
+//        }
+        $idList=Db::name("subject")->column("id");
+        sort($idList);
+        $view = [
+            'list' => $list,
+            'idList' => $idList,
+            'group_id' => $id,
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+
+    public function urlk()
+    {
+        $list = Cache::get('SiteTree');
+        json_result(1,"",$list);
+    }
+
+    // 修改权限
+    public function teacher()
+    {
+        $rules = Request::post('rules');
+        if (empty($rules)) {
+            json_result(2,"请选择");
+        }
+        $data = Request::post();
+        $rules = TreeHelper::authNormal($rules);
+        $rls = '';
+        foreach ($rules as $k=>$v){
+            if ($rls){
+                $rls.=",".$v['id'];
+            }else{
+                $rls.=$v['id'];
+            }
+        }
+        $where['id'] = $data['group_id'];
+        Db::name("laboratory")->where($where)->update(["subject_id"=>$rls]);
+
+        json_result(1,"操作成功");
+
+    }
+
+}

+ 219 - 0
php/app/admin/controller/System.php

@@ -0,0 +1,219 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+use app\common\controller\Backend;
+use app\common\model\Config as ConfigModel;
+use app\common\model\ConfigGroup as ConfigGroupModel;
+use app\common\model\FieldType;
+use think\facade\Request;
+use think\facade\Db;
+use think\facade\View;
+class System extends Backend {
+
+    public $rules = [
+        ['name'=>'email','title'=>'邮件'],
+        ['name'=>'url','title'=>'网址'],
+        ['name'=>'number','title'=>'有效的数值'],
+        ['name'=>'ip','title'=>'IP'],
+        ['name'=>'date','title'=>'日期'],
+        ['name'=>'phone','title'=>'手机号'],
+        ['name'=>'qq','title'=>'QQ'],
+        ['name'=>'identity','title'=>'身份证号'],
+
+    ];
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+    public function index(){
+        $group =  ['site','email','upload','sms'];
+
+        $list = Db::name('config')
+            ->where('type','in',$group)
+            ->field('code,value')
+            ->column('value','code');
+
+        View::assign('config',json_encode($list));
+        return View::fetch();
+
+    }
+    //配置设置
+    public function site()
+    {
+        if (Request::isPost()) {
+            $data = Request::post();
+            foreach ($data as $k=>$v){
+               $res =  Db::name('config')->where('code',$k)->update(['value'=>$v]);
+            }
+
+            $this->success('save success');
+
+
+        } else {
+            $this->error('invalid options');
+        }
+    }
+//    配置列表
+    public function configlist(){
+
+        if (Request::isPost()) {
+            $keys = Request::post('keys', '', 'trim');
+            $page = Request::post('page') ? Request::post('page') : 1;
+            $list = Db::name('config')
+                ->where('code', 'like', '%' . $keys . '%')
+                ->paginate(['list_rows' => $this->pageSize, 'page' => $page])
+                ->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+
+        return View::fetch();
+
+    }
+    //添加配置
+    public function configAdd(){
+        if(Request::isPost()){
+            $data = Request::post();
+            $info = ConfigModel::where('code',$data['code'])->find();
+            if($info){
+                $this->error(lang('field already exist'));
+
+            }else{
+                if(ConfigModel::create($data)){
+                    $this->success(lang('edit success'));
+                }else{
+                    $this->error(lang('edit fail'));
+                }
+            }
+
+
+        }
+        $info = '';
+        $configGroup = Db::name('config_group')->select();
+        $fieldType = FieldType::select();
+
+        $view = ['title'=>lang('add'),'info'=>$info,'configGroup'=>$configGroup,'fieldType'=>$fieldType,'rules'=>$this->rules];
+        View::assign($view);
+
+        return View::fetch('add');
+    }
+//    编辑配置
+    public function configEdit(){
+        $id = Request::param('id');
+        if(Request::isPost()){
+            $info = ConfigModel::find($id);
+            $data = Request::post();
+            if($info->update($data)){
+                $this->success(lang('edit success'));
+            }else{
+                $this->error(lang('edit fail'));
+            }
+        }
+        $configGroup = Db::name('config_group')->select();
+        $info = ConfigModel::find($id);
+        $fieldType = FieldType::select();
+
+        $view = ['title'=>lang('edit'),'info'=>$info,'configGroup'=>$configGroup,'fieldType'=>$fieldType,'rules'=>$this->rules];
+        View::assign($view);
+        return View::fetch('add');
+    }
+//    删除配置
+    public function configDel(){
+        if (Request::isPost()) {
+            $id = Request::post('id');
+            if(ConfigModel::destroy($id))
+            {
+                $this->success('delete success');
+            }   else{
+
+                $this->error('delete fail');
+            }
+
+        } else {
+            $this->error('invalid options');
+        }
+
+    }
+//    配置状态
+    public function configState(){
+        $id = Request::post('id');
+
+        if (empty($id)) {
+            $this->error('data not exist');
+        }
+        $info = ConfigModel::find($id);
+        $status = $info['status'] == 1 ? 0 : 1;
+        $info->status = $status;
+        $info->save();
+        $this->success(lang('edit success'));
+    }
+
+    public function configGroup(){
+        $keys = Request::post('keys', '', 'trim');
+        $page = Request::post('page') ? Request::post('page') : 1;
+        $list = Db::name('config_group')
+            ->where('name', 'like', '%' . $keys . '%')
+            ->select();
+        $info =$list;
+        $view = ['title'=>lang('config group'),'info'=>$info];
+        View::assign($view);
+        return View::fetch();
+
+
+    }
+//    配置分组
+    public function configGroupAdd(){
+        if(Request::isPost()){
+            $data = Request::post();
+            $info = ConfigGroupModel::where('name',$data['name'])->find();
+            if($info){
+                $this->error(lang('field already exist'));
+
+            }else {
+                if (ConfigGroupModel::create($data)) {
+                    $this->success(lang('edit success'));
+                } else {
+                    $this->error(lang('edit fail'));
+                }
+            }
+
+        }
+        $view = ['title'=>lang('config group'),'info'=>''];
+        View::assign($view);
+        return View::fetch('groupadd');
+
+    }
+
+    public function configGroupDel(){
+        $id = Request::post('id');
+        $info = ConfigGroupModel::find($id);
+        if(!$info){
+            $this->error(lang('id is not exist'));
+        }
+        $config = ConfigModel::where('type',$info->name)->find();
+        if($config){
+            $this->error(lang('group has config').lang('delete fail'));
+
+        }
+        if( ConfigGroupModel::destroy($id)){
+
+            $this->success(lang('delete success'));
+        }else{
+            $this->error(lang('delete fail'));
+
+        }
+
+    }
+
+//
+}

+ 166 - 0
php/app/admin/controller/Training.php

@@ -0,0 +1,166 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\admin\controller;
+
+use app\admin\model\MajorLevel;
+use app\admin\model\Ztrees;
+use app\common\controller\Backend;
+use think\facade\Db;
+use think\facade\Request;
+use think\facade\View;
+
+class Training  extends Backend
+{
+    // todo 培养计划
+
+    //专业管理
+    public function index()
+    {
+
+        if (Request::isPost()){
+            $page=input("page")?:1;
+            $name=input("name", '', 'trim');
+            $where["major_id"]=0;
+            $list=Db::name("subject")->order("id desc")->where($where)
+                ->where("name","like","%".$name."%")
+                ->paginate(['list_rows' => $this->pageSize, 'page' => $page])->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+        return View::fetch();
+
+
+
+    }
+
+    // 添加
+    public function add_major()
+    {
+
+        $name=input("name");
+        $pid=input("pid")?:0;
+        $update["name"]=$name;
+        $update["major_id"]=$pid;
+        $result=Db::name("subject")->insertGetId($update);
+        if ($result){
+            if ($pid==0){// 添加升级等级
+                MajorLevel::add_level($result);
+            }
+            $update["id"]=$result;
+            $update["pId"]=$pid;
+            json_result(1,"添加成功",$update);
+        }
+        json_result(2,"添加失败");
+
+        }
+
+    // 修改
+    public function update_major()
+    {
+        $id=input("id");
+        $name=input("name");
+        $where["id"]=$id;
+        $update["name"]=$name;
+        $result=Db::name("subject")->where($where)->update($update);
+        if ($result){
+            json_result(1,"修改成功");
+        }
+        json_result(2,"修改失败");
+    }
+
+    // 删除
+    public function del()
+    {
+        $id=input("id");
+        $where["id"]=$id;
+        $where_us["major_id"]=$id;
+        $cout=Db::name("subject")->where($where_us)->find();
+        if ($cout){
+            json_result(2,"请先删除下面的科目");
+        }
+
+        if ($cout["major_id"]==0){ // 删除专业等级表
+            $del_where["subject_id"]=$id;
+            Db::name("major_level")->where($del_where)->delete();
+        }
+        $result=Db::name("subject")->where($where)->delete();
+
+        if ($result){
+            json_result(1,"删除成功");
+        }
+        json_result(2,"删除失败11");
+
+    }
+
+
+
+    //课程科目管理
+    public function course()
+    {
+        if (Request::isPost()){
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $name=input("name", '', 'trim');
+            $where=[];
+            if ($name){
+                $where[]=["name","like","%".$name."%"];
+            }
+
+            $list=Db::name("subject")->order("major_id asc") ->where($where)->select()->toArray();
+//            $list=Db::name("subject")->order("major_id asc") ->where($where)->paginate(['list_rows' => $limit, 'page' => $page])->toArray();
+//            $list=$list["data"];
+            foreach($list as $k=>$v){
+                $list[$k]['lay_is_open']=false;
+                $list[$k]["pId"]=$v["major_id"];
+                $list[$k]["pid"]=$v["major_id"];
+            }
+            $ztree=Ztrees::sortListTier($list);
+
+            return $result = ['code' => 0, 'msg' => "获取成功", 'data' => $ztree, 'count' => count($list)];
+
+
+        }
+        return View::fetch("text");
+    }
+
+    // 升级参数设置
+    public function upgrade()
+    {
+        if (Request::isPost()){
+            $page=input("page")?:1;
+            $limit=input("limit")?:10;
+            $name=input("name", '', 'trim');
+//            $where["major_id"]=0;
+            $list=Db::name("major_level")->alias("m")->order("m.id desc")
+                ->leftJoin("subject su","m.subject_id=su.id")
+                ->where("su.name","like","%".$name."%")
+                ->field("m.*,su.name pro_name")
+                ->paginate(['list_rows' => $limit, 'page' => $page])
+                ->toArray();
+
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+        return View::fetch();
+
+
+
+    }
+
+    // 修改
+    public function update_upgrade()
+    {
+        $id=input("id");
+        $min=input("min");
+        $max=input("max");
+
+        $where["id"]=$id;
+        $update["min"]=$min;
+        $update["max"]=$max;
+        $result=Db::name("major_level")->where($where)->update($update);
+        if ($result){
+            json_result(1,"修改成功");
+        }
+        json_result(2,"修改失败");
+
+    }
+}

+ 235 - 0
php/app/admin/controller/Uploads.php

@@ -0,0 +1,235 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+use app\common\controller\Backend;
+
+use FFMpeg\FFMpeg;
+use think\facade\Config;
+use think\facade\Env;
+use think\facade\Request;
+use lemo\helper\DataHelper;
+
+class Uploads extends Backend{
+
+    //上传验证规则
+    protected $uploadValidate = [
+        'image' => 'filesize:102400|fileExt:jpg,png,gif,jpeg,rar,zip,avi,mp4,rmvb,3gp,flv,mp3,txt,doc,xls,ppt,pdf,xls,docx,xlsx,doc,wmv'
+    ];
+    protected $imageValidate = [
+        'image' => 'filesize:10240|fileExt:jpg,png,gif,jpeg,bmp,svg,wmv'
+
+    ];
+    protected $videoValidate = [
+        'file' => 'filesize:10240|avi,rmvb,3gp,flv,mp4,wmv'
+
+    ];
+    protected $voiceValidate = [
+        'file' => 'filesize:2048|mp3,wma,wav,amr,wmv'
+
+    ];
+    public function initialize()
+
+    {
+        $fileExt = getConfigByCode('upload_file_type');
+        $filemax = getConfigByCode('upload_file_max')*1024;
+        $this->uploadValidate = ['image'=>
+            'filesize'.$filemax.'|'.$fileExt,
+        ];
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+    /**
+     * 文件上传
+     * @return false|string
+     */
+    public function Uploads(){
+//        ini_set("upload_max_filesize","9M");//即允许上传文件大小的最大值
+//        ini_set("post_max_size","9M");//指通过表单POST给PHP的所能接收的最大值
+//        ini_set("memory_limit","9M");//;每个PHP页面所吃掉的最大内存
+//        ini_set("max_execution_time","3600");//每个PHP页面运行的最大时间值(秒)
+//        ini_set("max_input_time","3600");//每个PHP页面接收数据所需的最大时间(秒)
+
+        //获取上传文件表单字段名
+        $fileKey = array_keys(request()->file());
+
+        for ($i = 0; $i < count($fileKey); $i++) {
+            //获取表单上传文件
+            $file = request()->file($fileKey[$i]);
+            try {
+                validate($this->uploadValidate)->check(DataHelper::objToArray($file));
+                $savename = \think\facade\Filesystem::disk('public')->putFile('uploads', $file);
+                $savename= str_replace('\\', "/",  $savename);
+                $path[] = '/storage/' . $savename;
+            } catch (\think\exception\ValidateException $e) {
+                $path = '';
+                $error = $e->getMessage();
+            }
+        }
+
+        if (!empty($path)) {
+            $result['code'] = 1;
+            //分辨是否截图上传,截图上传只能上传一个,非截图上传可以上传多个
+            if (Request::param('responseType') == 'json') {
+                $result["url"] = $path[0];
+            } else {
+                $result["url"] = $path;
+            }
+            $result['msg'] = lang('upload success');
+            return $result;
+        } else {
+            //上传失败获取错误信息
+            $result['url'] = '';
+            $result['msg'] = $error;
+            $result['code'] = 0;
+            return $result;
+        }
+    }
+
+    /**
+     * 文件上传
+     * @return false|string
+     */
+    public function imageUploads(){
+
+        //获取上传文件表单字段名
+        $fileKey = array_keys(request()->file());
+        for ($i = 0; $i < count($fileKey); $i++) {
+            //获取表单上传文件
+            $file = request()->file($fileKey[$i]);
+            try {
+                validate($this->imageValidate)
+                    ->check(DataHelper::objToArray($file));
+                $savename = \think\facade\Filesystem::disk('public')->putFile('uploads', $file);
+                $savename= str_replace('\\', "/",  $savename);
+                $path[] = '/storage/' . $savename;
+            } catch (\think\exception\ValidateException $e) {
+                $path = '';
+                $error = $e->getMessage();
+            }
+        }
+
+        if (!empty($path)) {
+            $result['code'] = 1;
+            //分辨是否截图上传,截图上传只能上传一个,非截图上传可以上传多个
+            if (Request::param('responseType') == 'json') {
+                $result["url"] = $path[0];
+            } else {
+                $result["url"] = $path;
+            }
+            $result['msg'] =lang('upload success');
+            return $result;
+        } else {
+            //上传失败获取错误信息
+            $result['url'] = '';
+            $result['msg'] = $error;
+            $result['code'] = 0;
+            return $result;
+        }
+    }
+
+    public function text()
+    {
+
+
+}
+    /**
+     * 文件上传
+     * @return false|string
+     */
+    public function videoUploads(){
+
+//        ini_set("upload_max_filesize","10M");//即允许上传文件大小的最大值
+//        ini_set("post_max_size","10M");//指通过表单POST给PHP的所能接收的最大值
+//        ini_set("memory_limit","10M");//;每个PHP页面所吃掉的最大内存
+//        ini_set("max_execution_time","3600");//每个PHP页面运行的最大时间值(秒)
+//        ini_set("max_input_time","3600");//每个PHP页面接收数据所需的最大时间(秒)
+
+        //获取上传文件表单字段名
+        $fileKey = array_keys(request()->file());
+        for ($i = 0; $i < count($fileKey); $i++) {
+            //获取表单上传文件
+            $file = request()->file($fileKey[$i]);
+            try {
+                validate($this->videoValidate)
+                    ->check(DataHelper::objToArray($file));
+                $savename = \think\facade\Filesystem::disk('public')->putFile('uploads', $file);
+                $savename= str_replace('\\', "/",  $savename);
+                $path[] = '/storage/' . $savename;
+            } catch (\think\exception\ValidateException $e) {
+                $path = '';
+                $error = $e->getMessage();
+            }
+        }
+
+        if (!empty($path)) {
+            $result['code'] = 1;
+            //分辨是否截图上传,截图上传只能上传一个,非截图上传可以上传多个
+            if (Request::param('responseType') == 'json') {
+                $result["url"] = $path[0];
+            } else {
+                $result["url"] = $path;
+            }
+            $result['msg'] = lang('upload success');
+            return $result;
+        } else {
+            //上传失败获取错误信息
+            $result['url'] = '';
+            $result['msg'] = $error;
+            $result['code'] = 0;
+            return $result;
+        }
+    }
+
+    /**
+     * 文件上传
+     * @return false|string
+     */
+    public function vioceUploads(){
+
+        //获取上传文件表单字段名
+        $fileKey = array_keys(request()->file());
+        for ($i = 0; $i < count($fileKey); $i++) {
+            //获取表单上传文件
+            $file = request()->file($fileKey[$i]);
+            try {
+                validate($this->voiceValidate)
+                    ->check(DataHelper::objToArray($file));
+                $savename = \think\facade\Filesystem::disk('public')->putFile('uploads', $file);
+                $savename= str_replace('\\', "/",  $savename);
+                $path[] = '/storage/' . $savename;
+            } catch (\think\exception\ValidateException $e) {
+                $path = '';
+                $error = $e->getMessage();
+            }
+        }
+
+        if (!empty($path)) {
+            $result['code'] = 1;
+            //分辨是否截图上传,截图上传只能上传一个,非截图上传可以上传多个
+            if (Request::param('responseType') == 'json') {
+                $result["url"] = $path[0];
+            } else {
+                $result["url"] = $path;
+            }
+            $result['msg'] = lang('upload success');
+            return $result;
+        } else {
+            //上传失败获取错误信息
+            $result['url'] = '';
+            $result['msg'] = $error;
+            $result['code'] = 0;
+            return $result;
+        }
+    }
+
+}

+ 232 - 0
php/app/admin/controller/User.php

@@ -0,0 +1,232 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+use think\facade\Request;
+use think\facade\View;
+use app\common\model\UserLevel;
+use app\common\model\User as UserModel;
+use think\facade\Db;
+
+class User extends Backend{
+
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+    public function index(){
+        if (Request::isPost()) {
+            $keys = Request::post('keys', '', 'trim');
+            $page = Request::post('page') ? Request::post('page') : 1;
+            $list = Db::name('user')->alias('u')
+                ->where('u.email|u.mobile|u.username','like',"%".$keys."%")
+                ->leftJoin('userLevel ul','u.level_id = ul.id') //此处表别名不能加as
+                ->field('u.*,ul.level_name')
+                ->order('u.id desc ,u.create_time desc')
+                ->paginate(['list_rows' => $this->pageSize, 'page' => $page])
+                ->toArray();
+            foreach ($list['data'] as $k=>$v){
+                $list['data'][$k]['create_time'] = date('Y-m-d H:s',$v['create_time']);
+            }
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+        return View::fetch();
+
+    }
+
+    public function add(){
+        if (Request::isPost()) {
+            $data = Request::post();
+            try{
+                $this->validate($data, 'User');
+            }catch (\Exception $e){
+                $this->error($e->getMessage());
+            }
+
+
+            $res = UserModel::create($data);
+            if ($res) {
+                $this->success(lang('add success'),url('index'));
+            } else {
+                $this->error(lang('add fail'));
+            }
+        }
+        $userLevel = UserLevel::where('status',1)->select();
+
+        $view = [
+            'info' => '',
+            'title' => lang('add'),
+            'userLevel'=>$userLevel,
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+    public function edit(){
+        if (Request::isPost()) {
+            $data = Request::post();
+            try {
+                $this->validate($data, 'User');
+            } catch (\Exception $e) {
+                $this->error($e->getMessage());
+            }
+            $res = UserModel::update($data);
+            if ($res) {
+                $this->success(lang('edit success'), url('index'));
+            } else {
+                $this->error(lang('edit fail'));
+            }
+        }
+        $info = UserModel::find(Request::get('id'));
+        $userLevel = UserLevel::where('status',1)->select();
+        $view = [
+            'info' => $info,
+            'title' => '修改',
+            'userLevel'=>$userLevel,
+        ];
+        View::assign($view);
+        return View::fetch('add');
+
+    }
+    public function state(){
+
+        $id = Request::post('id');
+        if($id){
+            $info = UserModel::find($id);
+            $info->status = $info->status==1?0:1;
+            $info->save();
+            $this->success(lang('edit success'));
+
+        }else{
+            $this->error(lang('invalid data'));
+        }
+    }
+    public function delete(){
+        $id = Request::post('id');
+        if($id){
+
+            UserModel::destroy($id);
+            $this->success(lang('delete success'));
+
+        }else{
+            $this->error(lang('invalid data'));
+        }
+    }
+    public function delAll(){
+        $ids = Request::post('ids');
+        if($ids){
+            $res = \app\common\model\User::destroy($ids);
+            if(!$res)$this->error(lang('delete fail'));
+
+            $this->success(lang('delete success'));
+        }else{
+            $this->error(lang('invalid data'));
+        }
+
+    }
+
+    /**---------------用户等级--------------------**/
+
+    public function levelIndex(){
+        if (Request::isPost()) {
+            $keys = Request::post('keys', '', 'trim');
+            $page = Request::post('page') ? Request::post('page') : 1;
+            $list = Db::name('user_level')
+                ->where('level_name','like',"%".$keys."%")
+                ->order('id desc')
+                ->paginate(['list_rows' => $this->pageSize, 'page' => $page])
+                ->toArray();
+
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'], 'count' => $list['total']];
+        }
+        return View::fetch();
+    }
+
+    public function levelAdd(){
+        if (Request::isPost()) {
+            $data = Request::post();
+            try{
+                $this->validate($data, 'UserLevel');
+            }catch (\Exception $e){
+                $this->error($e->getMessage());
+            }
+
+            $res = UserLevel::create($data);
+            if ($res) {
+                $this->success(lang('add success'),url('levelIndex'));
+            } else {
+                $this->error(lang('add fail'));
+            }
+        }
+
+        $view = [
+            'info' => '',
+            'title' => lang('add'),
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+    public function levelEdit(){
+        if (Request::isPost()) {
+            $data = Request::post();
+            try {
+                $this->validate($data, 'UserLevel');
+            } catch (\Exception $e) {
+                $this->error($e->getMessage());
+            }
+            $res = UserLevel::update($data);
+            if ($res) {
+                $this->success(lang('edit success'), url('levelIndex'));
+            } else {
+                $this->error(lang('edit fail'));
+            }
+        }
+        $info = UserLevel::find(Request::get('id'));
+        $view = [
+            'info' => $info,
+            'title' => lang('edit'),
+        ];
+        View::assign($view);
+        return View::fetch('level_add');
+
+
+    }
+    public function levelState(){
+
+        $id = Request::post('id');
+        if($id){
+            $info = UserLevel::find($id);
+            $info->status = $info->status==1?0:1;
+            $info->save();
+            $this->success(lang('edit success'));
+        }else{
+            $this->error(lang('invalid data'));
+        }
+    }
+
+    public function levelDel(){
+
+        $id = Request::post('id');
+        if($id){
+            UserLevel::destroy($id);
+            $this->success(lang('delete success'));
+        }else{
+            $this->error(lang('invalid data'));
+        }
+    }
+
+
+}

+ 47 - 0
php/app/admin/controller/UserAddress.php

@@ -0,0 +1,47 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/2
+ */
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+
+class UserAddress extends Backend {
+
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+    public function index(){
+
+
+    }
+
+    public function add(){
+
+    }
+
+    public function edit(){
+
+
+    }
+    public function state(){
+
+
+    }
+    public function delete(){
+
+
+    }
+
+
+}

+ 153 - 0
php/app/admin/lang/zh-cn.php

@@ -0,0 +1,153 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/21
+ */
+
+return [
+    'lang'=>'语言',
+    'edit'  => '编辑',
+    'status' => '状态',
+    'order' => '排序',
+    'del' => '删除',
+    'delete'=>'删除',
+    'add' => '添加',
+    'ad' => '广告',
+    'update' => '更新',
+    'list' => '列表',
+    'submit' => '提交',
+    'back' => '返回',
+    'cancel' => '取消',
+    'reset' => '重置',
+    'open' =>'开启',
+    'close' =>'关闭',
+    'email' => '邮箱',
+    'ip' => 'ip地址',
+    'mobile' => '手机号',
+    'pleaseEnter' => '请输入',
+    'username'=>'用户名',
+    'password' => '密码',
+    'adminGroup' => '管理组',
+    'userGroup' => '会员组',
+    'admin' => '管理员',
+    'search' => '搜索',
+    'user' => '用户',
+    'sex' => '性别',
+    'level' => '等级',
+    'Are you sure you want to delete it'=>'确定删除吗',
+    'please choose data'=>'请选择数据',
+    'wechat'=>'微信',
+    'message'=>'消息',
+    'material'=>'素材',
+    'tag'=>'标签',
+    'fans'=>'粉丝',
+    'reply'=>'回复',
+    'supper man'=>'超级管理',
+    'sort' =>'排序',
+    'field'=>'字段',
+    'name'=>'名字',
+    'config'=>'配置',
+    'qrcode' =>"二维码",
+    'tips'=>"提示",
+    'maxfilesize'=>"最大文件大小",
+    'file type'=>"文件类型",
+    'upload'=>"上传",
+
+    'sms appid' =>'短信APPID',
+    'sms appsecret' =>'短密钥',
+    'sms product name' =>'短信产品名',
+    'sms template id' =>'短信模板id',
+
+    'email server'=>'邮箱服务器',
+    'semail addr'=>'邮箱地址',
+    'email port'=>'邮箱端口',
+    'server mailbox protocol'=>'邮箱协议',
+    'email password'=>'邮箱密码',
+    'send email person'=>'邮箱密码',
+
+    'all right'=>'所有权',
+    'site name'=>'网站名',
+    'site title'=>'网站标题',
+    'site logo'=>'网站logo',
+    'site email'=>'网站邮箱',
+    'site domain'=>'网站域名',
+    'meta keywords'=>'网站关键字',
+    'meta description'=>'网站描述',
+
+    'delete checked'=>'批量删除',
+    'get info success'=>'获取成功',
+    'add success'=>'新增成功',
+    'update success'=>'更新成功',
+    'delete success'=>'删除成功',
+    'delete all success'=>'全部删除成功',
+    'edit success'=>'修改成功',
+    'asny success'=>'同步成功',
+    'empty success'=>'清除成功',
+    'add fail'=>'新增失败',
+    'update fail'=>'更新失败',
+    'delete fail'=>'删除失败',
+    'delete all fail'=>'全部删除失败',
+    'edit fail'=>'修改失败',
+    'asny fail'=>'同步失败',
+    'empty fail'=>'清除失败',
+
+    'supper man cannot delete'=>'超级管理员不能删除',
+    'supper man cannot edit'=>'超级管理员不能修改',
+    'supper man cannot edit state'=>'超级管理员不能修改状态',
+    'test data cannot edit'=>'测试数据不能修改',
+    'test data cannot delete'=>'测试数据不能删除',
+    'please choose rule'=>'请选择权限',
+    'rule assign fail'=>'权限分配失败',
+    'rule assign success'=>'权限分配成功',
+    'rule name cannot null'=>'权限名不能为空',
+    'permission denied'=>'没有权限',
+    'delete child first'=>'先删除下级',
+    'not exist' =>'不存在',
+    'data not exist'=>'数据不存在',
+    'cannot null'=>'不能为空',
+    'invalid data'=>'数据不正确',
+    'invalid options'=>'非法操作',
+
+
+    'logout success'=>'退出成功',
+    'origin password error'=>'原密码错误',
+    
+    'optimize success'=>'优化成功',
+    'optimize fail'=>'优化失败',
+    'repair fail'=>'修复失败',
+    'repair success'=>'修复成功',
+    'backup success'=>'备份成功',
+    'backup fail'=>'备份失败',
+    'restore success'=>'还原成功',
+
+
+    'captcha error'=>'验证码错误',
+    'login success'=>'登录成功',
+    'login fail'=>'登录失败',
+    'account is disabled'=>'账号禁用',
+    'account is not accessed'=>'账号未成功接入',
+    'please check username or password'=>'请检查用户名或密码',
+
+    'qrcode name' =>"二维码名字",
+
+    'field already exist'=>'字段已经存在',
+    'config group'=>'配置分组',
+    'group name' => '分组名',
+    'group title' => '分组标题',
+    'group has config'=>'分组下有配置',
+
+    'site setting'=>'网站设置',
+    'email setting'=>'邮箱设置',
+    'sms setting'=>'短信设置',
+    'upload setting'=>'上传设置',
+
+
+
+];

+ 22 - 0
php/app/admin/middleware.php

@@ -0,0 +1,22 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+
+
+return [
+//     \think\middleware\LoadLangPack::class,
+
+     \think\middleware\SessionInit::class,
+    //日志
+    \app\admin\middleware\AdminLog::class,
+];
+

+ 32 - 0
php/app/admin/middleware/AdminLog.php

@@ -0,0 +1,32 @@
+<?php
+/**
+ * +
+ * | 后台中间件验证权限
+ */
+namespace app\admin\middleware;
+
+use app\admin\model\AuthRule;
+use think\facade\Db;
+use think\facade\Session;
+use think\facade\Request;
+use think\Response;
+use think\exception\HttpResponseException;
+
+class AdminLog
+{
+    public function handle($request, \Closure $next)
+    {
+
+        //进行操作日志的记录
+        \app\admin\model\AdminLog::record();
+
+
+        //中间件handle方法的返回值必须是一个Response对象。
+        return $next($request);
+    }
+    //中间件支持定义请求结束前的回调机制,你只需要在中间件类中添加end方法。
+    public function end(\think\Response $response)
+    {
+        // 回调行为
+    }
+}

+ 27 - 0
php/app/admin/middleware/MajorLevel.php

@@ -0,0 +1,27 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: anyluck
+ * Date: 2020/1/20
+ * Time: 13:35
+ */
+
+namespace app\admin\middleware;
+
+use think\facade\Db;
+
+class MajorLevel
+{
+
+    // 升级中间件
+
+    public function handle($request, \Closure $next)
+    {
+
+//            $this->add_level(1);
+
+        return $next($request);
+    }
+
+
+}

+ 20 - 0
php/app/admin/model/Admin.php

@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\model;
+
+class Admin extends AdminModel {
+
+
+
+}

+ 93 - 0
php/app/admin/model/AdminLog.php

@@ -0,0 +1,93 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\model;
+
+use lemo\helper\DataHelper;
+use think\facade\Request;
+use think\facade\Session;
+use think\facade\Db;
+use think\facade\Route;
+use app\admin\model\AuthRule;
+
+class AdminLog extends AdminModel
+{
+
+    protected static $log_title = '';
+    //自定义日志内容
+    protected static $log_content = '';
+    protected static $log_url = '';
+
+    /*
+     * 管理员日志记录
+     */
+    public static function record()
+    {
+        //入库信息
+        $admin_id   = Session::get('admin.id',0);
+        $username   = Session::get('admin.username','Unknown');
+        $url        = Request::url();
+        $title      = self::$log_title;
+        $ip         = Request::ip();
+        $agent      = Request::server('HTTP_USER_AGENT');
+        $content    = Request::param();
+
+        if(stripos($url,'?')){
+            $url = explode('?',$url)[0];
+            $url = strtolower($url);
+        }
+        if ($content) {
+            //去除登录密码
+            foreach ($content as $k => $v) {
+                if (stripos($k, 'password') !== false) {
+                    unset($content[$k]);
+                }
+            }
+            $content = json_encode($content);
+        }elseif (!$content && Request::isGet()){
+            $content = '点击菜单';
+        }elseif (!$content && Request::isPost()){
+            $content = '清除缓存|切换语言';
+        }
+        //登录处理
+        if (strpos($url, 'login/index') !== false && Request::isPost()) {
+            $title = '[登录成功]';
+        }else{
+            //权限
+            $auth = AuthRule::column('href','href');
+            foreach ($auth as $k=>$v){
+                $auth[$k] = strtolower((string)url($v));
+            }
+            $key = array_search($url,$auth);
+            if($key){
+                $auth = AuthRule::where('href',$key)->find();
+                if($auth) $title=$auth->title;
+            }
+
+        }
+        //插入数据
+        if (!empty($title)) {
+            self::create([
+                'log_title'       => $title ? $title : '',
+                'log_content'       => $content,
+                'log_url'         => $url,
+                'admin_id'    => $admin_id,
+                'username'    => $username,
+                'log_agent'   => $agent,
+                'log_ip'          => $ip,
+             ]);
+        }
+
+
+    }
+
+}

+ 21 - 0
php/app/admin/model/AdminModel.php

@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+
+namespace app\admin\model;
+use app\common\model\BaseModel;
+class AdminModel extends BaseModel
+{
+
+
+}

+ 23 - 0
php/app/admin/model/AuthGroup.php

@@ -0,0 +1,23 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+
+
+namespace app\admin\model;
+use think\model\relation\HasOne;
+
+class AuthGroup extends AdminModel
+{
+
+
+
+}

+ 22 - 0
php/app/admin/model/AuthRule.php

@@ -0,0 +1,22 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+
+
+namespace app\admin\model;
+class AuthRule extends AdminModel
+{
+    public function __construct(array $data = [])
+    {
+        parent::__construct($data);
+    }
+}

+ 21 - 0
php/app/admin/model/ListPage.php

@@ -0,0 +1,21 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Administrator
+ * Date: 2020/3/9
+ * Time: 14:53
+ */
+
+namespace app\admin\model;
+
+
+class ListPage
+{
+        // todo 一键生成源码测试
+
+    public static function add_list($data)
+    {
+
+
+    }
+}

+ 39 - 0
php/app/admin/model/MajorLevel.php

@@ -0,0 +1,39 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: anyluck
+ * Date: 2020/1/20
+ * Time: 13:48
+ */
+
+namespace app\admin\model;
+
+
+use think\facade\Db;
+
+class MajorLevel
+{
+
+
+    //     // 升级
+
+    public static function add_level($pid)
+    {
+        $min=0;
+        $max=6;
+        $add=[];
+        for ($i=0;$i<=4;$i++){
+            $add[$i]["min"]=$min;
+            $add[$i]["max"]=$min+$max;
+            $add[$i]["subject_id"]=$pid;
+            $add[$i]["type"]=$i;
+            $min=$max*($i+1);
+
+
+        }
+      $result=  Db::name("major_level")->insertAll($add);
+//        var_dump($add);
+
+    }
+
+}

+ 15 - 0
php/app/admin/model/User.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: anyluck
+ * Date: 2020/1/19
+ * Time: 14:03
+ */
+
+namespace app\admin\model;
+
+
+class User extends AdminModel
+{
+
+}

+ 186 - 0
php/app/admin/model/Video.php

@@ -0,0 +1,186 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Administrator
+ * Date: 2020/2/21
+ * Time: 12:12
+ */
+
+namespace app\admin\model;
+
+use FFMpeg\Coordinate\Dimension;
+use FFMpeg\Coordinate\FrameRate;
+use FFMpeg\Coordinate\TimeCode;
+use FFMpeg\FFMpeg;
+use FFMpeg\FFProbe;
+use FFMpeg\Format\Audio\Flac;
+use FFMpeg\Format\Video\WMV;
+use FFMpeg\Format\Video\X264;
+
+class Video
+{
+//    private static $ffmpeg = "D:/install/ffmpeg/bin/ffmpeg.exe";
+    private static $ffmpeg = app_paths."ffmpeg/bin/ffmpeg.exe";
+//    private static $ffprobe = "D:/install/ffmpeg/bin/ffprobe.exe";
+    private static $ffprobe = app_paths."ffmpeg/bin/ffprobe.exe";
+
+        private static $file_img=Pah."/storage/videoimg/";
+
+//总长度时间和第2帧 图片
+    public static function ffmpeg_getTime($file)
+    {
+        $ffmpeg = FFMpeg::create([
+            'ffmpeg.binaries' => self::$ffmpeg ,
+            'ffprobe.binaries' => self::$ffprobe,
+        ]);
+        $video = $ffmpeg ->open($file);
+        $frame = $video->frame(TimeCode::fromSeconds(2));
+        $time=time();
+        $file_name=self::$file_img.$time.".png";
+        $frame->save($file_name);
+        $data["img"]="/storage/videoimg/".$time.".png";// 背景图片
+            $dimension=self::video_time($file);
+        $data["seconds"]=$dimension;
+        return $data;
+    }
+
+//    获取总时长
+   public static function video_time($file) {
+       define('FFMPEG_PATH', self::$ffmpeg.' -i "%s" 2>&1');
+        ob_start();
+        passthru(sprintf(FFMPEG_PATH, $file));  //passthru()类似exec()
+        $info = ob_get_contents();
+        ob_end_clean();
+        // 通过使用输出缓冲,获取到ffmpeg所有输出的内容。
+        $ret = array();
+        // Duration: 01:24:12.73, start: 0.000000, bitrate: 456 kb/s
+        if (preg_match("/Duration: (.*?), start: (.*?), bitrate: (\d*) kb\/s/", $info, $match)) {
+//            $ret['duration'] = $match[1]; // 提取出播放时间
+            $arr_dian = explode('.', $match[1]);
+            $arr_duration = explode(':', $arr_dian[0]);
+            $seconds = $arr_duration[0] * 3600 + $arr_duration[1] * 60 + $arr_duration[2]; //转换播放时间为秒数
+//            $arr_duration = explode(':', $arr_dian[0]);
+            return $seconds;
+        }
+        return 0;
+    }
+
+    // 获取所有参数
+    public  static function getVideoInfo($file) {
+
+        define('FFMPEG_PATH', self::$ffmpeg.' -i "%s" 2>&1');
+
+        $command = sprintf(FFMPEG_PATH, $file);
+
+
+
+        ob_start();
+
+        passthru($command);
+
+        $info = ob_get_contents();
+
+        ob_end_clean();
+
+
+
+        $data = array();
+
+        if (preg_match("/Duration: (.*?), start: (.*?), bitrate: (\d*) kb\/s/", $info, $match)) {
+
+            $data['duration'] = $match[1]; //播放时间
+
+            $arr_duration = explode(':', $match[1]);
+
+            $data['seconds'] = $arr_duration[0] * 3600 + $arr_duration[1] * 60 + $arr_duration[2]; //转换播放时间为秒数
+
+            $data['start'] = $match[2]; //开始时间
+
+            $data['bitrate'] = $match[3]; //码率(kb)
+        }
+
+        if (preg_match("/Video: (.*?), (.*?), (.*?)[,\s]/", $info, $match)) {
+
+            $data['vcodec'] = $match[1]; //视频编码格式
+
+            $data['vformat'] = $match[2]; //视频格式
+
+            $data['resolution'] = $match[3]; //视频分辨率
+
+            $arr_resolution = explode('x', $match[3]);
+
+            $data['width'] = $arr_resolution[0];
+
+            $data['height'] = $arr_resolution[1];
+
+        }
+
+        if (preg_match("/Audio: (\w*), (\d*) Hz/", $info, $match)) {
+
+            $data['acodec'] = $match[1]; //音频编码
+
+            $data['asamplerate'] = $match[2]; //音频采样频率
+
+        }
+
+        if (isset($data['seconds']) && isset($data['start'])) {
+
+            $data['play_time'] = $data['seconds'] + $data['start']; //实际播放时间
+
+        }
+
+//        $data['size'] = filesize($file); //文件大小
+
+        return $data;
+
+    }
+
+    // 视频处理
+    public function file_con($file)
+    {
+        $ffmpeg = FFMpeg::create([
+            'ffmpeg.binaries' => self::$ffmpeg ,
+            'ffprobe.binaries' => self::$ffprobe,
+            "timeout"=>3600,
+            "ffmpeg.threads"=>12,
+        ]);
+//        $ffmpeg = FFMpeg::create();
+        $video=$ffmpeg->open(Pah.$file);
+
+        $this->video_size($ffmpeg,$video);
+    }
+
+    // 设置视频大小
+    public function video_size($ffmpeg,$video)
+    {
+        $saves=Pah."storage/zhuan/text26.mp4";
+        $video->filters()->resize(new Dimension(750, 400),"inset");
+        $video->save(new X264("aac"),$saves);
+    }
+
+    //   视频转码 H264
+    public static function mp4_video($file)
+    {
+       $saves=Pah."storage/zhuan/texts11.mkv";
+
+        $ffmpeg = FFMpeg::create([
+            'ffmpeg.binaries' => self::$ffmpeg ,
+            'ffprobe.binaries' => self::$ffprobe,
+            "timeout"=>3600,
+            "ffmpeg.threads"=>12,
+        ]);
+
+        $video=$ffmpeg->open(Pah.$file);//FrameRate
+        $video->filters()->resize(new Dimension(750, 400),"inset")->framerate(new FrameRate(10),1)->synchronize();
+
+//        $format=new X264();
+//        $format
+//        $video->save(new WMV(),$saves);
+        $video->save(new X264("aac"),$saves);
+        dump(1212);
+
+    }
+
+    
+
+}

+ 84 - 0
php/app/admin/model/Ztrees.php

@@ -0,0 +1,84 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Administrator
+ * Date: 2020/3/20
+ * Time: 15:25
+ */
+
+namespace app\admin\model;
+
+
+use think\facade\Db;
+
+class Ztrees
+{
+
+    /**
+     * 分级排序
+     * @param $data
+     * @param int $pid
+     * @param string $field
+     * @param string $pk
+     * @param string $html
+     * @param int $level
+     * @param bool $clear
+     * @return array
+     */
+    public static function sortListTier($data, $pid = 0, $field = 'pid', $pk = 'id', $html = '|-----', $level = 1, $clear = true)
+    {
+        static $list = [];
+        if ($clear) $list = [];
+        foreach ($data as $k => $res) {
+            if ($res[$field] == $pid) {
+                $res['html'] = str_repeat($html, $level);
+                $res['level'] =$level;
+
+                $list[] = $res;
+                unset($data[$k]);
+                self::sortListTier($data, $res[$pk], $field, $pk, $html, $level + 1, false);
+            }
+        }
+        return $list;
+    }
+
+    public static function child_ztree($data,$pid=0,$field = 'pid',$level=1,$clear = true)
+    {
+        static $list = [];
+        if ($clear) $list = [];
+        foreach ($data as $k => $res) {
+            if ($res[$field] == $pid) {
+                $list["name"]=$res["name"];
+                $list["city"]=$res["name"];
+                unset($data[$k]);
+                self::child_ztree($data, $res["id"], $field, $level + 1, false);
+            }
+        }
+        return $list;
+
+    }
+
+    //无限分类数
+
+    /** 无限分类
+     * @param $array 分类数据
+     * @param string $pid 分类上级变量
+     * @param string $child 下一级变量名称
+     * @return array
+     */
+    public static function SelectSon($array,$pid="pid",$child="son"){
+        $items = array();
+        foreach ($array as $value) {
+            $items[$value['id']] = $value;
+        }
+        $tree = array();
+        foreach ($items as $key => $item) {
+            if (isset($items[$item[$pid]])) {
+                $items[$item[$pid]][$child][] = &$items[$key];
+            } else {
+                $tree[$item[$pid]] = &$items[$key];
+            }
+        }
+        return $tree;
+    }
+}

+ 32 - 0
php/app/admin/validate/Admin.php

@@ -0,0 +1,32 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\validate;
+
+use think\validate;
+
+class Admin extends validate
+{
+    protected $rule = [
+        'username|用户名' => [
+            'require' => 'require',
+            'max'     => '100',
+            'unique'  => 'admin',
+        ],
+        'password|密码' =>[
+            'require' => 'require',
+        ],
+        'group_id|用户组'=>[
+            'require' => 'require',
+        ],
+    ];
+}

+ 31 - 0
php/app/admin/validate/Adv.php

@@ -0,0 +1,31 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\validate;
+
+use think\validate;
+
+class Adv extends validate
+{
+    protected $rule = [
+        'pid|广告位置' => [
+            'require' => 'require',
+        ],
+        'ad_image|广告图片' => [
+            'require' => 'require',
+        ],
+        'ad_name|广告名' => [
+            'require' => 'require',
+        ],
+
+    ];
+}

+ 27 - 0
php/app/admin/validate/AdvPosition.php

@@ -0,0 +1,27 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\validate;
+
+use think\validate;
+
+class AdvPosition extends validate
+{
+    protected $rule = [
+        'position_name|广告位置名' => [
+            'require' => 'require',
+            'unique' =>'adv_position'
+        ],
+
+
+    ];
+}

+ 26 - 0
php/app/admin/validate/AuthGroup.php

@@ -0,0 +1,26 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\validate;
+
+use think\validate;
+
+class AuthGroup extends validate
+{
+    protected $rule = [
+        'title|用户组名' => [
+            'require' => 'require',
+            'max'     => '100',
+            'unique'  => 'auth_group',
+        ]
+    ];
+}

+ 30 - 0
php/app/admin/validate/Field.php

@@ -0,0 +1,30 @@
+<?php
+namespace app\admin\validate;
+use think\Validate;
+
+class Field extends Validate
+{
+    protected $rule = [
+        'moduleid|模型名称' => [
+            'require' => 'require',
+            'max'     => '5',
+        ],
+        'type|字段类型' => [
+            'require' => 'require',
+            'max'     => '20',
+        ],
+        'name|字段名' => [
+            'require' => 'require',
+            'max'     => '20',
+        ],
+        'name|别名' => [
+            'require' => 'require',
+            'max'     => '50',
+        ],
+        'sort|排序' => [
+            'require' => 'require',
+            'number'  => 'number',
+            'max'     => '10',
+        ]
+    ];
+}

+ 30 - 0
php/app/admin/validate/Link.php

@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+namespace app\admin\validate;
+
+use think\validate;
+
+class Link extends validate
+{
+    protected $rule = [
+        'name|名字' => [
+            'require' => 'require',
+            'max'     => '255',
+        ],
+        'url|网站地址' => [
+            'require' => 'require',
+            'max'     => '255',
+        ],
+    ];
+}

+ 41 - 0
php/app/admin/validate/Module.php

@@ -0,0 +1,41 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/2
+ */
+namespace app\admin\validate;
+use think\Validate;
+
+class Module extends Validate
+{
+    protected $rule = [
+        'title|模型名称' => [
+            'require' => 'require',
+            'max'     => '100',
+            'unique'  => 'module',
+        ],
+        'name|表名' => [
+            'require' => 'require',
+            'max'     => '50',
+            'unique'  => 'module',
+        ],
+        'listfields|列表页字段' => [
+            'require' => 'require',
+            'max'     => '255',
+        ],
+        'description|描述' => [
+            'max' => '200',
+        ],
+        'sort|排序' => [
+            'require' => 'require',
+            'number'  => 'number',
+        ]
+    ];
+}

+ 34 - 0
php/app/admin/validate/User.php

@@ -0,0 +1,34 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/2
+ */
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class User extends Validate
+{
+    protected $rule = [
+        'level_id|会员等级' => [
+            'require' => 'require',
+        ],
+        'email|邮箱账号' => [
+            'require' => 'require',
+            'min'     => '5',
+            'max'     => '100',
+            'unique'  => 'user',
+        ],
+        'mobile|联系电话' => [
+            'unique'  => 'user',
+        ],
+    ];
+}

+ 31 - 0
php/app/admin/validate/UserLevel.php

@@ -0,0 +1,31 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/2
+ */
+namespace app\admin\validate;
+
+use think\Validate;
+
+class UserLevel extends Validate
+{
+    protected $rule = [
+        'level_name|会员组名称' => [
+            'require' => 'require',
+            'max'     => '255',
+            'unique'  => 'user_level',
+        ],
+
+        'description|描述' => [
+            'max' => '255',
+        ],
+
+    ];
+}

+ 56 - 0
php/app/admin/validate/WxAccount.php

@@ -0,0 +1,56 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/5
+ */
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class WxAccount extends Validate
+{
+    protected $rule = [
+        'wxname|wxname' => [
+            'require' => 'require',
+            'max'     => '255',
+            'unique'  => 'wx_account',
+        ],
+        'app_id|app_id' => [
+            'require' => 'require',
+            'max'     => '255',
+            'unique'  => 'wx_account',
+        ],
+        'app_secret|APP_SECRET' => [
+            'require' => 'require',
+            'max'     => '255',
+            'unique'  => 'wx_account',
+        ],
+        'origin_id|原始id' => [
+            'require' => 'require',
+            'max'     => '255',
+            'unique'  => 'wx_account',
+        ],
+        'w_token|w_token' => [
+            'require' => 'require',
+            'max'     => '255',
+        ],
+        'type|类型' => [
+            'require' => 'require',
+            'max'     => '2',
+        ],
+        'status|状态' => [
+            'require' => 'require',
+            'max'     => '1',
+        ],
+
+
+    ];
+}

+ 34 - 0
php/app/admin/validate/WxTag.php

@@ -0,0 +1,34 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/5
+ */
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class WxTag extends Validate
+{
+    protected $rule = [
+        'name|标签名' => [
+            'require' => 'require',
+            'max'     => '255',
+            'unique'  => 'wx_tag',
+        ],
+        'status|状态' => [
+            'require' => 'require',
+            'max'     => '1',
+        ],
+
+
+    ];
+
+}

+ 34 - 0
php/app/ap/config/route.php

@@ -0,0 +1,34 @@
+<?php
+// +----------------------------------------------------------------------
+// | 路由设置
+// +----------------------------------------------------------------------
+
+return [
+
+    // URL普通方式参数 用于自动生成
+    'url_common_param'      => true,
+    // 是否开启路由延迟解析
+    'url_lazy_route'        => false,
+    // 是否强制使用路由
+    'url_route_must'        => false,
+    // 合并路由规则
+    'route_rule_merge'      => true,
+    // 路由是否完全匹配
+    'route_complete_match'  => true,
+    // 是否开启路由缓存
+    'route_check_cache'     => false,
+    // 路由缓存连接参数
+    'route_cache_option'    => [],
+    // 路由缓存Key
+    'route_check_cache_key' => '',
+    // 默认的路由变量规则
+    'default_route_pattern' => '[\w\.]+',
+    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
+    'request_cache'         => false,
+    // 请求缓存有效期
+    'request_cache_expire'  => null,
+    // 全局请求缓存排除规则
+    'request_cache_except'  => [],
+    //跨应用路由
+    'cross_app_route'	=>	true,
+];

+ 52 - 0
php/app/ap/controller/Login.php

@@ -0,0 +1,52 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/6/1
+ * Time: 16:52
+ */
+
+namespace app\ap\controller;
+
+
+use app\common\model\User;
+use Ramsey\Uuid\Uuid;
+
+class Login
+{
+ // 登录
+
+    // 登录功能
+    public function in_login()
+    {
+        $user=input("user");
+        $pwd=input("pwd");
+        $use=User::where(["user"=>$user])->find();
+        if (!$use){
+           json_result(400,"账号不存在");
+        }
+        if (!password_verify($pwd,$use->pwd)){
+            json_result(400,"密码错误");
+        }
+        json_result(200,"",$use);
+    }
+
+    // 注册
+    public function register()
+    {
+        $user=input("user");if (!$user)json_result(400,"请设置账号");
+        $pwd=input("pwd");if(!$pwd)json_result(400,"请设置密码");
+        $use=User::where(["user"=>$user])->find();
+        if ($use){
+            json_result(300,"账号已经存在");
+        }
+        $uuid=Uuid::uuid1();
+        $data["token"]=$uuid->getHex();
+        $data["pwd"]=password_hash($pwd,PASSWORD_DEFAULT);
+        $data["name"]="小白";
+        $data["user"]=$user;
+            User::create($data);
+            json_result(200,"恭喜您创建成功");
+    }
+
+}

+ 48 - 0
php/app/ap/controller/v1/Index.php

@@ -0,0 +1,48 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/6/1
+ * Time: 15:09
+ */
+
+namespace app\ap\controller\v1;
+
+
+class Index
+{
+
+    public function index()
+    {
+        dump("index");
+    }
+    public function get()
+    {
+        dump("this is get");
+
+    }
+
+    public function post()
+    {
+        dump(" post");
+
+    }
+
+    public function pull()
+    {
+        dump("pull");
+
+    }
+
+
+    public function delete()
+    {
+        dump("delete");
+    }
+
+    public function patch()
+    {
+        dump("patch");
+
+    }
+}

+ 91 - 0
php/app/ap/controller/v1/User.php

@@ -0,0 +1,91 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/6/1
+ * Time: 15:37
+ */
+
+namespace app\ap\controller\v1;
+
+
+use think\facade\Request;
+
+class User
+{
+    /**
+     * 显示资源列表
+     *
+     * @return \think\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * 保存新建的资源
+     *
+     * @param  \think\Request  $request
+     * @return \think\Response
+     */
+    public function save(Request $request)
+    {
+        //
+    }
+
+    /**
+     * 显示指定的资源
+     *
+     * @param  int  $id
+     * @return \think\Response
+     */
+    public function read($id)
+    {
+        //
+    }
+
+    /**
+     * 显示编辑资源表单页.
+     *
+     * @param  int  $id
+     * @return \think\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * 保存更新的资源
+     *
+     * @param  \think\Request  $request
+     * @param  int  $id
+     * @return \think\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * 删除指定资源
+     *
+     * @param  int  $id
+     * @return \think\Response
+     */
+    public function delete($id)
+    {
+        //
+    }
+}

+ 22 - 0
php/app/ap/middleware.php

@@ -0,0 +1,22 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/8/2
+ */
+
+
+return [
+//     \think\middleware\LoadLangPack::class,
+
+     \think\middleware\SessionInit::class,
+    //访问频率
+//    \think\middleware\Throttle::class,
+];
+

+ 26 - 0
php/app/ap/route/api.php

@@ -0,0 +1,26 @@
+<?php
+/**
+ * user:anyluck
+ * Date: 2019/9/30
+ */
+use think\facade\Route;
+Route::miss(function() {
+    $result="";
+    return '404 Not Found!';
+});
+
+// 需要验证
+Route::group("token",function (){
+    Route::post(":version/any",":version.token/text");
+
+})->middleware(\app\middleware\Token::class);
+
+
+Route::group("notoken",function (){// 不需要token
+//   Route::post(":version/notken",":version.token/notken");
+   Route::post("login","login/in_login");
+   Route::post("register","login/register");
+
+})->middleware(\app\middleware\Notken::class);
+
+

+ 24 - 0
php/app/cert/apiclient_cert.pem

@@ -0,0 +1,24 @@
+-----BEGIN CERTIFICATE-----
+MIID8zCCAtugAwIBAgIUQaOQ9oL/BoT/CecezPHFSDKSKiEwDQYJKoZIhvcNAQEL
+BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
+FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
+Q0EwHhcNMTkwOTEwMDkxMjA4WhcNMjQwOTA4MDkxMjA4WjCBhDETMBEGA1UEAwwK
+MTU1MzY5Mjc5MTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTAwLgYDVQQL
+DCfojpjljr/mlrDlv6vlhpzkv6Hmga/mioDmnK/mnInpmZDlhazlj7gxCzAJBgNV
+BAYMAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAKUg4ya0hyZJKHeTts+eR2r8yIs0aFjRtBPyxVHoav6mOATcMyUk
+ZA0gncdz0rXwnLrhSlSt1voHJcigPrkzcO4EVWYWpYUhCO9i8dMJbD8O4fkXyhhA
+yOOEyYIyY0yFhoaLVEe/dlYDpwNIqWRx6O9DgReDC4RyMx4O9rk782N8SzSg3w9K
+4U3iYd5WV4VniWIhweWJwH3bhhRqc6iP61+OBNWil8Q5PxyA5JdGO3K/ZFOpfV5Y
+KpPhDOruBbEtLmePWKFl6qZJs/tgIBE0yJPsw53pt53EYCQTiHYeLwGaKCDq7EKn
+YG9/6CnV4IFgYosDpXB9OEE7FEDkG33I6VsCAwEAAaOBgTB/MAkGA1UdEwQCMAAw
+CwYDVR0PBAQDAgTwMGUGA1UdHwReMFwwWqBYoFaGVGh0dHA6Ly9ldmNhLml0cnVz
+LmNvbS5jbi9wdWJsaWMvaXRydXNjcmw/Q0E9MUJENDIyMEU1MERCQzA0QjA2QUQz
+OTc1NDk4NDZDMDFDM0U4RUJEMjANBgkqhkiG9w0BAQsFAAOCAQEAA7HoetE8GmOM
+hRI7TDrHO2FCjSULNwPF1B+qfHSCVlqc+VNo1QW6ZtQALxa1APv/6k3MCZJyHU9z
+KJxrvclKzx18Mqk4+Lr62INpb0aKr5WxnLEB8vzLII+8gsUBIakoURQCdi6sBTQE
+rZZ4hnqCJttQuHmXTnlRS8ZI55rOtNOFpHCAK5OTCu6M0PEWf3MHTjda0d+Ty8QL
+fe6hjipKJ51A+ywbLnpJMUn3xaaNJawUSzpWdXZFr/Ln8ljwhaTC82x2lN7+xZon
+LLeem57jD7nC0Wf4V4d1Q46afKZeyrbpOgYDFQ+FvhfDiB8qcxXSFk+kbwggCSeO
+YPhEZi2i8A==
+-----END CERTIFICATE-----

+ 28 - 0
php/app/cert/apiclient_key.pem

@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQClIOMmtIcmSSh3
+k7bPnkdq/MiLNGhY0bQT8sVR6Gr+pjgE3DMlJGQNIJ3Hc9K18Jy64UpUrdb6ByXI
+oD65M3DuBFVmFqWFIQjvYvHTCWw/DuH5F8oYQMjjhMmCMmNMhYaGi1RHv3ZWA6cD
+SKlkcejvQ4EXgwuEcjMeDva5O/NjfEs0oN8PSuFN4mHeVleFZ4liIcHlicB924YU
+anOoj+tfjgTVopfEOT8cgOSXRjtyv2RTqX1eWCqT4Qzq7gWxLS5nj1ihZeqmSbP7
+YCARNMiT7MOd6bedxGAkE4h2Hi8Bmigg6uxCp2Bvf+gp1eCBYGKLA6VwfThBOxRA
+5Bt9yOlbAgMBAAECggEAOD7agI2PV2Al840SAOgl5XBTEu9394D+eKkBwyOKhlCx
+1h33IdiiZ8JLW+u8wxJBIHqqqetIxYN3wD2s/8Jg3gIF4K8oFA+rjnbCbiLQhy4X
+lJQg12ABzVWmmb12C1OT/fIpdALoWOYHllvCrx8Ju63fo9WUL7oCZWOtcGzWO3VH
+xAbS8QmbNvoufFXFFgxuAYQa6WEX9xrjHjkWA+xI2fUpgh8DjVnQLNyeI0wTBR82
+6r2omAnjD9B4g+COS09JOkOgj5SPJY01x926S/xZfuErTwXeEHStIT+sbIcvJ3k/
+L02OktRbxEJVrHAnMR7saV2xy/KcJ/MQn4FpRPnVSQKBgQDR4QqY8MStcUEqqrPK
+s4hZ4L5yPCxFKZ8rW+sX5NRrsq060IweBA9KwLgT3hUquVmf2ftB7H7x3t1OCORq
+OFw1uDkfGdhZoix8s3b/TK6TkyMoIMi/S6K+kX6MX2y6fHmFTpD8ttSFFqdkDeAG
+VuQjfeazVXeD/HR6aqIYEpCFrwKBgQDJalsNtbNThK1a3HmsXs66drW/6oyWm+9y
+jMd3ae9BoXSvvlME1Iy+yKcH1uz82RHGhGKV4oErSv+XJ2I38VmGr88E45f+dx9e
+PJ7NVHCtFPDNhXyn1bH16Lhm0aYd8Mu+DUbdqcRyOW8LsqnKDN+n/dM0ZQgz+EUw
+hRNXWT+uFQKBgClWVawB3/r5T4iDzp2h9r0dEuWVDHMi24LCu+8c1unPa2cmJDLV
+Qd3LT3Y6S5j6oLhnSqGVXvtsldIE1lhFeYPrIPULNh2RX4nAHzPxeoD+ffItYtyq
+nQdDyNUFBnlEgvrKmqvrprf/2kBOq00UWCLVbVbtAnkwhBCIaBytq2FpAoGAWTvI
+aVOFxkuyrd2d/lLmjc/IB+W3MYaWWA6s1GfXeyE33CCbETnFvUSSU7PRvNfCu0ut
+jbATAAYzJFlrd1NzEWvUcNsQXMmT2SFMTbXKUbREVxl7t7PCKytWfx8E1KD48xNY
+wR3UjbKKUwltlbmMYRXgO4dDUhr9NFjQz9MXll0CgYBkta11nG1BeJqSrvw/zR3n
+R9o+XfBsp2p6RTC+QKDllZ/jtfmNQZpgM/C1YuOAN9af2V32jtg/L0Wu/0RZgz/R
+zTVnaH4TB0rQc2kOQ0hlbjQ/zkhkaHm25snHGVgggSDQpVuSXLMxQYm8TA0oWVd2
+2DWVOlX1zumP2AggugxJnw==
+-----END PRIVATE KEY-----

+ 27 - 0
php/app/cert/pri_key.pem

@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA3HB+JLSL6yysDS0TQCTa2gxXP8Epc5c5Cd0UHqXD7hcCOjSH
+xAOtm3F9rG1rC33CQ5B8wP7Pfn3KM+WchWC1urJJMLuFXUB8WxqxHiMAWoEDWkLc
+eE+qQVBDnrITu2GW3QCzJc5/XZy+AmKzhQF4kgRFP3t0yBoyF+S1KUvJ+muQLee/
+k7anV8bSSKJH5WZStvqQhY3xKv2oK/FZhwiXjzqRfXLy1ut/33Tz4w58/HblEMNu
+VC6kSEVoYXf7RH+D4eHY4It29LJQgjp2CFtznTAZZebxw+t+Xy7jI9ZtupcJq4G7
+IDzZiUn2NYCsjzLeNqFqMMqaG9XgJnZlus/PqwIDAQABAoIBAQCgkiiwn/sTkXS6
+HE1bef0Yu8iKHjANjOf1cV6IfILd2VC8CSuj8nHxOpgqk4FX24E4KfVVt8Z5AzPY
+3bZHyYxWtCtwHgglRyXOTwEZTLGjOzqv8ugZkx4XeVnoLRsGcS2tSic0sNhB3jzi
+C/dsOQgUhJvUhB8q6zn2AZicviIgEAPRAvWC75fVZJMadX4MlGIisrczbFnyK31N
+1GoCeV72mVMxijtyZzeSe0rMp83CQUGrrUbySXf+Hjanth0k9An4HprDmrFBDmyj
+7iw04zjpk6FdzldgdUMJadUj292efwE5Q2dAbhjbdVTMb4hPZ6O4TouxhmR8PR7+
+TIQAKeRxAoGBAPHTj0Wz2o5aoR4pcvd1nscXLg2aYlEcYSLNgWHYUIc9BLLG6VuV
+H/XaSgNaWgWMbE06KhYd8sLnqEUrQUWlywels1Z9ovaZpaxTfNtod0j/Av/bU6op
+mLPGXZcjQUZZN81Ik8n/BOAC9GXioRgkR42DE36Zukq5BEm07u20rUsfAoGBAOlc
+CTmGFXZuq+JPS39Q7nPfcAzHm6dFuHaEpF8qTxPkjeoQ/zg6bxwDajYhUkkod3RS
+dZgX8ZXaSkq5TcZYdZO2MwUX5iXhEAV60icbv8FmOEf2iW14IMWQLdo7HYySHV+2
+vly0Wb3R5G7RxbIh1oCW+GOwywO0nzno1AuT5rX1AoGAB/On82fNmP6764z7Xc29
+UdieSA46i2Y+f3F4fqopQ7kq7WIDDGLj8SajZmbTLPmIGiX+ekmz0NrjOpsIg2zH
+N1IoioCJGkjFHNyF74UI3xqbk6Q3pRHHFqpAK5caL2EBp7tqOKstEtymAq+oEm4m
++C1GN9SAPrLExFOxw5k8VYsCgYEA0m6WOvM4g3XFNey/be2zOXYxerS9Hhf3AZkX
+CGIEsTGW742oODIpY5+ItYtSwnnlTlXViPN+fN09xShYhBXc4PiaBWvJtDrB0c8x
+lualAmeFNQ+SWc7L7pvXXUWVnd9c8aS/AKX5jvyo+23a0olE/uwkzPDuAUdtljDo
+lhAnKckCgYACs8wMd1DY7MgkuDk1nIIk+1omcapuGrhvWzim7QvW6bQzrugjyhqe
+CbrgAOZHo7vf/qD/Ar9q3DFAuwnRDd6D0WlmV/GPhydfhJCXl2W1EGgNcjpwB89S
+1MFVjhKdNsoDJbtqoB9VsPc1IREmvOl4kEf0VvJGfHQrp0Cwc4Xcag==
+-----END RSA PRIVATE KEY-----

+ 9 - 0
php/app/cert/pub_key.pem

@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3HB+JLSL6yysDS0TQCTa
+2gxXP8Epc5c5Cd0UHqXD7hcCOjSHxAOtm3F9rG1rC33CQ5B8wP7Pfn3KM+WchWC1
+urJJMLuFXUB8WxqxHiMAWoEDWkLceE+qQVBDnrITu2GW3QCzJc5/XZy+AmKzhQF4
+kgRFP3t0yBoyF+S1KUvJ+muQLee/k7anV8bSSKJH5WZStvqQhY3xKv2oK/FZhwiX
+jzqRfXLy1ut/33Tz4w58/HblEMNuVC6kSEVoYXf7RH+D4eHY4It29LJQgjp2CFtz
+nTAZZebxw+t+Xy7jI9ZtupcJq4G7IDzZiUn2NYCsjzLeNqFqMMqaG9XgJnZlus/P
+qwIDAQAB
+-----END PUBLIC KEY-----

+ 31 - 0
php/app/command/Hello.php

@@ -0,0 +1,31 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\command;
+
+use think\console\Command;
+use think\console\Input;
+use think\console\input\Argument;
+use think\console\input\Option;
+use think\console\Output;
+
+class Hello extends Command
+{
+    protected function configure()
+    {
+        // 指令配置
+        $this->setName('hello')
+            ->setDescription('the hello command');        
+    }
+
+    protected function execute(Input $input, Output $output)
+    {
+
+//        var_dump($input);
+//        var_dump($output);
+
+        $result=date("Y-m-d", strtotime("-1 month", strtotime("2017-03-31")));
+    	// 指令输出
+    	$output->writeln($result);
+    }
+}

+ 70 - 0
php/app/command/Timer.php

@@ -0,0 +1,70 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\command;
+
+use think\console\Command;
+use think\console\Input;
+use think\console\input\Argument;
+use think\console\input\Option;
+use think\console\Output;
+use Workerman\Worker;
+
+class Timer extends Command
+{
+//    定时器
+    protected $timer;
+    protected $interval = 2;
+    protected function configure()
+    {
+        $this->setName('timer')
+            ->addArgument('status', Argument::REQUIRED, 'start/stop/reload/status/connections')
+            ->addOption('d', null, Option::VALUE_NONE, 'daemon(守护进程)方式启动')
+            ->addOption('i', null, Option::VALUE_OPTIONAL, '多长时间执行一次')
+            ->setDescription('开启/关闭/重启 定时任务');
+        // 指令配置
+//        $this->setName('timer')
+//            ->setDescription('the timer command');
+    }
+
+    protected function init(Input $input, Output $output)
+    {
+        global $argv;
+        if ($input->hasOption('i'))
+            $this->interval = floatval($input->getOption('i'));
+        $argv[1] = $input->getArgument('status') ?: 'start';
+        if ($input->hasOption('d')) {
+            $argv[2] = '-d';
+        } else {
+            unset($argv[2]);
+        }
+    }
+    protected function execute(Input $input, Output $output)
+    {
+        $this->init($input, $output);
+        //创建定时器任务
+        $task = new Worker();
+        $task->count = 1;
+        $task->onWorkerStart = [$this, 'start'];
+        $task->runAll();
+    }
+    public function start()
+    {
+        $last = time();
+        $task = [6 => $last, 10 => $last, 30 => $last, 60 => $last, 180 => $last, 300 => $last];
+
+        $this->timer = \Workerman\Lib\Timer::add($this->interval, function () use (&$task) {
+            //每隔2秒执行一次
+            try {
+                $now = time();
+                foreach ($task as $sec => $time) {
+                    if ($now - $time >= $sec) {
+                        //每隔$sec秒执行一次
+                        $task[$sec] = $now;
+                    }
+                }
+            } catch (\Throwable $e) {
+            }
+        });
+    }
+}

+ 371 - 0
php/app/common.php

@@ -0,0 +1,371 @@
+<?php
+// +----------------------------------------------------------------------
+// | 应用公共文件
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: 
+// +----------------------------------------------------------------------
+
+
+use \think\facade\Db; 
+
+error_reporting(0);
+
+/**
+ * @return mixed
+ * 获取站点信息
+ */
+if (!function_exists('site_name')) {
+
+    function site_name()
+    {
+        return Db::name('config')->where('code', 'site_name')
+            ->value('value');
+    }
+}
+
+if (!function_exists('site_logo')) {
+
+    function site_logo()
+    {
+        return Db::name('config')->where('code', 'site_logo')
+            ->value('value');
+    }
+}
+//获取配置信息
+if (!function_exists('getConfigByCode')) {
+
+    function getConfigByCode($code)
+    {
+        return Db::name('config')->where('code', $code)
+            ->value('value');
+
+    }
+}
+/*
+ * 百度编辑器内容 多个编辑器单独引入js,重复会导致出错
+ */
+if (!function_exists('build_ueditor_js')) {
+    function build_ueditor_js(){
+    /* 配置界面语言 */
+    switch (config('default_lang')) {
+        case 'zh-cn':
+            $lang = '/static/plugins/ueditor/lang/zh-cn/zh-cn.js';
+            break;
+        case 'en-us':
+            $lang =  '/static/plugins/ueditor/lang/en/en.js';
+            break;
+        default:
+            $lang = '/static/plugins/ueditor/lang/zh-cn/zh-cn.js';
+            break;
+    }
+     return $include_js = '<script type="text/javascript" charset="utf-8" src="/static/plugins/ueditor/ueditor.config.js"></script> <script type="text/javascript" charset="utf-8" src="/static/plugins/ueditor/ueditor.all.min.js""> </script><script type="text/javascript" charset="utf-8" src="' . $lang . '"></script>';
+    }
+}
+
+if (!function_exists('build_ueditor')) {
+function build_ueditor($params = array())
+{
+    $name = isset($params['name']) ? $params['name'] : null;
+    $theme = isset($params['theme']) ? $params['theme'] : 'normal';
+    $content = isset($params['content']) ? $params['content'] : null;
+    //http://fex.baidu.com/ueditor/#start-toolbar
+    /* 指定使用哪种主题 */
+    $themes = array(
+        'normal' => "[   
+           'fullscreen', 'source', '|', 'undo', 'redo', '|',
+            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
+            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
+            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
+            'directionalityltr', 'directionalityrtl', 'indent', '|',
+            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
+            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
+            'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
+            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
+            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
+            'print', 'preview', 'searchreplace', 'drafts', 'help'
+       ]", 'simple' => " ['fullscreen', 'source', 'undo', 'redo', 'bold']",
+    );
+    switch ($theme) {
+        case 'simple':
+            $theme_config = $themes['simple'];
+            break;
+        case 'normal':
+            $theme_config = $themes['normal'];
+            break;
+        default:
+            $theme_config = $themes['normal'];
+            break;
+    }
+
+    if(!isset($params['type']) || (isset($params['type']) && $params['type']==0)  ){
+
+        $include_js = build_ueditor_js();
+    }elseif($params['type']==1 ){
+        $include_js = '';
+    }
+
+    $content = json_encode($content);
+    $str = <<<EOT
+$include_js
+<script type="text/javascript">
+var ue_{$name} = UE.getEditor('{$name}',{
+    toolbars:[{$theme_config}],
+        });
+
+    if($content){
+ue_{$name}.ready(function() {
+       this.setContent($content);	
+})
+   }
+      
+</script>
+EOT;
+    return $str;
+}
+}
+
+if (!function_exists('p')) {
+    function p($var, $die = 0) {
+        print_r($var);
+        $die && die();
+    }
+}
+if (!function_exists('isMobile')) {
+    function isMobile()
+    {
+        if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])) {
+            return true;
+        }
+        if (isset ($_SERVER['HTTP_VIA'])) {
+            return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false;
+        }
+        if (isset ($_SERVER['HTTP_USER_AGENT'])) {
+            $clientkeywords = array('nokia',
+                'sony',
+                'ericsson',
+                'mot',
+                'samsung',
+                'htc',
+                'sgh',
+                'lg',
+                'sharp',
+                'sie-',
+                'philips',
+                'panasonic',
+                'alcatel',
+                'lenovo',
+                'iphone',
+                'ipod',
+                'blackberry',
+                'meizu',
+                'android',
+                'netfront',
+                'symbian',
+                'ucweb',
+                'windowsce',
+                'palm',
+                'operamini',
+                'operamobi',
+                'openwave',
+                'nexusone',
+                'cldc',
+                'midp',
+                'wap',
+                'mobile'
+            );
+            if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))) {
+                return true;
+            }
+        }
+        if (isset ($_SERVER['HTTP_ACCEPT'])) {
+            if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html')))) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
+
+if (!function_exists("json_result")){
+    /** 返回接送 接口
+     * @param int $code
+     * @param string $msg
+     * @param $data
+     */
+    function json_result($code=200,$msg="",$data=""){
+
+        $dat["code"]=$code;
+        $dat["msg"]=$msg;
+        $dat["data"]=$data;
+        $json=json_encode($dat);
+        echo $json;exit();
+    }
+}
+/**
+ * 生成操作按钮
+ * @param array $operate 操作按钮数组
+ */
+if (!function_exists("showOperate")){
+    function showOperate($operate = [])
+    {
+        if(empty($operate)){
+            return '';
+        }
+        $option = <<<EOT
+    <div class="btn-group">
+        <button class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
+            操作 <span class="caret"></span>
+        </button>
+        <ul class="dropdown-menu">
+EOT;
+
+        foreach($operate as $key=>$vo){
+
+            $option .= '<li><a href="'.$vo.'">'.$key.'</a></li>';
+        }
+        $option .= '</ul></div>';
+
+        return $option;
+    }
+}
+
+if (!function_exists("time2string")){
+    function time2string($second){
+        $day = floor($second/(3600*24));
+        $second = $second%(3600*24);//除去整天之后剩余的时间
+        $hour = floor($second/3600);
+        $second = $second%3600;//除去整小时之后剩余的时间
+        $minute = floor($second/60);
+        $second = $second%60;//除去整分钟之后剩余的时间
+        //返回字符串
+        return $day.'天'.$hour.'小时';
+    }
+}
+if (!function_exists("is_admin")){
+    function is_admin(){
+       $session= \think\facade\Session::get("admin");
+       $admin=$session->toArray();
+       if ($admin["project"]){
+           return $admin["project"];
+       }else{
+           return false;
+       }
+
+    }
+}
+
+// 成绩转换 成数字
+if (!function_exists("achievement_switch")){
+    function achievement_switch($name){
+        $age=0;
+
+      switch ($name){
+          case "A":$age=4;break;
+          case "a":$age=4;break;
+          case "B":$age=3;break;
+          case "b":$age=3;break;
+          case "C":$age=2;break;
+          case "c":$age=2;break;
+          case "D":$age=1;break;
+          case "d":$age=1;break;
+          case "F":$age=0;break;
+          case "f":$age=0;break;
+      }
+      return $age;
+    }
+}
+
+
+// 成绩转换成 单词
+if (!function_exists("achievement_change")){
+    function achievement_change($name){
+        $age="F";
+        switch ($name){
+            case 4: $age="A";break;
+            case 3: $age="B";break;
+            case 2: $age="C";break;
+            case 1: $age="D";break;
+            case 0: $age="F";break;
+            case -1: $age="录入中";break;
+        }
+        return $age;
+    }
+}
+
+
+// 等级换算
+if (!function_exists("star_deng")){
+    function star_deng($name){
+        $age="初出茅庐";
+        switch ($name){
+            case 0: $age="初出茅庐";break;
+            case 1: $age="心令神会";break;
+            case 2: $age="出类拔萃";break;
+            case 3: $age="名列前茅";break;
+            case 4: $age="百里挑一";break;
+        }
+        return $age;
+    }
+}
+
+
+// 升星标准
+if (!function_exists("star_class")){
+    function star_class($name){
+        $age=0;
+
+       if ($name>=3.4){
+           $age=5;
+       }elseif ($name>=2.8&&$name<3.4){
+           $age=4;
+       }elseif ($name>=2.2&&$name<2.8){
+           $age=3;
+       }elseif ($name>=1.6&&$name<2.2){
+           $age=2;
+       }elseif ($name>=1&&$name<1.5){
+           $age=1;
+       }
+
+
+        return $age;
+    }
+}
+// 专业等级
+if (!function_exists("major_levels")){
+    function major_levels($num,$subject_id){
+        $where[]=["max",">=",$num];
+        $where[]=["subject_id","=",$subject_id];
+        $type=Db::name("major_level")->order("type asc")->where($where)->find();
+        if (!$type){
+            if ($num>0){
+                return 4;
+            }else{
+                return 0;
+            }
+        }
+        return $type["type"];
+    }
+}
+
+function sortArr($arrays,$sort_key,$sort_order=SORT_ASC,$sort_type=SORT_NUMERIC ){
+    $key_arrays =array();
+    if(is_array($arrays)){
+        foreach ($arrays as $array){
+            if(is_array($array)){
+                $key_arrays[] = $array[$sort_key];
+            }else{
+                return false;
+            }
+        }
+    }else{
+        return false;
+    }
+    array_multisort($key_arrays,$sort_order,$sort_type,$arrays);
+    return $arrays;
+}
+
+

+ 84 - 0
php/app/common/controller/Aliyunoss.php

@@ -0,0 +1,84 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: EDZ
+ * Date: 2020/4/24
+ * Time: 10:48
+ */
+
+namespace app\common\controller;
+use OSS\Core\OssException;
+use OSS\OssClient;
+use think\Config;
+use think\Controller;
+use think\Image;
+use think\Request;
+
+class Aliyunoss
+{
+    public function config()
+    {
+        $config = [ 'KeyId'      => 'LTAIRkRNTUDJKj4Q',  //Access Key ID
+                    'KeySecret'  => 'wwzTpuOeQPIpPgSpEG6n5MskPDs4CX',  //Access Key Secret
+                    'Endpoint'   => 'oss-cn-huhehaote.aliyuncs.com',  //阿里云oss 外网地址endpoint
+                    'Bucket'     => 'quyum',  //Bucket名称
+//                    'hostname'     => 'quyum.oss-cn-huhehaote.aliyuncs.com',  //Bucket 域名
+        ];
+
+//        $config = [ 'KeyId'      => 'LTAI4GL7qTQwwU87nMsmAKmU',  //Access Key ID
+//            'KeySecret'  => '9ma10M1M3AgKjMSrYiMf5DgKr4jvWr',  //Access Key Secret
+//            'Endpoint'   => 'oss-cn-beijing.aliyuncs.com',  //阿里云oss 外网地址endpoint
+//            'Bucket'     => 'jiangnanmeiren',  //Bucket名称
+//        ];
+        return $config;
+    }
+
+    public function uploadFile($file)
+    {
+//        $resResult = Image::open($file);
+        $resResult=$file;
+//            dump($file);die();
+        // 尝试执行
+        try {
+            $config = $this->config(); //获取Oss的配置
+            //实例化对象 将配置传入
+            $ossClient = new OssClient($config['KeyId'], $config['KeySecret'], $config['Endpoint']);
+            //这里是有sha1加密 生成文件名 之后连接上后缀
+//            $fileName = sha1(date('YmdHis', time()) . uniqid()) . '.' . $resResult->type();
+            $fileName ="guanwang/". sha1(date('YmdHis', time()) . uniqid()) . '.' . "png";
+            //执行阿里云上传
+//            $result = $ossClient->uploadFile($config['Bucket'], $fileName, $file->getInfo()['tmp_name']);
+            $result = $ossClient->uploadFile($config['Bucket'], $fileName, $file['tmp_name']);
+        } catch (OssException $e) {
+            return $e->getMessage();
+        }
+//        dump($result);die();
+        //将结果输出
+        return $result['info']['url'];
+    }
+
+    //视频
+    public function uploadVideo($file)
+    {
+        //上传视频到阿里云OSS
+        $name = $file['name'];
+        $format = strrchr($name, '.');
+        $fileName = uniqid() . $format;
+        //获取配置
+        $config = $this->config(); //获取Oss的配置
+        $ossClient = new OssClient($config['KeyId'], $config['KeySecret'], $config['Endpoint']);
+        $uploadToAliyunOss = $ossClient->uploadFile($config['Bucket'], $fileName, $file['tmp_name']);
+
+        if ($uploadToAliyunOss) {
+            // 上传成功返回路径
+            return $uploadToAliyunOss['info']['url'];
+        } else {
+            // 上传失败,打印错误信息
+            halt($uploadToAliyunOss);
+        }
+    }
+}
+
+
+
+

+ 184 - 0
php/app/common/controller/Backend.php

@@ -0,0 +1,184 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/21
+ */
+
+namespace app\common\controller;
+
+use app\admin\model\Admin;
+use app\admin\model\AuthRule;
+use app\common\controller\base;
+use lemo\helper\FileHelper;
+use lemo\helper\SignHelper;
+use think\facade\Db;
+use think\facade\Request;
+use think\facade\Session;
+use think\facade\View;
+class Backend extends \app\common\controller\Base
+{
+    public $pageSize=15;
+    public $menu = '';
+    public $adminRules='';
+    public $hrefId='';
+    public $quanxian;
+    public $adminid;
+    public $project;
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+        //判断管理员是否登录
+        if (!session('admin.id') && !session('admin')) {
+            $this->redirect(url('/admin/login/index'));
+        }
+        $this->authCheck();
+        $this->quanxian=\session("quanxian");
+        $this->adminid=\session("adminid");
+        $this->project=\session("project");
+    }
+
+    /**
+     * 验证权限
+     */
+    public function authCheck(){
+
+        $allow = [
+            'index/index',
+            'index/main',
+            'index/cleardata',
+            'index/logout',
+            'login/password',
+        ];
+        $route = strtolower(Request::controller()).'/'.strtolower(Request::action());
+        if(session('admin.id')!==1){
+            $this->hrefId = Db::name('auth_rule')->where('href',$route)->value('id');
+            //当前管理员权限
+            $map['a.id'] = Session::get('admin.id');
+
+            $rules=Db::name('admin')->alias('a')
+                ->join('auth_group ag','a.group_id = ag.id','left')
+                ->where($map)
+                ->value('ag.rules');
+            //用户权限规则id
+            $adminRules = explode(',',$rules);
+            // 不需要权限的规则id;
+            $noruls = AuthRule::where('auth_open',1)->column('id');
+            $this->adminRules = array_merge($adminRules,$noruls);
+            if($this->hrefId){
+                // 不在权限里面,并且请求为post
+                if(!in_array($this->hrefId,$this->adminRules)){
+                    $this->error(lang('permission denied'));exit();
+                }
+            }else{
+                if(!in_array($route,$allow)) {
+                    $this->error(lang('permission denied'));
+                    exit();
+                }
+
+            }
+        }
+        return $this->adminRules;
+
+    }
+    /**
+     * 退出登录
+     */
+    public function logout()
+    {
+        Session::clear();
+        $this->success(lang('logout success'), '@admin/login');
+    }
+
+    /*
+     * 修改密码
+     */
+    public function password(){
+        if (!Request::isPost()){
+
+            return View::fetch('login/password');
+
+        }else{
+            if( Request::isPost() and Session::get('admin.id')===3){
+                $this->error(lang('test data cannot edit'));
+            }
+
+            $data =  Request::post();
+            $oldpassword = Request::post('oldpassword', '123456', 'lemo\helper\StringHelper::filterWords');
+            $admin = Admin::find($data['id']);
+            if(!password_verify($oldpassword, $admin['password'])){
+                $this->error(lang('origin password error'));
+            }
+            $password = Request::post('password', '123456','lemo\helper\StringHelper::filterWords');
+            try {
+                $data['password'] = password_hash($password,PASSWORD_BCRYPT, SignHelper::passwordSalt());
+
+                if(Session::get('admin.id')==1){
+                    Admin::update($data);
+                }elseif(Session::get('admin.id')==$data['id']){
+                    Admin::update($data);
+                }else{
+                    $this->error(lang('permission denied'));
+                }
+
+            } catch (\Exception $e) {
+                $this->error($e->getMessage());
+            }
+            $this->success(lang('edit success'));
+
+        }
+    }
+    public function base(){
+        if (!Request::isPost()){
+            return View::fetch('admin/password');
+        }else{
+            $data =  Request::post();
+            $admin = Admin::find($data['id']);
+            $oldpassword = Request::post('oldpassword', '123456', 'lemo\helper\StringHelper::filterWords');
+            if(!password_verify($oldpassword, $admin['password'])){
+                $this->error(lang('origin password error'));
+            }
+            $password = Request::post('password', '123456','lemo\helper\StringHelper::filterWords');
+            try {
+                $data['password'] = password_hash($password,PASSWORD_BCRYPT, SignHelper::passwordSalt());
+
+                if(Session::get('admin.id')==1){
+                    Admin::update($data);
+                }elseif(Session::get('admin.id')==$data['id']){
+                    Admin::update($data);
+                }else{
+                    $this->error(lang('permission denied'));
+                }
+
+            } catch (\Exception $e) {
+                $this->error($e->getMessage());
+            }
+            $this->success(lang('edit success'));
+
+        }
+    }
+
+    /*
+     * 清除缓存 出去session缓存
+     */
+    public function clearData(){
+        $dir = config('admin.clear_cache_dir') ? app()->getRootPath().'runtime/admin' : app()->getRootPath().'runtime';
+        $cache = app()->getRootPath().'runtime/cache';
+        if(is_dir($cache)){
+            FileHelper::delDir($cache);
+        }
+        if(FileHelper::delDir($dir) ){
+            $this->success('清除成功');
+        }
+    }
+
+
+
+
+}

+ 45 - 0
php/app/common/controller/Base.php

@@ -0,0 +1,45 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/21
+ */
+
+
+namespace app\common\controller;
+
+use app\BaseController;
+use think\facade\Request;
+use think\facade\Cookie;
+class Base extends BaseController
+{
+
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+    public function enlang()
+    {
+        $lang = Request::get('lang');
+        switch ($lang) {
+            case 'zh-cn':
+                Cookie::set('cookie_var', 'zh-cn');
+                break;
+            case 'en-us':
+                Cookie::set('cookie_var', 'en-us');
+                break;
+            default:
+                Cookie::set('cookie_var', 'zh-cn');
+                break;
+        }
+        $this->success('切换成功');
+    }
+
+}

+ 29 - 0
php/app/common/controller/Frontend.php

@@ -0,0 +1,29 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/21
+ */
+
+
+namespace app\common\controller;
+
+use app\BaseController;
+use think\facade\Request;
+use think\facade\Cookie;
+class Frontend extends BaseController
+{
+
+    public function initialize()
+    {
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
+
+
+}

+ 18 - 0
php/app/common/controller/Token.php

@@ -0,0 +1,18 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Administrator
+ * Date: 2020/1/10
+ * Time: 13:18
+ */
+
+namespace app\common\controller;
+
+
+class Token
+{
+ // TODO token
+
+
+
+}

+ 47 - 0
php/app/common/controller/Wxs.php

@@ -0,0 +1,47 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Administrator
+ * Date: 2020/2/14
+ * Time: 13:26
+ */
+
+namespace app\common\controller;
+
+
+use EasyWeChat\Factory;
+
+class Wxs
+{
+  // 微信支付相关信息
+//    public static $url="127.0.0.1:8989/index/notify/";// 支付回调地址
+    public static $url="http://ssoe.symc.edu.cn:8989/index/notify/";// 支付回调地址
+
+    /**
+     * @param string $body  支付说明
+     * @param string $out_trade_no 订单编号
+     * @param string $total_fee 支付金额
+     * @param string $openid openid
+     * @param string $notify_url 回调地址
+     * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
+     * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
+     * @throws \GuzzleHttp\Exception\GuzzleException
+     */
+    public static function pay($body="医学院-重修充值",$out_trade_no="",$total_fee="",$openid="",$notify_url="")
+    {
+        $config= require( APP_PATHS."payconfig.php");
+        $money=$total_fee*100;
+        $app = Factory::payment($config);
+        $result = $app->order->unify([
+            'body' =>$body,
+            'out_trade_no' =>$out_trade_no,
+            'total_fee' => $money,
+            'spbill_create_ip' =>request()->ip(), // 可选,如不传该参数,SDK 将会自动获取相应 IP 地址
+            'notify_url' => self::$url.$notify_url, // 支付结果通知网址,如果不设置则会使用配置里的默认地址
+            'trade_type' => 'JSAPI', // 请对应换成你的支付方式对应的值类型
+            'openid' => $openid,
+        ]);
+        return $result;
+//        var_dump($result);
+    }
+}

+ 44 - 0
php/app/common/model/BaseModel.php

@@ -0,0 +1,44 @@
+<?php
+
+
+namespace app\common\model;
+
+use think\facade\Config;
+use think\Model;
+
+class BaseModel extends Model
+{
+    /**
+     * @var bool 自动写入2019年8月14日 12:32:24
+     */
+    protected $autoWriteTimestamp = true;
+    protected $createTime = 'create_time';
+    protected $updateTime = 'update_time';
+
+    public function __construct(array $data = [])
+    {
+        parent::__construct($data);
+
+    }
+
+    public static function getList($where = array(), $pageSize, $order = ['sort', 'id' => 'desc'])
+    {
+        return self::where($where)->where($order)->select();
+
+    }
+
+    public static function getOne($id)
+    {
+
+        return self::find($id);
+    }
+
+    //表前缀
+    public static function get_table_prefix(){
+
+        return Config::get('database.connections.mysql.prefix');
+
+
+    }
+    
+}

+ 14 - 0
php/app/common/model/Common.php

@@ -0,0 +1,14 @@
+<?php
+
+
+
+namespace app\common\model;
+
+class Common extends BaseModel {
+
+    public function __construct(array $data = [])
+    {
+        parent::__construct($data);
+    }
+
+}

+ 11 - 0
php/app/common/model/Config.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace app\common\model;
+class Config extends Common
+{
+    public function __construct(array $data = [])
+    {
+        parent::__construct($data);
+    }
+
+}

+ 23 - 0
php/app/common/model/ConfigGroup.php

@@ -0,0 +1,23 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/10/26
+ */
+
+
+namespace app\common\model;
+class ConfigGroup extends Common
+{
+    public function __construct(array $data = [])
+    {
+        parent::__construct($data);
+    }
+
+}

+ 19 - 0
php/app/common/model/FieldType.php

@@ -0,0 +1,19 @@
+<?php
+
+
+namespace app\common\model;
+
+use app\common\model\Common;
+use app\common\model\Module as M;
+use think\facade\Config;
+
+class FieldType extends Common {
+
+    public function __construct(array $data = [])
+    {
+        parent::__construct($data);
+    }
+
+
+
+}

+ 23 - 0
php/app/common/model/User.php

@@ -0,0 +1,23 @@
+<?php
+/**
+ * lemocms
+ * ============================================================================
+ * 版权所有 2018-2027 lemocms,并保留所有权利。
+ * 网站地址: https://www.lemocms.com
+ * ----------------------------------------------------------------------------
+ * 采用最新Thinkphp6实现
+ * ============================================================================
+ * Author: yuege
+ * Date: 2019/9/2
+ */
+namespace app\common\model;
+
+class  User extends Common{
+
+    public function __construct(array $data = [])
+    {
+        parent::__construct($data);
+    }
+
+
+}

+ 19 - 0
php/app/error/controller/Error.php

@@ -0,0 +1,19 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Administrator
+ * Date: 2020/3/26
+ * Time: 15:33
+ */
+
+namespace app\error\controller;
+
+
+class Error
+{
+    public function __call($methid,$args)
+    {
+        dump(1111111111);
+
+ }
+}

+ 18 - 0
php/app/event.php

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

+ 18 - 0
php/app/middleware.php

@@ -0,0 +1,18 @@
+<?php
+
+return [
+    // 全局请求缓存 验证码会报错不显示,千万不要释放注释
+    // \think\middleware\CheckRequestCache::class,
+    // 多语言加载
+//     \think\middleware\LoadLangPack::class,
+    // Session初始化 //
+     \think\middleware\SessionInit::class,
+    // 跨域请求支持
+    \think\middleware\AllowCrossDomain::class,
+
+//    \think\middleware\FormTokenCheck::class,
+// 访问限制
+//    \think\middleware\Throttle::class,
+
+    \think\addons\middleware\Addons::class,
+];

+ 0 - 0
php/app/middleware/Notken.php


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff