作者 王晓刚
1 个管道 的构建 通过 耗费 4 秒

自动部署

正在显示 41 个修改的文件 包含 4307 行增加166 行删除

要显示太多修改。

为保证性能只显示 41 of 41+ 个文件。

# ���� stages
stages:
- pull
# ���� job
job1:
stage: pull
script:
- cd /alidata/www/fast/advertising
- git pull
\ No newline at end of file
... ...
... ... @@ -32,6 +32,7 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-captcha" />
<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-installer" />
</content>
<orderEntry type="inheritedJdk" />
... ...
... ... @@ -33,6 +33,7 @@
<path value="$PROJECT_DIR$/vendor/mtdowling/cron-expression" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
<path value="$PROJECT_DIR$/vendor/topthink/think-image" />
</include_path>
</component>
</project>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="309ad746-5b2a-4c29-af46-e7925a35765c" name="默认的" comment="" />
<list default="true" id="309ad746-5b2a-4c29-af46-e7925a35765c" name="默认的" comment="">
<change afterPath="$PROJECT_DIR$/.gitlab-ci.yml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/common/controller/WechatBase.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/extra/wechat.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/Collect.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/Goods.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/Index.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/Member.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/Question.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/Server.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/Share.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/Upload.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/controller/User.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/model/Goods.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/model/Question.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/model/Slide.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/model/User.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/application/home/model/UserQuestionAnswer.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/advertising.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/advertising.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/application/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/application/config.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/config.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/composer.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/autoload.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/autoload.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/composer/ClassLoader.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/ClassLoader.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/composer/LICENSE" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/LICENSE" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/composer/autoload_files.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/autoload_files.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/composer/autoload_psr4.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/autoload_psr4.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/composer/autoload_real.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/autoload_real.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/composer/autoload_static.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/autoload_static.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/composer/installed.json" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/installed.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/.php_cs.dist" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/.travis.yml" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/.travis.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Factory/AbstractHttpMessageFactoryTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Factory/AbstractHttpMessageFactoryTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Factory/PsrHttpFactoryTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Factory/PsrHttpFactoryTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Response.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Response.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/Tests/Functional/CovertTest.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge/composer.json" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
... ... @@ -12,9 +62,150 @@
<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 leaf-file-name="Index.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1258">
<caret line="82" column="9" selection-start-line="82" selection-start-column="9" selection-end-line="82" selection-end-column="9" />
<folding>
<element signature="e#128#165#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Member.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/Member.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1218">
<caret line="284" column="11" selection-start-line="284" selection-start-column="11" selection-end-line="284" selection-end-column="11" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name=".gitlab-ci.yml" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/.gitlab-ci.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="8" column="38" selection-start-line="8" selection-start-column="38" selection-end-line="8" selection-end-column="38" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Goods.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="28" selection-end-column="5" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Share.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/Share.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2533">
<caret line="156" column="31" selection-start-line="156" selection-start-column="31" selection-end-line="156" selection-end-column="31" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Server.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/Server.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1088">
<caret line="71" column="29" selection-start-line="71" selection-start-column="29" selection-end-line="71" selection-end-column="29" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Question.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/Question.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="573">
<caret line="191" column="4" selection-start-line="191" selection-start-column="4" selection-end-line="191" selection-end-column="4" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="UserQuestionAnswer.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/model/UserQuestionAnswer.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="13" column="6" selection-start-line="13" selection-start-column="6" selection-end-line="13" selection-end-column="6" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Question.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/model/Question.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="13" column="6" selection-start-line="13" selection-start-column="6" selection-end-line="13" selection-end-column="6" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="User.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2040">
<caret line="129" column="11" selection-start-line="104" selection-start-column="8" selection-end-line="129" selection-end-column="11" />
<folding>
<element signature="e#128#160#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</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$/application/common/controller/WechatBase.php" />
<option value="$PROJECT_DIR$/application/extra/wechat.php" />
<option value="$PROJECT_DIR$/application/home/model/Goods.php" />
<option value="$PROJECT_DIR$/application/config.php" />
<option value="$PROJECT_DIR$/application/home/model/Slide.php" />
<option value="$PROJECT_DIR$/application/home/model/Question.php" />
<option value="$PROJECT_DIR$/application/common.php" />
<option value="$PROJECT_DIR$/application/home/model/User.php" />
<option value="$PROJECT_DIR$/application/home/model/User_question_answer.php" />
<option value="$PROJECT_DIR$/application/home/model/UserQuestionAnswer.php" />
<option value="$PROJECT_DIR$/application/home/controller/Index.php" />
<option value="$PROJECT_DIR$/application/home/controller/Goods.php" />
<option value="$PROJECT_DIR$/application/home/controller/Collect.php" />
<option value="$PROJECT_DIR$/application/home/controller/Upload.php" />
<option value="$PROJECT_DIR$/application/home/controller/User.php" />
<option value="$PROJECT_DIR$/application/home/controller/Share.php" />
<option value="$PROJECT_DIR$/application/home/controller/Server.php" />
<option value="$PROJECT_DIR$/application/home/controller/Question.php" />
<option value="$PROJECT_DIR$/application/home/controller/Member.php" />
<option value="$PROJECT_DIR$/.gitlab-ci.yml" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
... ... @@ -71,6 +262,7 @@
<path value="$PROJECT_DIR$/vendor/mtdowling/cron-expression" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
<path value="$PROJECT_DIR$/vendor/topthink/think-image" />
</include_path>
</component>
<component name="ProjectFrameBounds" extendedState="6">
... ... @@ -91,11 +283,6 @@
<item name="advertising" type="b2602c69:ProjectViewProjectNode" />
<item name="advertising" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="advertising" type="b2602c69:ProjectViewProjectNode" />
<item name="advertising" type="462c0819:PsiDirectoryNode" />
<item name="application" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
... ... @@ -105,11 +292,19 @@
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../xkeasy" />
<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="settings.editor.selected.configurable" value="terminal" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\wamp\www\advertising" />
<recent name="D:\wamp\www\advertising\application\home\controller" />
<recent name="D:\wamp\www\advertising\application\extra" />
<recent name="D:\wamp\www\advertising\application\common\controller" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
... ... @@ -133,26 +328,35 @@
<option name="presentableId" value="Default" />
<updated>1571030591762</updated>
<workItem from="1571030593119" duration="604000" />
<workItem from="1571099822000" duration="1331000" />
<workItem from="1571099822000" duration="1960000" />
<workItem from="1571186926430" duration="1295000" />
<workItem from="1571271975436" duration="599000" />
<workItem from="1571359737627" duration="3907000" />
<workItem from="1571618157790" duration="1203000" />
<workItem from="1571705047810" duration="3754000" />
<workItem from="1571790358186" duration="28939000" />
<workItem from="1571877780953" duration="28080000" />
<workItem from="1571963886703" duration="7057000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="1935000" />
<option name="totallyTimeSpent" value="77398000" />
</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.12260128" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.13113007" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="调试" order="7" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" weight="0.32997763" />
<window_info anchor="right" id="Database" order="3" />
<window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info anchor="bottom" id="Terminal" order="7" weight="0.32997763" />
<window_info anchor="bottom" id="运行" order="7" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
... ... @@ -172,6 +376,360 @@
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/application/home/model/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="14" column="1" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="7803">
<caret line="459" column="41" lean-forward="true" selection-start-line="459" selection-start-column="41" selection-end-line="459" selection-end-column="41" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2618">
<caret line="163" column="8" selection-start-line="163" selection-start-column="8" selection-end-line="172" selection-end-column="11" />
<folding>
<element signature="e#128#160#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="986">
<caret line="66" column="42" selection-start-line="66" selection-start-column="42" selection-end-line="66" selection-end-column="42" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/index/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="18" selection-start-line="21" selection-start-column="18" selection-end-line="21" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="15" column="22" lean-forward="true" selection-start-line="15" selection-start-column="22" selection-end-line="15" selection-end-column="22" />
<folding>
<element signature="e#128#165#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/common/controller/WechatBase.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="612">
<caret line="42" column="20" selection-start-line="42" selection-start-column="20" selection-end-line="42" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="833">
<caret line="57" column="37" lean-forward="true" selection-start-line="57" selection-start-column="37" selection-end-line="57" selection-end-column="37" />
<folding>
<element signature="e#128#160#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="14" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/extra/wechat.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="493">
<caret line="29" column="14" lean-forward="true" selection-start-line="29" selection-start-column="14" selection-end-line="29" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/index/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="18" selection-start-line="21" selection-start-column="18" selection-end-line="21" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/common/controller/WechatBase.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="24" column="6" selection-start-line="18" selection-start-column="4" selection-end-line="24" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="14" selection-start-line="14" selection-end-line="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/index/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="18" lean-forward="true" selection-start-line="21" selection-start-column="18" selection-end-line="21" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/common/controller/WechatBase.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="24" column="6" lean-forward="true" selection-start-line="18" selection-start-column="4" selection-end-line="24" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="14" selection-start-line="14" selection-end-line="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/public/.gitignore">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/addons/wechat/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-754">
<caret line="25" column="31" lean-forward="true" selection-start-line="25" selection-start-column="31" selection-end-line="25" selection-end-column="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/addons/wechat/library/Config.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/addons/wechat/Wechat.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="476">
<caret line="53" column="27" lean-forward="true" selection-start-line="53" selection-start-column="27" selection-end-line="53" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/addons/wechat/library/Wechat.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/application/index/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="18" selection-start-line="21" selection-start-column="18" selection-end-line="21" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/extra/wechat.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="18" column="50" selection-start-line="18" selection-start-column="50" selection-end-line="18" selection-end-column="50" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/common/controller/WechatBase.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="419">
<caret line="69" column="20" selection-start-line="69" selection-start-column="20" selection-end-line="69" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/thinkphp/library/think/Request.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="286" column="20" selection-start-line="286" selection-start-column="20" selection-end-line="286" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/model/Slide.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="15" column="51" selection-start-line="15" selection-start-column="51" selection-end-line="15" selection-end-column="51" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/model/Goods.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="27" column="45" lean-forward="true" selection-start-line="27" selection-start-column="45" selection-end-line="27" selection-end-column="45" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="20" column="58" selection-start-line="20" selection-start-column="58" selection-end-line="20" selection-end-column="58" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/validate/Category.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/validate/User.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/validate/UserGroup.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/validate/UserRule.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/validate/AuthRule.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-142" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="7803">
<caret line="459" column="41" selection-start-line="459" selection-start-column="41" selection-end-line="459" selection-end-column="41" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/model/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="14" column="1" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/model/Question.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="13" column="6" selection-start-line="13" selection-start-column="6" selection-end-line="13" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/model/UserQuestionAnswer.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="13" column="6" selection-start-line="13" selection-start-column="6" selection-end-line="13" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/controller/Ajax.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-4018" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/controller/Category.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-51" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Upload.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="425">
<caret line="31" column="5" lean-forward="true" selection-start-line="31" selection-start-column="5" selection-end-line="31" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1258">
<caret line="82" column="9" selection-start-line="82" selection-start-column="9" selection-end-line="82" selection-end-column="9" />
<folding>
<element signature="e#128#165#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Collect.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="708">
<caret line="55" column="30" selection-start-line="55" selection-start-column="30" selection-end-line="55" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/composer.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="391">
<caret line="29" column="6" selection-start-line="29" selection-start-column="6" selection-end-line="29" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2040">
<caret line="129" column="11" selection-start-line="104" selection-start-column="8" selection-end-line="129" selection-end-column="11" />
<folding>
<element signature="e#128#160#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Share.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2533">
<caret line="156" column="31" selection-start-line="156" selection-start-column="31" selection-end-line="156" selection-end-column="31" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Server.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1088">
<caret line="71" column="29" selection-start-line="71" selection-start-column="29" selection-end-line="71" selection-end-column="29" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="28" selection-end-column="5" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Question.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="573">
<caret line="191" column="4" selection-start-line="191" selection-start-column="4" selection-end-line="191" selection-end-column="4" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Member.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1218">
<caret line="284" column="11" selection-start-line="284" selection-start-column="11" selection-end-line="284" selection-end-column="11" />
<folding>
<element signature="e#130#167#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitlab-ci.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="8" column="38" selection-start-line="8" selection-start-column="38" selection-end-line="8" selection-end-column="38" />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ScopeChooserConfigurable.UI">
... ...
<?php
use \think\Db;
// 公共助手函数
if (!function_exists('__')) {
... ... @@ -362,3 +362,117 @@ if (!function_exists('hsv2rgb')) {
];
}
}
if (!function_exists('generate_user_token')) {
/**
* 生成token
* @param $userId
* @return string
*/
function generate_user_token($userId)
{
$userTokenQuery = Db::name("user_token")
->where('user_id', $userId);
$findUserToken = $userTokenQuery->find();
$currentTime = time();
$expireTime = $currentTime + 24 * 3600 * 180;
$token = md5(uniqid()) . md5(uniqid());
if (empty($findUserToken)) {
Db::name("user_token")->insert([
'token' => $token,
'user_id' => $userId,
'expiretime' => $expireTime,
'createtime' => $currentTime,
]);
} else {
Db::name("user_token")
->where('user_id', $userId)
->update([
'token' => $token,
'expiretime' => $expireTime,
'createtime' => $currentTime,
]);
}
return $token;
}
}
if(!function_exists('update_current_user')){
/**
* 更新当前登录前台用户的信息
* @param array $user 前台用户的信息
*/
function update_current_user($user)
{
session('user', $user);
}
}
if (!function_exists('get_current_user_id')) {
/**
* 获取当前登录前台用户id
* @return int
*/
function get_current_user_id()
{
$sessionUserId = session('user.id');
if (empty($sessionUserId)) {
return 0;
}
return $sessionUserId;
}
}
if (!function_exists('distance')) {
/**
* 根据经纬度计算两地的距离
* @param $work
* @param $user
* @return float|int
*/
function distance($work, $user)
{
$lng1 = $user['longitude'];//经度1
$lat1 = $user['latitude'];//纬度1
$lng2 = $work['longitude'];//经度2
$lat2 = $work['latitude'];//纬度2
$EARTH_RADIUS = 6378137; //地球半径
$RAD = pi() / 180.0;
$radLat1 = $lat1 * $RAD;
$radLat2 = $lat2 * $RAD;
$a = $radLat1 - $radLat2; // 两点纬度差
$b = ($lng1 - $lng2) * $RAD; // 两点经度差
$s = 2 * asin(sqrt(pow(sin($a / 2), 2) + cos($radLat1) * cos($radLat2) * pow(sin($b / 2), 2)));
$s = $s * $EARTH_RADIUS;
$result = round($s * 10000) / 10000;
return $result;
}
}
if (!function_exists('getAge')) {
/**
* 根据出生日期计算出年龄
* @param $birthday
* @return false|string
*/
function getAge($birthday)
{
$birthday = strtotime($birthday);
//格式化出生时间年月日
$byear = date('Y', $birthday);
$bmonth = date('m', $birthday);
$bday = date('d', $birthday);
//格式化当前时间年月日
$tyear = date('Y');
$tmonth = date('m');
$tday = date('d');
//开始计算年龄
$age = $tyear - $byear;
if ($bmonth > $tmonth || $bmonth == $tmonth && $bday > $tday) {
$age--;
}
return $age;
}
}
... ...
<?php
namespace app\common\controller;
use app\common\library\Auth;
use EasyWeChat\Foundation\Application;
use think\Config;
use think\Controller;
use think\Hook;
use think\Lang;
use think\Loader;
/**
* 前台控制器基类
*/
class WechatBase extends Controller
{
/**
* 布局模板
* @var string
*/
protected $layout = '';
/**
* 无需登录的方法,同时也就不需要鉴权了
* @var array
*/
protected $noNeedLogin = [];
/**
* 无需鉴权的方法,但需要登录
* @var array
*/
protected $noNeedRight = [];
/**
* 权限Auth
* @var Auth
*/
protected $auth = null;
public function _initialize()
{
}
/**
* 加载语言文件
* @param string $name
*/
protected function loadlang($name)
{
Lang::load(APP_PATH . $this->request->module() . '/lang/' . $this->request->langset() . '/' . str_replace('.', '/', $name) . '.php');
}
/**
* 渲染配置信息
* @param mixed $name 键名或数组
* @param mixed $value 值
*/
protected function assignconfig($name, $value = '')
{
$this->view->config = array_merge($this->view->config ? $this->view->config : [], is_array($name) ? $name : [$name => $value]);
}
/**
* 检查微信用户登录
*/
public function checkWeChatUserLogin()
{
$userId = get_current_user_id();
if (empty($userId)) {
$config = [
'app_id' => config('wechat.app_id'),
'secret' => config('wechat.secret'),
'oauth' => [
'scopes' => ['snsapi_userinfo'],
'callback' => url('user/index/callback'),
],
];
$app = new Application($config);
$target_url='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
session('target_url',$target_url);
$app->oauth->redirect()->send();
}
}
}
... ...
... ... @@ -18,7 +18,7 @@ return [
// 应用命名空间
'app_namespace' => 'app',
// 应用调试模式
'app_debug' => Env::get('app.debug', false),
'app_debug' => Env::get('app.debug', true),
// 应用Trace
'app_trace' => Env::get('app.trace', false),
// 应用模式状态
... ... @@ -55,7 +55,7 @@ return [
// | 模块设置
// +----------------------------------------------------------------------
// 默认模块名
'default_module' => 'index',
'default_module' => 'home',
// 禁止访问模块
'deny_module_list' => ['common'],
// 默认控制器名
... ...
<?php
/**
* Created by PhpStorm.
* User: hooklife
* Date: 2017/1/12
* Time: 11:52
*/
return [
/**
* Debug 模式,bool 值:true/false
*
* 当值为 false 时,所有的日志都不会记录
*/
'debug' => true,
/**
* 账号基本信息,请从微信公众平台/开放平台获取
*/
'app_id' => 'wx8aa97c3f0b29accb', // AppID
'secret' => '79d251389b78f3603e796a6f9b992cc2', // AppSecret
'token' => 'bronet', // Token
'aes_key' => 'qblu4O3peCTWjLLEqKqLjQhJNNeCTi2se2EPeVARsbk', // EncodingAESKey,安全模式下请一定要填写!!!
/**
* 日志配置
*
* level: 日志级别, 可选为:
* debug/info/notice/warning/error/critical/alert/emergency
* permission:日志文件权限(可选),默认为null(若为null值,monolog会取0644)
* file:日志文件位置(绝对路径!!!),要求可写权限
*/
'log' => [
'level' => 'debug',
'permission' => 0777,
'file' => LOG_PATH.'easywechat.log',
],
/**
* OAuth 配置
*
* scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
* callback:OAuth授权完成后的回调页地址
*/
'oauth' => [
'scopes' => ['snsapi_userinfo'],
'callback' => '/user/index/callback',
],
/**
* 微信支付
*/
'payment' => [
'merchant_id' => '1509104971',
'key' => 'ebfe7fba8f7a0fba3e19efcc547b956d',
'cert_path' => 'wechat/cert/apiclient_cert.pem', // XXX: 绝对路径!!!!
'key_path' => 'wechat/cert/apiclient_key.pem', // XXX: 绝对路径!!!!
// 'device_info' => '013467007045764',
// 'sub_app_id' => '',
// 'sub_merchant_id' => '',
// ...
],
/**
* Guzzle 全局设置
*
* 更多请参考: http://docs.guzzlephp.org/en/latest/request-options.html
*/
'guzzle' => [
'timeout' => 3.0, // 超时时间(秒)
//'verify' => false, // 关掉 SSL 认证(强烈不建议!!!)
],
];
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/24
* Time: 8:44
*/
namespace app\home\controller;
use app\common\controller\WechatBase;
use think\Db;
class Collect extends WechatBase
{
protected $user_id;
function _initialize()
{
parent::_initialize();
//判断是否授权
$user_id = get_current_user_id();
if(empty($user_id)){
$this->redirect('user/authorization_view');
}
$this->user_id = $user_id;
}
public function index(){
$type = $this->request->param('type',0,'intval');
$goods_id = $this->request->param('goods_id',0,'intval');
if(empty($type) || empty($goods_id)){
$this->error('404');
}
if($type == 1){
//收藏
if(empty($collect)){
$arr['user_id'] = $this->user_id;
$arr['goods_id'] = $goods_id;
$arr['createtime'] = time();
Db::name('collect')->insert($arr);
}
}else if($type == 2){
//取消收藏
Db::name('collect')->where(['user_id'=>$this->user_id,'goods_id'=>$goods_id])->delete();
}
$this->success('SUCCESS');
}
public function get_all(){
$data = Db::name('collect')
->alias('c')
->field('g.*,c.id as c_id')
->join('fa_goods g','g.id = c.goods_id')
->where(['c.user_id'=>$this->user_id])->order('c.id desc')->page(1,5)->select();
$this->assign('data',$data);
$this->assign('title','我的收藏');
return $this->fetch();
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 11:47
*/
namespace app\home\controller;
use app\common\controller\WechatBase;
use app\home\model\Question;
use app\home\model\User;
use think\Db;
class Goods extends WechatBase
{
protected $user_id;
function _initialize()
{
parent::_initialize();
//判断是否授权
$user_id = get_current_user_id();
if(empty($user_id)){
$this->redirect('user/authorization_view');
}
$this->user_id = $user_id;
}
public function detail(){
$goods_id = $this->request->param('goods_id',0,'intval');
if(empty($goods_id)){
$this->error('404');
}
$where['id'] = ['eq',$goods_id];
$goodsModel = new \app\home\model\Goods();
$data = $goodsModel->findData($where);
if(empty($data)){
$this->error('404');
}
if($data['status'] == 1){
$this->error('广告审核中');
}
if($data['status'] == 3){
$this->error('广告审核未通过');
}
if($data['admin_deletetime'] != 0){
$this->error('已下架');
}
if($data['user_deletetime'] != 0){
$this->error('已下架');
}
if($data['admin_is_up'] != 1){
$this->error('已下架');
}
if($data['user_is_up'] != 1){
$this->error('已下架');
}
//判断是否收藏
$collect = Db::name('collect')->where(['user_id'=>$this->user_id,'goods_id'=>$goods_id])->find();
if(!empty($collect)){
$is_collect = 1;
}else{
$is_collect = 0;
}
$data['is_collect'] = $is_collect;
$userModel = new User();
$user = $userModel->findData(['id'=>$this->user_id]);
if(empty($user)){
$this->error('查无此人');
}
$this->assign('data',$data);
return $this->fetch();
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/18
* Time: 11:03
*/
namespace app\home\controller;
use app\common\controller\WechatBase;
use app\home\model\Goods;
use app\home\model\Slide;
use think\Db;
class Index extends WechatBase
{
function _initialize()
{
parent::_initialize();
}
public function index(){
$domain_name = $this->request->domain();//域名
//幻灯片
$slideModel = new Slide();
$slide = $slideModel->selectData([]);
foreach($slide as $key => $s){
$s[$key]['image'] = $domain_name.$s['image'];
}
//广告信息
$user_id = get_current_user_id();
$goods_ids = [];
if(!empty($user_id)){
//获取用户答对了哪些广告(拿过广告的积分就不要展示在列表里了)
$user_exp_log = Db::name('user_exp_log')->where(['user_id'=>$user_id,'type'=>4])->select();
foreach($user_exp_log as $key => $value){
$goods_ids[] = $value['goods_id'];
}
}
$goodsModel = new Goods();
$data = $goodsModel->selectPageData(['goods_id'=>['not in',$goods_ids]],1,5);
foreach($data as $key => $vo){
if(!empty($vo['video'])){
$data[$key]['video'] = $domain_name.$vo['video'];
}
$voice = explode(',',$vo['voice']);
if(!empty($voice)){
foreach($voice as $key2 => $vo2){
$voice[$key2] = $domain_name.$vo2;
}
$data[$key]['voice'] = $voice;
}
$data[$key]['start_time'] = date('Y-m-d',$vo['start_time']);
$data[$key]['end_time'] = date('Y-m-d',$vo['end_time']);
$images = explode(',',$vo['images']);
if(!empty($images)){
foreach($images as $key3 => $vo3){
$images[$key3] = $domain_name.$vo3;
}
$data[$key]['images'] = $images;
}
}
$this->assign('slide',$slide);
$this->assign('data',$data);
$this->assign('title','广告商城');
return $this->fetch();
}
/**
* 加载更多
*/
public function more(){
$domain_name = $this->request->domain();//域名
$user_id = $this->request->param('user_id',0,'intval');
$page = $this->request->param('page',1,'intval');
$pageNum = $this->request->param('pageNum',5,'intval');
$goods_ids = [];
if(!empty($user_id)){
//获取用户答对了哪些广告(拿过广告的积分就不要展示在列表里了)
$user_exp_log = Db::name('user_exp_log')->where(['user_id'=>$user_id,'type'=>4])->select();
foreach($user_exp_log as $key => $value){
$goods_ids[] = $value['goods_id'];
}
}
$goodsModel = new Goods();
$data = $goodsModel->selectPageData(['goods_id'=>['not in',$goods_ids]],$page,$pageNum);
foreach($data as $key => $vo){
if(!empty($vo['video'])){
$data[$key]['video'] = $domain_name.$vo['video'];
}
$voice = explode(',',$vo['voice']);
if(!empty($voice)){
foreach($voice as $key2 => $vo2){
$voice[$key2] = $domain_name.$vo2;
}
$data[$key]['voice'] = $voice;
}
$data[$key]['start_time'] = date('Y-m-d',$vo['start_time']);
$data[$key]['end_time'] = date('Y-m-d',$vo['end_time']);
$images = explode(',',$vo['images']);
if(!empty($images)){
foreach($images as $key3 => $vo3){
$images[$key3] = $domain_name.$vo3;
}
$data[$key]['images'] = $images;
}
}
$this->success('SUCCESS','',$data);
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 18:02
*/
namespace app\home\controller;
use app\common\controller\WechatBase;
use think\Db;
class Member extends WechatBase
{
protected $user_id;
function _initialize()
{
parent::_initialize();
//判断是否授权
$user_id = get_current_user_id();
if(empty($user_id)){
$this->redirect('user/authorization_view');
}
$this->user_id = $user_id;
}
/**
* 个人中心
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function index(){
$user = Db::name('user')->where(['id'=>$this->user_id])->find();
if(empty($user)){
$this->error('查无此人');
}
//转换为人民币
$exp_ratio = Db::name('exp_ratio')->where(['id'=>1])->find();
$user['rmb'] = round($user['exp']*$exp_ratio['ratio'],2);
//今日获得的红包券
$today_exp = Db::name('user_exp_log')->where(['user_id'=>$this->user_id,['type'=>['in',[4,5]]]])->sum('exp');
$user['today_exp'] = $today_exp;
$this->assign('user',$user);
$this->assign('title','个人中心');
return $this->fetch();
}
/**
* 个人信息
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function my_information(){
$user = Db::name('user')->where(['id'=>$this->user_id])->find();
if(empty($user)){
$this->error('404');
}
return $this->fetch();
}
/**
* 更新个人信息
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public function update_information(){
$param = $this->request->param();
$validate = new \think\Validate([
'user_id' => 'require',
'nickname' => 'require',
'avatar' => 'require',
'gender' => 'require',
'year' => 'require',
'day' => 'require',
'province' => 'require',
'city' => 'require',
'county' => 'require',
]);
$validate->message([
'user_id' => 'user_id参数错误',
'nickname' => 'nickname参数错误',
'avatar.require' => 'avatar参数错误',
'gender.require' => 'gender参数错误',
'year' => 'year参数错误',
'day' => 'day参数错误',
'province' => 'province参数错误',
'city' => 'city参数错误',
'county' => 'county参数错误',
]);
if (!$validate->check($param)) {
$this->error($validate->getError());
}
$user = Db::name('user')->where(['id'=>$param['user_id']])->find();
$param['birthday'] = "$param[year]-$param[day]";
unset($param['year']);
unset($param['day']);
Db::name('user')->where(['id'=>$param['user_id']])->update($param);
$this->success('SUCCESS');
}
/**
* 我的钱包
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function my_wallet(){
$user = Db::name('user')->where(['id'=>$this->user_id])->find();
if(empty($user)){
$this->error('查无此人');
}
//转换为人民币
$exp_ratio = Db::name('exp_ratio')->where(['id'=>1])->find();
$user['rmb'] = round($user['exp']*$exp_ratio['ratio'],2);
$this->assign('user',$user);
$this->assign('title','我的钱包');
return $this->fetch();
}
/**
* 提现页面
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function my_withdraw(){
$user = Db::name('user')->where(['id'=>$this->user_id])->find();
if(empty($user)){
$this->error('查无此人');
}
//转换为人民币
$exp_ratio = Db::name('exp_ratio')->where(['id'=>1])->find();
$user['rmb'] = round($user['exp']*$exp_ratio['ratio'],2);
$this->assign('user',$user);
$this->assign('exp_ratio',$exp_ratio);
$this->assign('title','提现');
return $this->fetch();
}
/**
* 提交提现申请
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function withdraw(){
$user_id = $this->request->param('user_id',0,'intval');
$exp = $this->request->param('exp',0,'intval');
if(empty($user_id) || empty($exp)){
$this->error('404');
}
$user = Db::name('user')->where(['id'=>$user_id])->find();
if($user['exp'] < $exp){
$this->error("您的红包券不足$exp");
}
//判断是否完善提现信息
if(empty($user['name']) || empty($user['card']) || empty($user['mobile'])){
$this->error('请完善提现信息','');
}
$arr['user_id'] = $user_id;
$arr['before_exp'] = $user['exp'];
$arr['exp'] = $exp;
$arr['after_exp'] = $user['exp'] - $exp;
$arr['type'] = 1;
$arr['createtime'] = time();
$result = Db::name('user_exp_log')->insert();
if(empty($result)){
$this->error('sql执行失败');
}
$this->success('SUCCESS');
}
/**
* 完善提现信息页面
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function withdraw_information(){
$user = Db::name('user')->where(['id'=>$this->user_id])->find();
$this->assign('user',$user);
$this->assign('title','完善提现信息');
return $this->fetch();
}
/**
* 更新提现信息
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public function update_withdraw_information(){
$param = $this->request->param();
$validate = new \think\Validate([
'user_id' => 'require',
'name' => 'require',
'card' => 'require',
'mobile' => 'require',
]);
$validate->message([
'user_id' => 'user_id参数错误',
'name' => 'name参数错误',
'card' => 'card参数错误',
'mobile' => 'mobile参数错误',
]);
if (!$validate->check($param)) {
$this->error($validate->getError());
}
Db::name('user')->where(['id'=>$param['user_id']])->update($param);
$this->success('SUCCESS');
}
/**
* 收益记录页面
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function earnings_log(){
$data = Db::name('user_exp_log')->where(['type'=>['in',[4,5]]])->order('id desc')->page(1,5)->select();
foreach($data as $key => $vo){
$data[$key]['createtime'] = date('Y年m月d日 H:i');
}
$this->assign('data',$data);
$this->assign('title','收益记录');
return $this->fetch();
}
/**
* 提现记录页面
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function withdraw_log(){
$data = Db::name('user_exp_log')->where(['type'=>['in',[1,2,3]]])->order('id desc')->page(1,5)->select();
foreach($data as $key => $vo){
$data[$key]['createtime'] = date('Y年m月d日 H:i');
}
$this->assign('data',$data);
$this->assign('title','提现记录');
return $this->fetch();
}
/**
* 商家入驻页面
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function merchant_enter_view(){
$data = Db::name('page')->where(['id'=>1])->find();
$this->assign('data',$data);
$this->assign('title','商家入驻');
return $this->fetch();
}
/**
* 商家入驻表单页面
* @return mixed
*/
public function merchant_enter_form(){
$data = Db::name('merchant_audit')->where(['user_id'=>$this->user_id])->find();
$this->assign('user_id',$this->user_id);
$this->assign('data',$data);
$this->assign('title','商家入驻');
return $this->fetch();
}
/**
* 提交申请
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public function merchant_enter_submit(){
$param = $this->request->param();
$validate = new \think\Validate([
'user_id' => 'require',
'merchant_title' => 'require',
'merchant_name' => 'require',
'merchant_mobile' => 'require',
'business_images' => 'require',
]);
$validate->message([
'user_id' => 'user_id参数错误',
'merchant_title' => 'merchant_title参数错误',
'merchant_name' => 'merchant_name参数错误',
'merchant_mobile' => 'merchant_mobile参数错误',
'business_images' => 'business_images参数错误',
]);
if (!$validate->check($param)) {
$this->error($validate->getError());
}
$data = Db::name('merchant_audit')->where(['user_id'=>$this->user_id])->find();
if(!empty($data)){
if($data['expiration_time'] > time() && $data['status'] == 3){
$this->error("请于$data[expiration_time]后再来提交");
}else if($data['status'] == 2){
$this->error("您已经是商家了");
}else if($data['status'] == 1){
$this->error('正在审核中');
}else{
$param['status'] = 1;
Db::name('merchant_audit')->where(['user_id'=>$param['user_id']])->update($param);
}
}else{
$param['createtime'] = time();
Db::name('merchant_audit')->insert($param);
}
$this->success('success');
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 13:59
*/
namespace app\home\controller;
use app\common\controller\WechatBase;
use app\home\model\UserQuestionAnswer;
use think\Db;
class Question extends WechatBase
{
/**
* 获取题
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function get_question(){
$user_id = $this->request->param('user_id',0,'intval');
$goods_id = $this->request->param('goods_id',0,'intval');
if(empty($user_id) || empty($goods_id)){
$this->error('404');
}
$userModel = new \app\home\model\User();
$user = $userModel->findData(['id'=>$user_id]);
$user['age'] = getAge($user['birthday']);//年龄
$goodsModel = new \app\home\model\Goods();
$goods = $goodsModel->findData(['id'=>$goods_id]);
//判断是否符合答题条件
if($goods['sex'] != 0){
if(empty($user['gender'])){
$this->error('请去完善信息');
}
if($user['gender'] == $goods['sex']){
$this->error('性别不符合要求');
}
}
if($goods['min_age'] != 0 || $goods['max_age'] != 0){
if(empty($user['birthday'])){
$this->error('请去完善信息');
}
if($goods['min_age'] <= $user['age'] && $user['age'] <= $goods['max_age']){
$this->error('年龄不符合要求');
}
}
$distance = distance($goods,$user);//根据两地经纬度获取距离
if($goods['distance'] != 0){
if($distance > $goods['distance']){
$this->error('距离不符合要求');
}
}
//题
$questionModel = new \app\home\model\Question();
$question = $questionModel
->alias('q')
->field('q.*,q_o.id as q_o_id,q_o.option_name')
->join('fa_question_option q_o','q_o.question_id = q.id','left')
->where(['q.goods_id',$goods_id])
->order('q.list_order desc,id desc')
->select();
//用户上次答题答案
$userQuestionAnswerModel = new UserQuestionAnswer();
foreach($question as $key => $q){
$user_question_answer = $userQuestionAnswerModel->where(['user_id'=>$user_id,'goods_id'=>$goods_id,'question_id'=>$q['id']])->find();
if(!empty($user_question_answer)){
//重新答题倒计时
$user_question_answer['backwards'] = $user_question_answer['resettime'] - time();
}
$question[$key]['user_question_answer'] = $user_question_answer;
}
$this->success('SUCCESS');
}
/**
* 提交答案
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public function answer(){
$question_ids = $this->request->param('question_ids');
$answers = $this->request->param('answers');
$goods_id = $this->request->param('goods_id',0,'intval');
$user_id = $this->request->param('user_id',0,'intval');
if(empty($question_ids) || empty($answers) || empty($types) || empty($goods_id) || empty($user_id)){
$this->error('404');
}
$user = Db::name('user')->where(['id'=>$user_id])->find();//用户信息
$goods = Db::name('goods')->where(['id'=>$goods_id])->find();//广告信息
$merchant = Db::name('user')->where(['id'=>$goods['user_id']])->find();//商户信息
//判断广告信息是否过期
if($goods['end_time'] < time()){
$this->error('广告已过截止时间');
}
Db::startTrans();
//清空上次答题记录
$result1 = Db::name('question_user_answer')->where(['user_id'=>$user_id,'goods_id'=>$goods_id,['question_id'=>['in',$question_ids]]])->delete();
foreach($question_ids as $key => $question_id){
if(empty($queston_id)){
$this->error("第".($key+1)."个question_id不能为空");
}
if(empty($answers[$key])){
$this->error("第".($key+1)."个answer不能为空");
}
//判断是否正确
$question = Db::name('question')->where(['id'=>$question_id])->find();
if($question['question_answer'] == $answers[$key]){
$is_correct = 1;
}else{
$is_correct = 0;
$arr['resettime'] = time() + 300;
}
$arr['user_id'] = $user_id;
$arr['goods_id'] = $goods_id;
$arr['question_id'] = $question_id;
$arr['answer'] = $answers[$key];
$arr['type'] = $question['type'];
$arr['is_correct'] = $is_correct;
$arr['createtime'] = time();
$result2 = Db::name('user_question_answer')->insert($arr);
if(empty($result2)){
Db::rollback();
$this->error('sql执行失败');
}
}
//判断本次答题是否全部正确
$question_error = Db::name('user_question_answer')->where(['goods_id'=>$goods_id,'user_id'=>$user_id,'is_correct'=>0])->find();
if(empty($question_error)){
//全部正确获取红包券
//判断是否获取过该广告的红包
$user_exp_log = Db::name('user_exp_log')->where(['type'=>4,'goods_id'=>$goods_id])->find();
if(!empty($user_exp_log)){
$this->error('您已获得过该广告的奖励');
}
//判断商家余额是否够用
if($merchant['money'] < $goods['exp']){
$this->error('商家余额不足');
}
//用户获得奖励
$arr1['user_id'] = $user_id;
$arr1['before_exp'] = $user['exp'];
$arr1['exp'] = $goods['exp'];
$arr1['after_exp'] = $user['exp']+$goods['exp'];
$arr1['type'] = 4;
$arr1['goods_id'] = $goods_id;
$arr1['createtime'] = time();
$result3 = Db::name('user_exp_log')->insert($arr1);
if(empty($result3)){
Db::rollback();
$this->error('sql执行失败');
}
$result4 = Db::name('user')->where(['id'=>$user_id])->update(['exp'=>$user['exp']+$goods['exp']]);
//扣除商家余额
$arr2['user_id'] = $merchant['id'];
$arr2['before_money'] = $merchant['money'];
$arr2['money'] = $goods['exp'];
$arr2['after_money'] = $merchant['money']-$goods['exp'];
$arr2['type'] = 5;
$arr2['goods_id'] = $goods_id;
$arr2['createtime'] = time();
$result5 = Db::name('user_money_log')->insert($arr2);
if(empty($result5)){
Db::rollback();
$this->error('sql执行失败');
}
$result6 = Db::name('user')->where(['id'=>$user_id])->update(['money'=>$user['money']-$goods['exp']]);
//判断是否有上级
if(!empty($user['parent_id'])){
//用户上级信息
$parent = Db::name('user')->where(['id'=>$user['parent_id']])->find();
//平台承担上级的红包券
//获取上级获得奖券比例
$exp_ratio = Db::name('exp_ratio')->where(['id'=>2])->find();
//用户上级获取奖励
$arr3['user_id'] = $user['parent_id'];
$arr3['before_exp'] = $parent['exp'];
$arr3['exp'] = $goods['exp']*$exp_ratio['ratio']*0.01;
$arr3['after_exp'] = $arr3['exp']+$parent['exp'];
$arr3['type'] = 5;
$arr3['goods_id'] = $goods_id;
$arr3['to_user_id'] = $user_id;
$arr3['createtime'] = time();
$result7 = Db::name('user_exp_log')->insert($arr3);
if(empty($result7)){
Db::rollback();
$this->error('sql执行失败');
}
$result8 = Db::name('user')->where(['id'=>$user['parent_id']])->update(['exp'=>$arr3['exp']+$parent['exp']]);
}
}
Db::commit();
$this->success('SUCCESS','',$question_error);
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/1/19
* Time: 11:32
*/
namespace app\home\controller;
use app\common\controller\WechatBase;
use EasyWeChat\Foundation\Application;
use think\Db;
class Server extends WechatBase
{
public function index(){
if(!isset($_GET["echostr"])){
$this->responseMsg();
}else{
$this->valid();
}
}
public function valid()
{
$echoStr = $_GET["echostr"];
echo $echoStr;
exit;
}
public function test(){
dump(cache('referrer'));
dump(cache('openid'));
dump(cache('admin_id'));
dump(cache('result'));
dump(cache('result1'));
dump(cache('third_party_user'));
dump(cache('user'));
}
public function responseMsg()
{
$app=new Application(config('wechat'));
$server = $app->server;
$server->setMessageHandler(function ($message) {
switch ($message->MsgType) {
case 'event':
switch ($message->Event) {
case 'subscribe':
if(empty($message->EventKey)){
// return '普通关注!';
}else{
//获取用户openid
$openid=$message->FromUserName;
cache('openid',$openid);
$share_id=substr($message->EventKey,8);
cache('share_id',$share_id);
$third = Db::name('third')->where('openid',$openid)->find();
cache('third',$third);
if(empty($third)){
//获取用户信息
$options=config('wechat');
$app = new Application($options);
$accessToken = $app->access_token; // EasyWeChat\Core\AccessToken 实例
$token = $accessToken->getToken(false);
$url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=$token&openid=$openid&lang=zh_CN";
$user_data = json_decode($this->http_get($url),true);
$this->new_user($user_data,$openid,$options['app_id'],$share_id);
}
}
break;
default:
// return '收到event消息';
break;
}
break;
case 'text':
// return '收到文字消息';
break;
default:
// return '收到其它消息';
break;
}
});
$response = $server->serve();
$response->send();
}
private function check_signature()
{
$signature = $_GET["signature"];
$timestamp = $_GET["timestamp"];
$nonce = $_GET["nonce"];
$token = TOKEN;
$tmpArr = array($token, $timestamp, $nonce);
sort($tmpArr);
$tmpStr = implode( $tmpArr );
$tmpStr = sha1( $tmpStr );
if( $tmpStr == $signature ){
return true;
}else{
return false;
}
}
public function http_get($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
$result = curl_exec($ch);
// grab URL, and print
if(curl_errno($ch)){
print curl_error($ch);
}
curl_close($ch);
return $result;
}
public function new_user($wechat_user,$openid,$appId,$share_id) {
$currentTime = time();
$ip = $this->request->ip(0, true);
$userId = Db::name("user")->insertGetId([
'status' => 'normal',
'gender' => $wechat_user['original']['sex'],
'nickname' => $wechat_user['nickname'],
'avatar' => $wechat_user['avatar'],
'joinip' => $ip,
'jointime' => $currentTime,
'createtime' => $currentTime,
'updatetime' => $currentTime,
'loginip' => $ip,
'logintime' => $currentTime,
'user_status'=> 2,
'parent_id' => $share_id,
]);
$row=Db::name("third")->insert([
'openid' => $openid,
'user_id' => $userId,
'nickname' => $wechat_user['nickname'],
'app_id' => $appId,
'loginip' => $ip,
'union_id' => '',
'logintime' => $currentTime,
'createtime' => $currentTime,
'login_times' => 1,
'more' => json_encode($wechat_user)
]);
return $userId;
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/24
* Time: 14:09
*/
namespace app\home\controller;
use app\common\controller\WechatBase;
use EasyWeChat\Foundation\Application;
use think\Db;
class Share extends WechatBase
{
protected $user_id;
function _initialize()
{
parent::_initialize();
//判断是否授权
$user_id = get_current_user_id();
if(empty($user_id)){
$this->redirect('user/authorization_view');
}
$this->user_id = $user_id;
}
/**
* 我的邀请
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function index(){
$exp_ratio = Db::name('exp_radio')->where(['id'=>[2,3]])->select();
$this->assign('exp_ratio',$exp_ratio);
$this->assign('title','我的邀请');
return $this->fetch();
}
public function get_poster(){
$user_id = $this->request->param('user_id',0,'intval');
$type = $this->request->param('type',0,'intval');
if(empty($user_id) || empty($type)){
$this->error('404');
}
$user = Db::name('user')->where(['id'=>$user_id])->find();
if(empty($user)){
$this->error('查无此人');
}
//获取带参二维码
$code_img = $this->get_code_img($user_id);
//图像处理
$url = $this->processing($code_img,$user,$type);
$this->success('SUCCESS','',['url'=>$url]);
}
/**
* 图像处理
* @param $url
* @param $user
* @param $type
*/
private function processing($url,$user,$type){
$user_id = $user['id'];
//保存头像
$fileName = "avatar_$user_id.png";
$avatar=$this->getImage($user['avatar'],$fileName);
if($avatar['code']==1){
$this->error($avatar['msg']);
}
$avatar_url = "/uploads/avatar/avatar_$user_id.jpeg";
$savePath = "./uploads/poster$type/";
if(!file_exists($savePath)){
mkdir ($savePath,0777,true);
}
//圆形的头像
$image = \think\Image::open(ROOT_PATH."public/white.png");
$image->water($avatar_url,[215,302],100)
->water(ROOT_PATH."public/bg$type.png")
->water($url,[100,100],100)
->save($savePath."poster_$user[id].png");
return "/uploads/poster$type/poster_$user[id].png";
}
/**
* 下载微信头像保存到本地
* @param $url
* @param $filename
* @return array
*/
private function getImage($url,$filename){
$save_dir='./../uploads/avatar/';
if(!file_exists($save_dir)&&!mkdir($save_dir,0777,true)){
return ['code'=>1,'msg'=>'图片路径错误'];
}
$header = array(
'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0',
'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3',
'Accept-Encoding: gzip, deflate',);
$curl = curl_init();curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);curl_setopt($curl, CURLOPT_ENCODING, 'gzip');
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
$data = curl_exec($curl);
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($code == 200) {//把URL格式的图片转成base64_encode格式的!
$imgBase64Code = "data:image/jpeg;base64," . base64_encode($data);
}else{
return ['code'=>1,'msg'=>'图片转换失败'];
}
$img_content=$imgBase64Code;//图片内容
if (preg_match('/^(data:\s*image\/(\w+);base64,)/', $img_content, $result)) {
$type = $result[2];
$new_file = $save_dir.$filename.'.'.$type;
$save_path= 'avatar/'.$filename.'.'.$type;
if (file_put_contents($new_file, base64_decode(str_replace($result[1], '', $img_content)))) {
return ['code'=>0,'file_path'=>$new_file,'save_path'=>$save_path];
}else{
return ['code'=>1,'msg'=>'图片保存失败'];
}
}else{
return ['code'=>1,'msg'=>'图片格式错误'];
}
}
/**
* 获取带参二维码
* @param $user_id
* @return string
*/
private function get_code_img($user_id){
$savePath = "./uploads/code_img/";
if (!file_exists($savePath)){
mkdir($savePath, 0777,true);
}
$file_name = "code_img$user_id.png";
if(!file_exists($savePath."code_img$user_id.png")){
$code_img = $this->code_img($user_id);
$code = file_get_contents($code_img);
file_put_contents($savePath.$file_name,$code);
}
return "/uploads/code_img/$file_name";
}
/**
* 生成带参二维码
* @param $user_id
* @return string
*/
private function code_img($user_id)
{
$options=config('wechat');
$app = new Application($options);
$accessToken = $app->access_token; // EasyWeChat\Core\AccessToken 实例
$token = $accessToken->getToken(false);
$url = 'https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=' . $token;
$param = [
'expire_seconds' => '',
'action_name' => 'QR_LIMIT_STR_SCENE',
'action_info' => ['scene' => ['scene_str' => "$user_id"]]
];
$result = $this->api_notice_increment($url, json_encode($param));
$data = json_decode($result, true);
$ticket = urlencode($data['ticket']);
$qr_url = 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=' . $ticket;
return $qr_url;
}
/**
* 获取二维码提交
* @param $url
* @param $data
* @return mixed|resource
*/
private function api_notice_increment($url, $data)
{
// $data=json_encode($data);
$ch = curl_init();
$header = array("Accept-Charset: utf-8");
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$tmpInfo = curl_exec($ch);
if (curl_errno($ch)) {
curl_close($ch);
return $ch;
} else {
curl_close($ch);
return $tmpInfo;
}
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/9/26
* Time: 16:46
*/
namespace app\home\controller;
use app\common\controller\WechatBase;
use EasyWeChat\Foundation\Application;
class Upload extends WechatBase
{
public function fetImage()
{
$options = [
'app_id' => config('wechat.app_id'),
'secret' => config('wechat.secret'),
];
$app = new Application($options);
$accessToken = $app->access_token;
$access_token = $accessToken->getToken();
$media = $this->request->param('media');
$file = $this->getMedia($access_token, $media, '/uploads/wechat_img/' . date('Ymd'));
$this->success('SUCCESS','',$file);
}
private function getMedia($access_token, $media_id, $folderName)
{
$url = "http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=" . $access_token . "&media_id=" . $media_id;
if (!file_exists(".".$folderName)) {
mkdir(".".$folderName, 0777, true);
}
$file_name = md5(uniqid(rand())) . '.png';
$targetName = ".".$folderName . '/' . $file_name;
$saveName = $folderName . '/' . $file_name;
$ch = curl_init($url); // 初始化
$fp = fopen($targetName, 'wb'); // 打开写入
curl_setopt($ch, CURLOPT_FILE, $fp); // 设置输出文件的位置,值是一个资源类型
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
return $saveName;
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/22
* Time: 17:06
*/
namespace app\home\controller;
use app\api\controller\Validate;
use app\common\controller\WechatBase;
use EasyWeChat\Foundation\Application;
use think\Db;
use think\Log;
class User extends WechatBase
{
public function callback(){
$appId=config('wechat.app_id');
$secret=config('wechat.secret');
$config = [
'app_id' => $appId,
'secret' => $secret,
];
$app = new Application($config);
$oauth = $app->oauth;
$user = $oauth->user();
$wechat_user = $user->toArray();
if(isset($wechat_user['id'])){
$openid=$wechat_user['id'];
$findThird = Db::name("third")
->where('openid', $openid)
->where('app_id', $appId)
->find();
if ($findThird) {
$this->wechatUserLogin($findThird,$openid,$appId);
}else{
$this->wechatUserRegister($wechat_user,$openid,$appId);
}
$target_url=session('target_url');
$targetUrl = empty($target_url) ? '/' : $target_url;
header('location:'. $targetUrl);
}else{
Log::write('获取微信用户数据失败');
$this->error('获取微信用户数据失败');
}
}
/**
* 微信用户登录
* @param $findThird
* @param $openid
* @param $appId
*/
protected function wechatUserLogin($findThird,$openid,$appId){
$currentTime = time();
$ip = $this->request->ip(0, true);
$token = generate_user_token($findThird['user_id']);
$thirdData = [
'loginip' => $ip,
'logintime' => $currentTime,
'login_times' => Db::raw('login_times+1')
];
$row1=Db::name("third")
->where('openid', $openid)
->where('app_id', $appId)
->update($thirdData);
$userInfo=Db::name("third")
->where('openid', $openid)
->where('app_id', $appId)->find();
$user = Db::name("user")
->where('id', $userInfo['user_id'])
->find();
$userData = [
'loginip' => $ip,
'prevtime' => $user['logintime'],
'logintime' => $currentTime,
];
$row2=Db::name("user")
->where('id', $userInfo['user_id'])
->update($userData);
if($row1!==false&&$row2!==false){
$userModel=new User();
$user=$userModel->getUserInfo(['user_id'=>$userInfo['user_id'],'app_id'=>$appId]);
update_current_user($user);
session('token',$token);
Db::commit();
}else{
Db::rollback();
}
}
/**
* 微信用户注册
* @param $wechat_user
* @param $openid
* @param $appId
*/
protected function wechatUserRegister($wechat_user,$openid,$appId){
$currentTime = time();
$ip = $this->request->ip(0, true);
Db::startTrans();
$userId = Db::name("user")->insertGetId([
'status' => 'normal',
'gender' => $wechat_user['original']['sex'],
'nickname' => $wechat_user['nickname'],
'avatar' => $wechat_user['avatar'],
'joinip' => $ip,
'jointime' => $currentTime,
'createtime' => $currentTime,
'updatetime' => $currentTime,
'loginip' => $ip,
'logintime' => $currentTime,
'user_status'=> 2,
]);
$row=Db::name("third")->insert([
'openid' => $openid,
'user_id' => $userId,
'nickname' => $wechat_user['nickname'],
'app_id' => $appId,
'loginip' => $ip,
'union_id' => '',
'logintime' => $currentTime,
'createtime' => $currentTime,
'login_times' => 1,
'more' => json_encode($wechat_user)
]);
if($userId && $row){
$token = generate_user_token($userId);
$userModel=new User();
$user=$userModel->getUserInfo(['user_id'=>$userId,'app_id'=>$appId]);
update_current_user($user);
session('token',$token);
Db::commit();
}else{
Db::rollback();
}
}
/**
* 授权页面
* @return mixed
*/
public function authorization_view(){
$this->assign('title','授权页');
return $this->fetch();
}
/**
* 授权
*/
public function authorization(){
$this->checkWeChatUserLogin();
}
/**
* 定位当前位置判断
*/
public function location(){
$param = $this->request->param();
$validate = new \think\Validate([
'user_id' => 'require',
'longitude' => 'require',
'latitude' => 'require',
]);
$validate->message([
'user_id' => 'user_id参数错误',
'longitude.require' => 'longitude参数错误!',
'latitude.require' => 'latitude参数错误!',
]);
if (!$validate->check($param)) {
$this->error($validate->getError());
}
$where['id'] = ['eq',$param['user_id']];
$userModel = new \app\home\model\User();
$result = $userModel->updateData($where,$param);
$this->success('SUCCESS');
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 10:09
*/
namespace app\home\model;
use think\Model;
class Goods extends Model
{
public function selectPageData($where,$page,$pageNum){
$where['start_time'] = ['lt',time()];
$where['end_time'] = ['gt',time()];
$where['status'] = ['eq',2];
$where['user_is_up'] = ['eq',1];
$where['admin_is_up'] = ['eq',1];
$where['user_deletetime'] = ['eq',0];
$where['admin_deletetime'] = ['eq',0];
$data = $this->where($where)->order('exp desc,end_time asc')->page($page,$pageNum)->select();
return $data;
}
public function findData($where){
$data = $this->where($where)->find();
return $data;
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 13:47
*/
namespace app\home\model;
use think\Model;
class Question extends Model
{
public function selectData($where){
$data = $this->where($where)->order('list_order desc,id desc')->select();
return $data;
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 9:53
*/
namespace app\home\model;
use think\Model;
class Slide extends Model
{
public function selectData($where){
$where['status'] = ['eq',1];
$data = $this->where($where)->order('createtime desc')->select();
return $data;
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 13:07
*/
namespace app\home\model;
use think\Model;
class User extends Model
{
public function findData($where){
$data = $this->where($where)->find();
return $data;
}
public function updateData($where,$data){
$result = $this->where($where)->update($data);
return $result;
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 16:54
*/
namespace app\home\model;
use think\Model;
class UserQuestionAnswer extends Model
{
}
\ No newline at end of file
... ...
... ... @@ -24,7 +24,9 @@
"phpmailer/phpmailer": "^5.2",
"karsonzhang/fastadmin-addons": "~1.1.9",
"overtrue/pinyin": "~3.0",
"phpoffice/phpspreadsheet": "^1.2"
"phpoffice/phpspreadsheet": "^1.2",
"symfony/psr-http-message-bridge": "^1.1",
"topthink/think-image": "^1.0"
},
"config": {
"preferred-install": "dist"
... ...
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "11813429229ff284ac896a7e197c8957",
"packages": [
{
"name": "doctrine/cache",
"version": "v1.4.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
"reference": "6433826dd02c9e5be8a127320dc13e7e6625d020"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/cache/zipball/6433826dd02c9e5be8a127320dc13e7e6625d020",
"reference": "6433826dd02c9e5be8a127320dc13e7e6625d020",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"conflict": {
"doctrine/common": ">2.2,<2.4"
},
"require-dev": {
"phpunit/phpunit": ">=3.7",
"predis/predis": "~1.0",
"satooshi/php-coveralls": "~0.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.5.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\Cache\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Caching library offering an object-oriented API for many cache backends",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"cache",
"caching"
],
"time": "2015-11-02T18:33:51+00:00"
},
{
"name": "endroid/qr-code",
"version": "1.9.3",
"source": {
"type": "git",
"url": "https://github.com/endroid/qr-code.git",
"reference": "c9644bec2a9cc9318e98d1437de3c628dcd1ef93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/endroid/qr-code/zipball/c9644bec2a9cc9318e98d1437de3c628dcd1ef93",
"reference": "c9644bec2a9cc9318e98d1437de3c628dcd1ef93",
"shasum": ""
},
"require": {
"ext-gd": "*",
"php": ">=5.4",
"symfony/options-resolver": "^2.3|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0|^5.0",
"sensio/framework-extra-bundle": "^3.0",
"symfony/browser-kit": "^2.3|^3.0",
"symfony/framework-bundle": "^2.3|^3.0",
"symfony/http-kernel": "^2.3|^3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Endroid\\QrCode\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jeroen van den Enden",
"email": "info@endroid.nl",
"homepage": "http://endroid.nl/"
}
],
"description": "Endroid QR Code",
"homepage": "https://github.com/endroid/QrCode",
"keywords": [
"bundle",
"code",
"endroid",
"qr",
"qrcode",
"symfony"
],
"time": "2017-04-08T09:13:59+00:00"
},
{
"name": "guzzlehttp/guzzle",
"version": "6.3.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"shasum": ""
},
"require": {
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.4",
"php": ">=5.5"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
"psr/log": "^1.0"
},
"suggest": {
"psr/log": "Required for using the Log middleware"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.3-dev"
}
},
"autoload": {
"files": [
"src/functions_include.php"
],
"psr-4": {
"GuzzleHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle is a PHP HTTP client library",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
],
"time": "2018-04-22T15:46:56+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle promises library",
"keywords": [
"promise"
],
"time": "2016-12-20T10:07:11+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0",
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"ext-zlib": "*",
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
},
"suggest": {
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Schultze",
"homepage": "https://github.com/Tobion"
}
],
"description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
"http",
"message",
"psr-7",
"request",
"response",
"stream",
"uri",
"url"
],
"time": "2019-07-01T23:21:34+00:00"
},
{
"name": "karsonzhang/fastadmin-addons",
"version": "1.1.9",
"source": {
"type": "git",
"url": "https://github.com/karsonzhang/fastadmin-addons.git",
"reference": "c539b1c4aa99ea8c453cbd3a838f523136bc118a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/karsonzhang/fastadmin-addons/zipball/c539b1c4aa99ea8c453cbd3a838f523136bc118a",
"reference": "c539b1c4aa99ea8c453cbd3a838f523136bc118a",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"topthink/think-helper": ">=1.0.4",
"topthink/think-installer": ">=1.0.10"
},
"type": "library",
"extra": {
"think-config": {
"addons": "src/config.php"
}
},
"autoload": {
"psr-4": {
"think\\": "src/"
},
"files": [
"src/common.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "xiaobo.sun",
"email": "xiaobo.sun@qq.com"
},
{
"name": "karsonzhang",
"email": "karsonzhang@163.com"
}
],
"description": "addons package for fastadmin",
"homepage": "https://github.com/karsonzhang/fastadmin-addons",
"time": "2019-06-11T09:05:52+00:00"
},
{
"name": "markbaker/complex",
"version": "1.4.7",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPComplex.git",
"reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000",
"reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000",
"shasum": ""
},
"require": {
"php": "^5.6.0|^7.0.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3",
"phpcompatibility/php-compatibility": "^8.0",
"phpdocumentor/phpdocumentor": "2.*",
"phploc/phploc": "2.*",
"phpmd/phpmd": "2.*",
"phpunit/phpunit": "^4.8.35|^5.4.0",
"sebastian/phpcpd": "2.*",
"squizlabs/php_codesniffer": "^3.3.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Complex\\": "classes/src/"
},
"files": [
"classes/src/functions/abs.php",
"classes/src/functions/acos.php",
"classes/src/functions/acosh.php",
"classes/src/functions/acot.php",
"classes/src/functions/acoth.php",
"classes/src/functions/acsc.php",
"classes/src/functions/acsch.php",
"classes/src/functions/argument.php",
"classes/src/functions/asec.php",
"classes/src/functions/asech.php",
"classes/src/functions/asin.php",
"classes/src/functions/asinh.php",
"classes/src/functions/atan.php",
"classes/src/functions/atanh.php",
"classes/src/functions/conjugate.php",
"classes/src/functions/cos.php",
"classes/src/functions/cosh.php",
"classes/src/functions/cot.php",
"classes/src/functions/coth.php",
"classes/src/functions/csc.php",
"classes/src/functions/csch.php",
"classes/src/functions/exp.php",
"classes/src/functions/inverse.php",
"classes/src/functions/ln.php",
"classes/src/functions/log2.php",
"classes/src/functions/log10.php",
"classes/src/functions/negative.php",
"classes/src/functions/pow.php",
"classes/src/functions/rho.php",
"classes/src/functions/sec.php",
"classes/src/functions/sech.php",
"classes/src/functions/sin.php",
"classes/src/functions/sinh.php",
"classes/src/functions/sqrt.php",
"classes/src/functions/tan.php",
"classes/src/functions/tanh.php",
"classes/src/functions/theta.php",
"classes/src/operations/add.php",
"classes/src/operations/subtract.php",
"classes/src/operations/multiply.php",
"classes/src/operations/divideby.php",
"classes/src/operations/divideinto.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@lange.demon.co.uk"
}
],
"description": "PHP Class for working with complex numbers",
"homepage": "https://github.com/MarkBaker/PHPComplex",
"keywords": [
"complex",
"mathematics"
],
"time": "2018-10-13T23:28:42+00:00"
},
{
"name": "markbaker/matrix",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPMatrix.git",
"reference": "6ea97472b5baf12119b4f31f802835b820dd6d64"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/6ea97472b5baf12119b4f31f802835b820dd6d64",
"reference": "6ea97472b5baf12119b4f31f802835b820dd6d64",
"shasum": ""
},
"require": {
"php": "^5.6.0|^7.0.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3",
"phpcompatibility/php-compatibility": "^8.0",
"phpdocumentor/phpdocumentor": "2.*",
"phploc/phploc": "2.*",
"phpmd/phpmd": "2.*",
"phpunit/phpunit": "^4.8.35|^5.4.0",
"sebastian/phpcpd": "2.*",
"squizlabs/php_codesniffer": "^3.3.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Matrix\\": "classes/src/"
},
"files": [
"classes/src/functions/adjoint.php",
"classes/src/functions/antidiagonal.php",
"classes/src/functions/cofactors.php",
"classes/src/functions/determinant.php",
"classes/src/functions/diagonal.php",
"classes/src/functions/identity.php",
"classes/src/functions/inverse.php",
"classes/src/functions/minors.php",
"classes/src/functions/trace.php",
"classes/src/functions/transpose.php",
"classes/src/operations/add.php",
"classes/src/operations/directsum.php",
"classes/src/operations/subtract.php",
"classes/src/operations/multiply.php",
"classes/src/operations/divideby.php",
"classes/src/operations/divideinto.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@lange.demon.co.uk"
}
],
"description": "PHP Class for working with matrices",
"homepage": "https://github.com/MarkBaker/PHPMatrix",
"keywords": [
"mathematics",
"matrix",
"vector"
],
"time": "2018-11-04T22:12:12+00:00"
},
{
"name": "monolog/monolog",
"version": "1.24.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
"php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3",
"phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"php-console/php-console": "Allow sending log messages to Google Chrome",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"sentry/sentry": "Allow sending log messages to a Sentry server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "http://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"time": "2018-11-05T09:00:11+00:00"
},
{
"name": "mtdowling/cron-expression",
"version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/mtdowling/cron-expression.git",
"reference": "9504fa9ea681b586028adaaa0877db4aecf32bad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9504fa9ea681b586028adaaa0877db4aecf32bad",
"reference": "9504fa9ea681b586028adaaa0877db4aecf32bad",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "~4.0|~5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Cron\\": "src/Cron/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due",
"keywords": [
"cron",
"schedule"
],
"time": "2017-01-23T04:29:33+00:00"
},
{
"name": "overtrue/pinyin",
"version": "3.0.6",
"source": {
"type": "git",
"url": "https://github.com/overtrue/pinyin.git",
"reference": "3b781d267197b74752daa32814d3a2cf5d140779"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/overtrue/pinyin/zipball/3b781d267197b74752daa32814d3a2cf5d140779",
"reference": "3b781d267197b74752daa32814d3a2cf5d140779",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"type": "library",
"autoload": {
"psr-4": {
"Overtrue\\Pinyin\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Carlos",
"homepage": "http://github.com/overtrue"
}
],
"description": "Chinese to pinyin translator.",
"homepage": "https://github.com/overtrue/pinyin",
"keywords": [
"Chinese",
"Pinyin",
"cn2pinyin"
],
"time": "2017-07-10T07:20:01+00:00"
},
{
"name": "overtrue/socialite",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/overtrue/socialite.git",
"reference": "fda55f0acef43a144799b1957a8f93d9f5deffce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/overtrue/socialite/zipball/fda55f0acef43a144799b1957a8f93d9f5deffce",
"reference": "fda55f0acef43a144799b1957a8f93d9f5deffce",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "~5.0|~6.0",
"php": ">=5.4.0",
"symfony/http-foundation": "~2.6|~2.7|~2.8|~3.0"
},
"require-dev": {
"mockery/mockery": "~0.9",
"phpunit/phpunit": "~4.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Overtrue\\Socialite\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "overtrue",
"email": "anzhengchao@gmail.com"
}
],
"description": "A collection of OAuth 2 packages that extracts from laravel/socialite.",
"keywords": [
"login",
"oauth",
"qq",
"social",
"wechat",
"weibo"
],
"time": "2017-08-04T06:28:22+00:00"
},
{
"name": "overtrue/wechat",
"version": "3.3.33",
"source": {
"type": "git",
"url": "https://github.com/overtrue/wechat.git",
"reference": "78e5476df330754040d1c400d0bca640d5b77cb7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/overtrue/wechat/zipball/78e5476df330754040d1c400d0bca640d5b77cb7",
"reference": "78e5476df330754040d1c400d0bca640d5b77cb7",
"shasum": ""
},
"require": {
"doctrine/cache": "1.4.*",
"ext-openssl": "*",
"guzzlehttp/guzzle": "~6.2",
"monolog/monolog": "^1.17",
"overtrue/socialite": "^1.0.25",
"php": ">=5.5.0",
"pimple/pimple": "~3.0",
"symfony/http-foundation": "~2.6|~2.7|~2.8|~3.0",
"symfony/psr-http-message-bridge": "~0.3|^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.9",
"overtrue/phplint": "dev-master",
"phpunit/phpunit": "~4.0"
},
"type": "library",
"autoload": {
"psr-4": {
"EasyWeChat\\": "src/"
},
"files": [
"src/Payment/helpers.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "overtrue",
"email": "anzhengchao@gmail.com"
}
],
"description": "微信SDK",
"keywords": [
"sdk",
"wechat",
"weixin",
"weixin-sdk"
],
"time": "2018-10-17T12:27:27+00:00"
},
{
"name": "paragonie/random_compat",
"version": "v9.99.99",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
"reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
"reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
"shasum": ""
},
"require": {
"php": "^7"
},
"require-dev": {
"phpunit/phpunit": "4.*|5.*",
"vimeo/psalm": "^1"
},
"suggest": {
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paragon Initiative Enterprises",
"email": "security@paragonie.com",
"homepage": "https://paragonie.com"
}
],
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
"keywords": [
"csprng",
"polyfill",
"pseudorandom",
"random"
],
"time": "2018-07-02T15:55:56+00:00"
},
{
"name": "phpmailer/phpmailer",
"version": "v5.2.27",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "dde1db116511aa4956389d75546c5be4c2beb2a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dde1db116511aa4956389d75546c5be4c2beb2a6",
"reference": "dde1db116511aa4956389d75546c5be4c2beb2a6",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"php": ">=5.0.0"
},
"require-dev": {
"doctrine/annotations": "1.2.*",
"jms/serializer": "0.16.*",
"phpdocumentor/phpdocumentor": "2.*",
"phpunit/phpunit": "4.8.*",
"symfony/debug": "2.8.*",
"symfony/filesystem": "2.8.*",
"symfony/translation": "2.8.*",
"symfony/yaml": "2.8.*",
"zendframework/zend-cache": "2.5.1",
"zendframework/zend-config": "2.5.1",
"zendframework/zend-eventmanager": "2.5.1",
"zendframework/zend-filter": "2.5.1",
"zendframework/zend-i18n": "2.5.1",
"zendframework/zend-json": "2.5.1",
"zendframework/zend-math": "2.5.1",
"zendframework/zend-serializer": "2.5.*",
"zendframework/zend-servicemanager": "2.5.*",
"zendframework/zend-stdlib": "2.5.1"
},
"suggest": {
"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
},
"type": "library",
"autoload": {
"classmap": [
"class.phpmailer.php",
"class.phpmaileroauth.php",
"class.phpmaileroauthgoogle.php",
"class.smtp.php",
"class.pop3.php",
"extras/EasyPeasyICS.php",
"extras/ntlm_sasl_client.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1"
],
"authors": [
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"time": "2018-11-15T22:32:31+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.8.1",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "352c7002fefe4e4037d02654d853a1b09520946f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/352c7002fefe4e4037d02654d853a1b09520946f",
"reference": "352c7002fefe4e4037d02654d853a1b09520946f",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"ext-zip": "*",
"ext-zlib": "*",
"markbaker/complex": "^1.4",
"markbaker/matrix": "^1.1",
"php": "^5.6|^7.0",
"psr/simple-cache": "^1.0"
},
"require-dev": {
"doctrine/instantiator": "^1.0.0",
"dompdf/dompdf": "^0.8.0",
"friendsofphp/php-cs-fixer": "@stable",
"jpgraph/jpgraph": "^4.0",
"mpdf/mpdf": "^7.0.0",
"phpcompatibility/php-compatibility": "^8.0",
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.3",
"tecnickcom/tcpdf": "^6.2"
},
"suggest": {
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
"jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
},
"type": "library",
"autoload": {
"psr-4": {
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-or-later"
],
"authors": [
{
"name": "Erik Tilt"
},
{
"name": "Adrien Crivelli"
},
{
"name": "Maarten Balliauw",
"homepage": "https://blog.maartenballiauw.be"
},
{
"name": "Mark Baker",
"homepage": "https://markbakeruk.net"
},
{
"name": "Franck Lefevre",
"homepage": "https://rootslabs.net"
}
],
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
"keywords": [
"OpenXML",
"excel",
"gnumeric",
"ods",
"php",
"spreadsheet",
"xls",
"xlsx"
],
"time": "2019-07-01T20:46:51+00:00"
},
{
"name": "pimple/pimple",
"version": "v3.2.3",
"source": {
"type": "git",
"url": "https://github.com/silexphp/Pimple.git",
"reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32",
"reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/container": "^1.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev"
}
},
"autoload": {
"psr-0": {
"Pimple": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Pimple, a simple Dependency Injection Container",
"homepage": "http://pimple.sensiolabs.org",
"keywords": [
"container",
"dependency injection"
],
"time": "2018-01-21T07:42:36+00:00"
},
{
"name": "psr/container",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
"homepage": "https://github.com/php-fig/container",
"keywords": [
"PSR-11",
"container",
"container-interface",
"container-interop",
"psr"
],
"time": "2017-02-14T16:28:37+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2018-11-20T15:27:04+00:00"
},
{
"name": "psr/simple-cache",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/simple-cache.git",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\SimpleCache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interfaces for simple caching",
"keywords": [
"cache",
"caching",
"psr",
"psr-16",
"simple-cache"
],
"time": "2017-10-23T01:57:42+00:00"
},
{
"name": "ralouphie/getallheaders",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/ralouphie/getallheaders.git",
"reference": "120b605dfeb996808c31b6477290a714d356e822"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
"reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": ""
},
"require": {
"php": ">=5.6"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.1",
"phpunit/phpunit": "^5 || ^6.5"
},
"type": "library",
"autoload": {
"files": [
"src/getallheaders.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ralph Khattar",
"email": "ralph.khattar@gmail.com"
}
],
"description": "A polyfill for getallheaders.",
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v3.4.29",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "8cfbf75bb3a72963b12c513a73e9247891df24f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/8cfbf75bb3a72963b12c513a73e9247891df24f8",
"reference": "8cfbf75bb3a72963b12c513a73e9247891df24f8",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"symfony/polyfill-mbstring": "~1.1",
"symfony/polyfill-php70": "~1.6"
},
"require-dev": {
"symfony/expression-language": "~2.8|~3.0|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\HttpFoundation\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
"time": "2019-06-22T20:10:25+00:00"
},
{
"name": "symfony/options-resolver",
"version": "v3.4.29",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "ed3b397f9c07c8ca388b2a1ef744403b4d4ecc44"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/ed3b397f9c07c8ca388b2a1ef744403b4d4ecc44",
"reference": "ed3b397f9c07c8ca388b2a1ef744403b4d4ecc44",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\OptionsResolver\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony OptionsResolver Component",
"homepage": "https://symfony.com",
"keywords": [
"config",
"configuration",
"options"
],
"time": "2019-04-10T16:00:48+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.11.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609",
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.11-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"time": "2019-02-06T07:57:58+00:00"
},
{
"name": "symfony/polyfill-php70",
"version": "v1.11.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
"reference": "bc4858fb611bda58719124ca079baff854149c89"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/bc4858fb611bda58719124ca079baff854149c89",
"reference": "bc4858fb611bda58719124ca079baff854149c89",
"shasum": ""
},
"require": {
"paragonie/random_compat": "~1.0|~2.0|~9.99",
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.11-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php70\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2019-02-06T07:57:58+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
"version": "v1.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/psr-http-message-bridge.git",
"reference": "a33352af16f78a5ff4f9d90811536abf210df12b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/a33352af16f78a5ff4f9d90811536abf210df12b",
"reference": "a33352af16f78a5ff4f9d90811536abf210df12b",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0",
"psr/http-message": "^1.0",
"symfony/http-foundation": "^2.3.42 || ^3.4 || ^4.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^3.4 || ^4.0"
},
"suggest": {
"nyholm/psr7": "For a super lightweight PSR-7/17 implementation"
},
"type": "symfony-bridge",
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bridge\\PsrHttpMessage\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "PSR HTTP message bridge",
"homepage": "http://symfony.com",
"keywords": [
"http",
"http-message",
"psr-17",
"psr-7"
],
"time": "2019-04-03T17:09:40+00:00"
},
{
"name": "topthink/framework",
"version": "v5.0.24",
"source": {
"type": "git",
"url": "https://github.com/top-think/framework.git",
"reference": "c255c22b2f5fa30f320ecf6c1d29f7740eb3e8be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/framework/zipball/c255c22b2f5fa30f320ecf6c1d29f7740eb3e8be",
"reference": "c255c22b2f5fa30f320ecf6c1d29f7740eb3e8be",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"topthink/think-installer": "~1.0"
},
"require-dev": {
"johnkary/phpunit-speedtrap": "^1.0",
"mikey179/vfsstream": "~1.6",
"phpdocumentor/reflection-docblock": "^2.0",
"phploc/phploc": "2.*",
"phpunit/phpunit": "4.8.*",
"sebastian/phpcpd": "2.*"
},
"type": "think-framework",
"autoload": {
"psr-4": {
"think\\": "library/think"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "liu21st",
"email": "liu21st@gmail.com"
}
],
"description": "the new thinkphp framework",
"homepage": "http://thinkphp.cn/",
"keywords": [
"framework",
"orm",
"thinkphp"
],
"time": "2019-01-11T08:04:58+00:00"
},
{
"name": "topthink/think-captcha",
"version": "v1.0.8",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-captcha.git",
"reference": "1d64363c814c92f6086c4fa5e3223fe7e23db09d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-captcha/zipball/1d64363c814c92f6086c4fa5e3223fe7e23db09d",
"reference": "1d64363c814c92f6086c4fa5e3223fe7e23db09d",
"shasum": ""
},
"require": {
"topthink/framework": "~5.0.0",
"topthink/think-installer": ">=1.0.10"
},
"type": "library",
"autoload": {
"psr-4": {
"think\\captcha\\": "src/"
},
"files": [
"src/helper.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "yunwuxin",
"email": "448901948@qq.com"
}
],
"description": "captcha package for thinkphp5",
"time": "2019-01-28T04:48:36+00:00"
},
{
"name": "topthink/think-helper",
"version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-helper.git",
"reference": "8ba5f66e68106369fcc3211e7d2dbaf7bc9ce455"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-helper/zipball/8ba5f66e68106369fcc3211e7d2dbaf7bc9ce455",
"reference": "8ba5f66e68106369fcc3211e7d2dbaf7bc9ce455",
"shasum": ""
},
"type": "library",
"autoload": {
"psr-4": {
"think\\helper\\": "src"
},
"files": [
"src/helper.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "yunwuxin",
"email": "448901948@qq.com"
}
],
"description": "The ThinkPHP5 Helper Package",
"time": "2019-03-14T09:28:59+00:00"
},
{
"name": "topthink/think-image",
"version": "v1.0.7",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-image.git",
"reference": "8586cf47f117481c6d415b20f7dedf62e79d5512"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-image/zipball/8586cf47f117481c6d415b20f7dedf62e79d5512",
"reference": "8586cf47f117481c6d415b20f7dedf62e79d5512",
"shasum": ""
},
"require": {
"ext-gd": "*"
},
"require-dev": {
"phpunit/phpunit": "4.8.*",
"topthink/framework": "^5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"think\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "yunwuxin",
"email": "448901948@qq.com"
}
],
"description": "The ThinkPHP5 Image Package",
"time": "2016-09-29T06:05:43+00:00"
},
{
"name": "topthink/think-installer",
"version": "v1.0.12",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-installer.git",
"reference": "1be326e68f63de4e95977ed50f46ae75f017556d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-installer/zipball/1be326e68f63de4e95977ed50f46ae75f017556d",
"reference": "1be326e68f63de4e95977ed50f46ae75f017556d",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0"
},
"require-dev": {
"composer/composer": "1.0.*@dev"
},
"type": "composer-plugin",
"extra": {
"class": "think\\composer\\Plugin"
},
"autoload": {
"psr-4": {
"think\\composer\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "yunwuxin",
"email": "448901948@qq.com"
}
],
"time": "2017-05-27T06:58:09+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.6.0"
},
"platform-dev": []
}
... ...
... ... @@ -2,6 +2,6 @@
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit2537a12e3b63e265e25ee9e73315e195::getLoader();
... ...
... ... @@ -55,6 +55,7 @@ class ClassLoader
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
... ... @@ -272,6 +273,26 @@ class ClassLoader
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
... ... @@ -313,11 +334,6 @@ class ClassLoader
*/
public function findFile($class)
{
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
if ('\\' == $class[0]) {
$class = substr($class, 1);
}
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
... ... @@ -325,6 +341,12 @@ class ClassLoader
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
... ... @@ -333,6 +355,10 @@ class ClassLoader
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
... ... @@ -348,10 +374,14 @@ class ClassLoader
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
if (0 === strpos($class, $prefix)) {
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
... ...
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... ...
... ... @@ -6,29 +6,12 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
'9d8e013a5160a09477beb8e44f8ae97b' => $vendorDir . '/markbaker/matrix/classes/src/functions/adjoint.php',
'6e78d1bdea6248d6aa117229efae50f2' => $vendorDir . '/markbaker/matrix/classes/src/functions/antidiagonal.php',
'4623d87924d94f5412fe5afbf1cef31d' => $vendorDir . '/markbaker/matrix/classes/src/functions/cofactors.php',
'901fd1f6950a637ca85f66b701a45e13' => $vendorDir . '/markbaker/matrix/classes/src/functions/determinant.php',
'83057abc0e4acc99ba80154ee5d02a49' => $vendorDir . '/markbaker/matrix/classes/src/functions/diagonal.php',
'07b7fd7a434451149b4fd477fca0ce06' => $vendorDir . '/markbaker/matrix/classes/src/functions/identity.php',
'c8d43b340583e07ae89f2a3baef2cf89' => $vendorDir . '/markbaker/matrix/classes/src/functions/inverse.php',
'499bb10ed7a3aee2ba4c09a31a85e8d1' => $vendorDir . '/markbaker/matrix/classes/src/functions/minors.php',
'1cad2e6414d652e8b1c64e8967f6f37d' => $vendorDir . '/markbaker/matrix/classes/src/functions/trace.php',
'95a7f134ac17161d07def442b3b737e8' => $vendorDir . '/markbaker/matrix/classes/src/functions/transpose.php',
'b3a6bc628377118d4b4b8ba08d1eb949' => $vendorDir . '/markbaker/matrix/classes/src/operations/add.php',
'5fef6d0e407f3f8887266dfa4a6c534c' => $vendorDir . '/markbaker/matrix/classes/src/operations/directsum.php',
'684ba247e1385946e3babdaa054119de' => $vendorDir . '/markbaker/matrix/classes/src/operations/subtract.php',
'aa53dcba601214d17ad405b7c291b7e8' => $vendorDir . '/markbaker/matrix/classes/src/operations/multiply.php',
'75c79eb1b25749b05a47976f32b0d8a2' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideby.php',
'6ab8ad87a734f276a6bcd5a0fe1289be' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideinto.php',
'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php',
'21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php',
'1546e3f9d127f2a9bb2d1b6c31c26ef1' => $vendorDir . '/markbaker/complex/classes/src/functions/acosh.php',
... ... @@ -71,7 +54,24 @@ return array(
'883af48563631547925fa4c3b48ead07' => $vendorDir . '/markbaker/complex/classes/src/operations/multiply.php',
'f190e3308e6ca23234a2875edc985c03' => $vendorDir . '/markbaker/complex/classes/src/operations/divideby.php',
'ac9e33ce6841aa5bf5d16d465a2f03a7' => $vendorDir . '/markbaker/complex/classes/src/operations/divideinto.php',
'9d8e013a5160a09477beb8e44f8ae97b' => $vendorDir . '/markbaker/matrix/classes/src/functions/adjoint.php',
'6e78d1bdea6248d6aa117229efae50f2' => $vendorDir . '/markbaker/matrix/classes/src/functions/antidiagonal.php',
'4623d87924d94f5412fe5afbf1cef31d' => $vendorDir . '/markbaker/matrix/classes/src/functions/cofactors.php',
'901fd1f6950a637ca85f66b701a45e13' => $vendorDir . '/markbaker/matrix/classes/src/functions/determinant.php',
'83057abc0e4acc99ba80154ee5d02a49' => $vendorDir . '/markbaker/matrix/classes/src/functions/diagonal.php',
'07b7fd7a434451149b4fd477fca0ce06' => $vendorDir . '/markbaker/matrix/classes/src/functions/identity.php',
'c8d43b340583e07ae89f2a3baef2cf89' => $vendorDir . '/markbaker/matrix/classes/src/functions/inverse.php',
'499bb10ed7a3aee2ba4c09a31a85e8d1' => $vendorDir . '/markbaker/matrix/classes/src/functions/minors.php',
'1cad2e6414d652e8b1c64e8967f6f37d' => $vendorDir . '/markbaker/matrix/classes/src/functions/trace.php',
'95a7f134ac17161d07def442b3b737e8' => $vendorDir . '/markbaker/matrix/classes/src/functions/transpose.php',
'b3a6bc628377118d4b4b8ba08d1eb949' => $vendorDir . '/markbaker/matrix/classes/src/operations/add.php',
'5fef6d0e407f3f8887266dfa4a6c534c' => $vendorDir . '/markbaker/matrix/classes/src/operations/directsum.php',
'684ba247e1385946e3babdaa054119de' => $vendorDir . '/markbaker/matrix/classes/src/operations/subtract.php',
'aa53dcba601214d17ad405b7c291b7e8' => $vendorDir . '/markbaker/matrix/classes/src/operations/multiply.php',
'75c79eb1b25749b05a47976f32b0d8a2' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideby.php',
'6ab8ad87a734f276a6bcd5a0fe1289be' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideinto.php',
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
'488987c28e9b5e95a1ce6b6bcb94606c' => $vendorDir . '/karsonzhang/fastadmin-addons/src/common.php',
'9e090711773bfc38738f5dbaee5a7f14' => $vendorDir . '/overtrue/wechat/src/Payment/helpers.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
'488987c28e9b5e95a1ce6b6bcb94606c' => $vendorDir . '/karsonzhang/fastadmin-addons/src/common.php',
);
... ...
... ... @@ -9,7 +9,7 @@ return array(
'think\\helper\\' => array($vendorDir . '/topthink/think-helper/src'),
'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'),
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
'think\\' => array($baseDir . '/thinkphp/library/think', $vendorDir . '/karsonzhang/fastadmin-addons/src'),
'think\\' => array($vendorDir . '/karsonzhang/fastadmin-addons/src', $baseDir . '/thinkphp/library/think', $vendorDir . '/topthink/think-image/src'),
'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
... ...
... ... @@ -23,7 +23,7 @@ class ComposerAutoloaderInit2537a12e3b63e265e25ee9e73315e195
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit2537a12e3b63e265e25ee9e73315e195', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
... ...
... ... @@ -7,29 +7,12 @@ namespace Composer\Autoload;
class ComposerStaticInit2537a12e3b63e265e25ee9e73315e195
{
public static $files = array (
'023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
'9d8e013a5160a09477beb8e44f8ae97b' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/adjoint.php',
'6e78d1bdea6248d6aa117229efae50f2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/antidiagonal.php',
'4623d87924d94f5412fe5afbf1cef31d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/cofactors.php',
'901fd1f6950a637ca85f66b701a45e13' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/determinant.php',
'83057abc0e4acc99ba80154ee5d02a49' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/diagonal.php',
'07b7fd7a434451149b4fd477fca0ce06' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/identity.php',
'c8d43b340583e07ae89f2a3baef2cf89' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/inverse.php',
'499bb10ed7a3aee2ba4c09a31a85e8d1' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/minors.php',
'1cad2e6414d652e8b1c64e8967f6f37d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/trace.php',
'95a7f134ac17161d07def442b3b737e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/transpose.php',
'b3a6bc628377118d4b4b8ba08d1eb949' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/add.php',
'5fef6d0e407f3f8887266dfa4a6c534c' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/directsum.php',
'684ba247e1385946e3babdaa054119de' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/subtract.php',
'aa53dcba601214d17ad405b7c291b7e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/multiply.php',
'75c79eb1b25749b05a47976f32b0d8a2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideby.php',
'6ab8ad87a734f276a6bcd5a0fe1289be' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideinto.php',
'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php',
'21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php',
'1546e3f9d127f2a9bb2d1b6c31c26ef1' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acosh.php',
... ... @@ -72,9 +55,26 @@ class ComposerStaticInit2537a12e3b63e265e25ee9e73315e195
'883af48563631547925fa4c3b48ead07' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/multiply.php',
'f190e3308e6ca23234a2875edc985c03' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideby.php',
'ac9e33ce6841aa5bf5d16d465a2f03a7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideinto.php',
'9d8e013a5160a09477beb8e44f8ae97b' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/adjoint.php',
'6e78d1bdea6248d6aa117229efae50f2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/antidiagonal.php',
'4623d87924d94f5412fe5afbf1cef31d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/cofactors.php',
'901fd1f6950a637ca85f66b701a45e13' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/determinant.php',
'83057abc0e4acc99ba80154ee5d02a49' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/diagonal.php',
'07b7fd7a434451149b4fd477fca0ce06' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/identity.php',
'c8d43b340583e07ae89f2a3baef2cf89' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/inverse.php',
'499bb10ed7a3aee2ba4c09a31a85e8d1' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/minors.php',
'1cad2e6414d652e8b1c64e8967f6f37d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/trace.php',
'95a7f134ac17161d07def442b3b737e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/transpose.php',
'b3a6bc628377118d4b4b8ba08d1eb949' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/add.php',
'5fef6d0e407f3f8887266dfa4a6c534c' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/directsum.php',
'684ba247e1385946e3babdaa054119de' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/subtract.php',
'aa53dcba601214d17ad405b7c291b7e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/multiply.php',
'75c79eb1b25749b05a47976f32b0d8a2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideby.php',
'6ab8ad87a734f276a6bcd5a0fe1289be' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideinto.php',
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
'488987c28e9b5e95a1ce6b6bcb94606c' => __DIR__ . '/..' . '/karsonzhang/fastadmin-addons/src/common.php',
'9e090711773bfc38738f5dbaee5a7f14' => __DIR__ . '/..' . '/overtrue/wechat/src/Payment/helpers.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
'488987c28e9b5e95a1ce6b6bcb94606c' => __DIR__ . '/..' . '/karsonzhang/fastadmin-addons/src/common.php',
);
public static $prefixLengthsPsr4 = array (
... ... @@ -144,8 +144,9 @@ class ComposerStaticInit2537a12e3b63e265e25ee9e73315e195
),
'think\\' =>
array (
0 => __DIR__ . '/../..' . '/thinkphp/library/think',
1 => __DIR__ . '/..' . '/karsonzhang/fastadmin-addons/src',
0 => __DIR__ . '/..' . '/karsonzhang/fastadmin-addons/src',
1 => __DIR__ . '/../..' . '/thinkphp/library/think',
2 => __DIR__ . '/..' . '/topthink/think-image/src',
),
'Symfony\\Polyfill\\Php70\\' =>
array (
... ...
vendor/
composer.lock
phpunit.xml
... ...
<?php
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit48Migration:risky' => true,
'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice
'array_syntax' => ['syntax' => 'short'],
'fopen_flags' => false,
'ordered_imports' => true,
'protected_to_private' => false,
// Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'],
// Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
])
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->name('*.php')
)
;
... ... @@ -9,20 +9,44 @@ env:
global:
- PHPUNIT_FLAGS="-v"
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
- DEPENDENCIES="nyholm/psr7:^1.1"
matrix:
fast_finish: true
include:
# Minimum supported dependencies with the latest and oldest PHP version
- php: 7.2
- php: 7.3
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
- php: 5.3
dist: 'precise'
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" DEPENDENCIES=""
# Test the latest stable release
- php: 5.3
dist: 'precise'
env: DEPENDENCIES="symfony/phpunit-bridge:>=3.4,<3.4.22||>=4.0,<4.1.11||>=4.2,<4.2.3"
- php: 5.4
env: DEPENDENCIES="zendframework/zend-diactoros:^1.4.1"
- php: 5.5
env: DEPENDENCIES="zendframework/zend-diactoros:^1.4.1"
- php: 5.6
env: DEPENDENCIES="zendframework/zend-diactoros:^1.4.1"
- php: 7.0
env: DEPENDENCIES="zendframework/zend-diactoros:^1.4.1 http-interop/http-factory-diactoros:^1.0"
- php: 7.1
- php: 7.2
- php: 7.3
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text"
# Test LTS versions. This makes sure we do not use Symfony packages with version greater
# than 2 or 3 respectively.
- php: 7.3
env: DEPENDENCIES="$DEPENDENCIES symfony/lts:^2 symfony/force-lowest:~2.8.0"
- php: 7.3
env: DEPENDENCIES="$DEPENDENCIES symfony/lts:^3 symfony/force-lowest:~3.4.0"
# Latest commit to master
- php: 7.2
- php: 7.3
env: STABILITY="dev"
allow_failures:
... ... @@ -44,4 +68,4 @@ script:
- composer validate --strict --no-check-lock
# simple-phpunit is the PHPUnit wrapper provided by the PHPUnit Bridge component and
# it helps with testing legacy code and deprecations (composer require symfony/phpunit-bridge)
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS
\ No newline at end of file
... ...
... ... @@ -11,8 +11,6 @@
namespace Symfony\Bridge\PsrHttpMessage\Factory;
@trigger_error(sprintf('The "%s" class is deprecated since symfony/psr-http-message-bridge 1.2, use PsrHttpFactory instead.', DiactorosFactory::class), E_USER_DEPRECATED);
use Psr\Http\Message\UploadedFileInterface;
use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
... ... @@ -30,8 +28,6 @@ use Zend\Diactoros\UploadedFile as DiactorosUploadedFile;
* Builds Psr\HttpMessage instances using the Zend Diactoros implementation.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*
* @deprecated since symfony/psr-http-message-bridge 1.2, use PsrHttpFactory instead
*/
class DiactorosFactory implements HttpMessageFactoryInterface
{
... ... @@ -52,7 +48,12 @@ class DiactorosFactory implements HttpMessageFactoryInterface
: \Zend\Diactoros\normalizeServer($symfonyRequest->server->all());
$headers = $symfonyRequest->headers->all();
$body = new DiactorosStream($symfonyRequest->getContent(true));
if (PHP_VERSION_ID < 50600) {
$body = new DiactorosStream('php://temp', 'wb+');
$body->write($symfonyRequest->getContent());
} else {
$body = new DiactorosStream($symfonyRequest->getContent(true));
}
$files = method_exists('Zend\Diactoros\ServerRequestFactory', 'normalizeFiles')
? DiactorosRequestFactory::normalizeFiles($this->getFiles($symfonyRequest->files->all()))
... ... @@ -90,7 +91,7 @@ class DiactorosFactory implements HttpMessageFactoryInterface
*/
private function getFiles(array $uploadedFiles)
{
$files = [];
$files = array();
foreach ($uploadedFiles as $key => $value) {
if (null === $value) {
... ... @@ -152,7 +153,7 @@ class DiactorosFactory implements HttpMessageFactoryInterface
if (!isset($headers['Set-Cookie']) && !isset($headers['set-cookie'])) {
$cookies = $symfonyResponse->headers->getCookies();
if (!empty($cookies)) {
$headers['Set-Cookie'] = [];
$headers['Set-Cookie'] = array();
foreach ($cookies as $cookie) {
$headers['Set-Cookie'][] = $cookie->__toString();
}
... ...
... ... @@ -11,9 +11,8 @@
namespace Symfony\Bridge\PsrHttpMessage\Factory;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\UploadedFileInterface;
use Psr\Http\Message\UriInterface;
use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface;
... ... @@ -21,7 +20,6 @@ use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
/**
* {@inheritdoc}
... ... @@ -31,21 +29,11 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
class HttpFoundationFactory implements HttpFoundationFactoryInterface
{
/**
* @var int The maximum output buffering size for each iteration when sending the response
*/
private $responseBufferMaxLength;
public function __construct(int $responseBufferMaxLength = 16372)
{
$this->responseBufferMaxLength = $responseBufferMaxLength;
}
/**
* {@inheritdoc}
*/
public function createRequest(ServerRequestInterface $psrRequest)
{
$server = [];
$server = array();
$uri = $psrRequest->getUri();
if ($uri instanceof UriInterface) {
... ... @@ -60,7 +48,7 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface
$server = array_replace($server, $psrRequest->getServerParams());
$parsedBody = $psrRequest->getParsedBody();
$parsedBody = \is_array($parsedBody) ? $parsedBody : [];
$parsedBody = is_array($parsedBody) ? $parsedBody : array();
$request = new Request(
$psrRequest->getQueryParams(),
... ... @@ -85,7 +73,7 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface
*/
private function getFiles(array $uploadedFiles)
{
$files = [];
$files = array();
foreach ($uploadedFiles as $key => $value) {
if ($value instanceof UploadedFileInterface) {
... ... @@ -150,25 +138,16 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface
/**
* {@inheritdoc}
*/
public function createResponse(ResponseInterface $psrResponse, bool $streamed = false)
public function createResponse(ResponseInterface $psrResponse)
{
$cookies = $psrResponse->getHeader('Set-Cookie');
$psrResponse = $psrResponse->withoutHeader('Set-Cookie');
if ($streamed) {
$response = new StreamedResponse(
$this->createStreamedResponseCallback($psrResponse->getBody()),
$psrResponse->getStatusCode(),
$psrResponse->getHeaders()
);
} else {
$response = new Response(
$psrResponse->getBody()->__toString(),
$psrResponse->getStatusCode(),
$psrResponse->getHeaders()
);
}
$response = new Response(
$psrResponse->getBody()->__toString(),
$psrResponse->getStatusCode(),
$psrResponse->getHeaders()
);
$response->setProtocolVersion($psrResponse->getProtocolVersion());
foreach ($cookies as $cookie) {
... ... @@ -258,23 +237,4 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface
isset($samesite) ? $samesite : null
);
}
private function createStreamedResponseCallback(StreamInterface $body): callable
{
return function () use ($body) {
if ($body->isSeekable()) {
$body->rewind();
}
if (!$body->isReadable()) {
echo $body;
return;
}
while (!$body->eof()) {
echo $body->read($this->responseBufferMaxLength);
}
};
}
}
... ...
... ... @@ -50,7 +50,7 @@ class PsrHttpFactory implements HttpMessageFactoryInterface
{
$request = $this->serverRequestFactory->createServerRequest(
$symfonyRequest->getMethod(),
$symfonyRequest->getUri(),
$symfonyRequest->getSchemeAndHttpHost().$symfonyRequest->getRequestUri(),
$symfonyRequest->server->all()
);
... ... @@ -58,7 +58,12 @@ class PsrHttpFactory implements HttpMessageFactoryInterface
$request = $request->withHeader($name, $value);
}
$body = $this->streamFactory->createStreamFromResource($symfonyRequest->getContent(true));
if (PHP_VERSION_ID < 50600) {
$body = $this->streamFactory->createStreamFromFile('php://temp', 'wb+');
$body->write($symfonyRequest->getContent());
} else {
$body = $this->streamFactory->createStreamFromResource($symfonyRequest->getContent(true));
}
$request = $request
->withBody($body)
... ... @@ -84,7 +89,7 @@ class PsrHttpFactory implements HttpMessageFactoryInterface
*/
private function getFiles(array $uploadedFiles)
{
$files = [];
$files = array();
foreach ($uploadedFiles as $key => $value) {
if (null === $value) {
... ... @@ -126,7 +131,7 @@ class PsrHttpFactory implements HttpMessageFactoryInterface
*/
public function createResponse(Response $symfonyResponse)
{
$response = $this->responseFactory->createResponse($symfonyResponse->getStatusCode(), Response::$statusTexts[$symfonyResponse->getStatusCode()] ?? '');
$response = $this->responseFactory->createResponse($symfonyResponse->getStatusCode());
if ($symfonyResponse instanceof BinaryFileResponse) {
$stream = $this->streamFactory->createStreamFromFile(
... ... @@ -153,7 +158,7 @@ class PsrHttpFactory implements HttpMessageFactoryInterface
$headers = $symfonyResponse->headers->all();
$cookies = $symfonyResponse->headers->getCookies();
if (!empty($cookies)) {
$headers['Set-Cookie'] = [];
$headers['Set-Cookie'] = array();
foreach ($cookies as $cookie) {
$headers['Set-Cookie'][] = $cookie->__toString();
... ...
... ... @@ -11,8 +11,8 @@
namespace Symfony\Bridge\PsrHttpMessage;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
... ...
... ... @@ -11,8 +11,8 @@
namespace Symfony\Bridge\PsrHttpMessage;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
... ...
... ... @@ -6,12 +6,6 @@ Provides integration for PSR7.
Resources
---------
* [Documentation](https://symfony.com/doc/current/components/psr7.html)
* [SensioFrameworkExtraBundle](https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html#psr-7-support)
Running the tests
-----------------
If you want to run the unit tests, install dev dependencies before
running PHPUnit:
... ...