Merge branch 'main' of https://laimi.lyraiov.com/gitea/Smart-Farm
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,3 +4,5 @@ unpackage
|
||||
node_modules
|
||||
.DS_Store
|
||||
.hbuilderx
|
||||
/vendor/
|
||||
.env
|
||||
|
||||
6
.idea/inspectionProfiles/Project_Default.xml
generated
6
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
63
.idea/php.xml
generated
63
.idea/php.xml
generated
@@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpIncludePathManager">
|
||||
<include_path>
|
||||
<path value="$PROJECT_DIR$/vendor/ramsey/uuid" />
|
||||
<path value="$PROJECT_DIR$/vendor/swoole/ide-helper" />
|
||||
<path value="$PROJECT_DIR$/vendor/predis/predis" />
|
||||
<path value="$PROJECT_DIR$/vendor/danielstjules/stringy" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/opis/closure" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-view" />
|
||||
<path value="$PROJECT_DIR$/vendor/nette/php-generator" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-helper" />
|
||||
<path value="$PROJECT_DIR$/vendor/nette/utils" />
|
||||
<path value="$PROJECT_DIR$/vendor/adbario/php-dot-notation" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-socketlog" />
|
||||
<path value="$PROJECT_DIR$/vendor/alibabacloud/client" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/framework" />
|
||||
<path value="$PROJECT_DIR$/vendor/mtdowling/jmespath.php" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/flysystem-cached-adapter" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/flysystem" />
|
||||
<path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
|
||||
<path value="$PROJECT_DIR$/vendor/justinrainbow/json-schema" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/clagiordano/weblibs-configmanager" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/log" />
|
||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/container" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
||||
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-template" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-swoole" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-multi-app" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-orm" />
|
||||
<path value="$PROJECT_DIR$/app/Common/extend/tencentcloud/vendor/symfony/event-dispatcher" />
|
||||
<path value="$PROJECT_DIR$/app/Common/extend/tencentcloud/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/app/Common/extend/tencentcloud/vendor/guzzle/guzzle" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/phpunit.xml
generated
12
.idea/phpunit.xml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PHPUnit">
|
||||
<option name="directories">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/app/Common/extend/alibabacloud/client/tests" />
|
||||
<option value="$PROJECT_DIR$/app/Common/extend/qiniu/tests" />
|
||||
<option value="$PROJECT_DIR$/app/Common/extend/aliyuncs/oss-sdk-php/tests" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
289
.idea/workspace.xml
generated
289
.idea/workspace.xml
generated
@@ -1,289 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="99b4e818-96bd-4713-9ad7-6cc54b91bc07" name="更改" comment="优化代码">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/phpunit.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/phpunit.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/runtime/index/log/single.log" beforeDir="false" afterPath="$PROJECT_DIR$/runtime/index/log/single.log" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/claim/pages/collage/list.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/claim/pages/collage/list.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/claim/pages/order/breed/list.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/claim/pages/order/breed/list.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/claim/pages/order/collage/detail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/claim/pages/order/collage/detail.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/claim/pages/order/detail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/claim/pages/order/detail.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/farmer/pages/apply.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/farmer/pages/apply.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/land/pages/order/detail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/land/pages/order/detail.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/manifest.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/pages/mine.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/pages/mine.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/detail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/detail.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/integral/list.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/integral/list.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/order.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/order.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/seckill.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/seckill.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/sign.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/sign.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/store.vue" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/shop/pages/store.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/breed-cart.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/breed-fill.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/breed.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/claim.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/distribution-fill.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/distribution.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/done-fill.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/done.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/grow-fill.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/grow.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/idcard.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/idcard_fan.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/order-fill.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/order.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/pay.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/send.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/sow-fill.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/sow.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/tag.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/farm/users.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/shop/cart.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/shop/integral.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/shop/seckill-nav.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/shop/seckill-store.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/shop/seckill-tag.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/shop/seckill.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/static/image/shop/sell_out.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/claim/pages/collage/list.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/claim/pages/collage/list.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/claim/pages/order/breed/list.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/claim/pages/order/breed/list.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/claim/pages/order/collage/detail.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/claim/pages/order/collage/detail.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/claim/pages/order/detail.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/claim/pages/order/detail.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/land/pages/order/detail.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/land/pages/order/detail.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/pages/home.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/pages/home.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/detail.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/detail.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/hot-goods.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/hot-goods.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/integral/list.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/integral/list.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/order.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/order.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/seckill.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/seckill.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/sign.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/sign.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/store.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/.sourcemap/mp-weixin/shop/pages/store.js.map" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/claim/pages/collage/list.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/claim/pages/collage/list.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/claim/pages/order/breed/list.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/claim/pages/order/breed/list.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/claim/pages/order/collage/detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/claim/pages/order/collage/detail.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/claim/pages/order/detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/claim/pages/order/detail.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/common/vendor.js" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/common/vendor.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/farmer/pages/apply.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/farmer/pages/apply.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/land/pages/order/detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/land/pages/order/detail.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/pages/mine.js" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/pages/mine.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/pages/mine.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/pages/mine.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/project.config.json" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/project.config.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/detail.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/detail.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/integral/list.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/integral/list.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/order.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/order.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/seckill.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/seckill.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/sign.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/sign.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/store.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/unpackage/dist/dev/mp-weixin/shop/pages/store.wxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uniapp/uni-app/utils/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/uniapp/uni-app/utils/index.js" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ComposerConfigs">
|
||||
<option name="configs">
|
||||
<option value="$PROJECT_DIR$/app/Common/extend/aliyuncs/oss-sdk-php/composer.json" />
|
||||
<option value="$PROJECT_DIR$/app/Common/extend/qiniu/composer.json" />
|
||||
<option value="$PROJECT_DIR$/app/Common/extend/alibabacloud/client/composer.json" />
|
||||
<option value="$PROJECT_DIR$/app/Common/extend/tencentcloud/composer.json" />
|
||||
</option>
|
||||
</component>
|
||||
<component name="ComposerSettings" synchronizationState="SYNCHRONIZE">
|
||||
<pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
|
||||
<execution />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP">
|
||||
<include_path>
|
||||
<path value="$PROJECT_DIR$/vendor/ramsey/uuid" />
|
||||
<path value="$PROJECT_DIR$/vendor/swoole/ide-helper" />
|
||||
<path value="$PROJECT_DIR$/vendor/predis/predis" />
|
||||
<path value="$PROJECT_DIR$/vendor/danielstjules/stringy" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/opis/closure" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-view" />
|
||||
<path value="$PROJECT_DIR$/vendor/nette/php-generator" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-helper" />
|
||||
<path value="$PROJECT_DIR$/vendor/nette/utils" />
|
||||
<path value="$PROJECT_DIR$/vendor/adbario/php-dot-notation" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-socketlog" />
|
||||
<path value="$PROJECT_DIR$/vendor/alibabacloud/client" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/framework" />
|
||||
<path value="$PROJECT_DIR$/vendor/mtdowling/jmespath.php" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/flysystem-cached-adapter" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/flysystem" />
|
||||
<path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
|
||||
<path value="$PROJECT_DIR$/vendor/justinrainbow/json-schema" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/clagiordano/weblibs-configmanager" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/log" />
|
||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/container" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
||||
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-template" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-swoole" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-multi-app" />
|
||||
<path value="$PROJECT_DIR$/vendor/topthink/think-orm" />
|
||||
<path value="$PROJECT_DIR$/app/Common/extend/tencentcloud/vendor/symfony/event-dispatcher" />
|
||||
<path value="$PROJECT_DIR$/app/Common/extend/tencentcloud/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/app/Common/extend/tencentcloud/vendor/guzzle/guzzle" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 0
|
||||
}</component>
|
||||
<component name="ProjectId" id="37BjwmdOaFtWokojOf9ZP6Z1IbI" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"ASKED_ADD_EXTERNAL_FILES": "true",
|
||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"git-widget-placeholder": "main",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"ts.external.directory.path": "/Applications/PhpStorm.app/Contents/plugins/javascript-impl/jsLanguageServicesImpl/external",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="默认任务">
|
||||
<changelist id="99b4e818-96bd-4713-9ad7-6cc54b91bc07" name="更改" comment="" />
|
||||
<created>1766383599659</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1766383599659</updated>
|
||||
<workItem from="1766383600970" duration="1164000" />
|
||||
<workItem from="1766385133064" duration="17975000" />
|
||||
<workItem from="1766540267475" duration="7888000" />
|
||||
<workItem from="1766627697419" duration="54000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766383620899</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766383620899</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00002" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766383725724</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766383725724</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00003" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766384088985</created>
|
||||
<option name="number" value="00003" />
|
||||
<option name="presentableId" value="LOCAL-00003" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766384088985</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00004" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766385175143</created>
|
||||
<option name="number" value="00004" />
|
||||
<option name="presentableId" value="LOCAL-00004" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766385175143</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00005" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766385211889</created>
|
||||
<option name="number" value="00005" />
|
||||
<option name="presentableId" value="LOCAL-00005" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766385211889</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00006" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766385266137</created>
|
||||
<option name="number" value="00006" />
|
||||
<option name="presentableId" value="LOCAL-00006" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766385266137</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00007" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766385310549</created>
|
||||
<option name="number" value="00007" />
|
||||
<option name="presentableId" value="LOCAL-00007" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766385310549</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00008" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766394714545</created>
|
||||
<option name="number" value="00008" />
|
||||
<option name="presentableId" value="LOCAL-00008" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766394714545</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00009" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766394785668</created>
|
||||
<option name="number" value="00009" />
|
||||
<option name="presentableId" value="LOCAL-00009" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766394785668</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00010" summary="初始化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766396463700</created>
|
||||
<option name="number" value="00010" />
|
||||
<option name="presentableId" value="LOCAL-00010" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766396463700</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00011" summary="优化代码">
|
||||
<option name="closed" value="true" />
|
||||
<created>1766542118270</created>
|
||||
<option name="number" value="00011" />
|
||||
<option name="presentableId" value="LOCAL-00011" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1766542118270</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="12" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<MESSAGE value="初始化代码" />
|
||||
<MESSAGE value="优化代码" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="优化代码" />
|
||||
</component>
|
||||
</project>
|
||||
115
app/ApiRest.php
115
app/ApiRest.php
@@ -2,22 +2,16 @@
|
||||
declare (strict_types=1);
|
||||
|
||||
namespace app;
|
||||
use app\BaseController;
|
||||
use app\card\model\User;
|
||||
use app\card\model\UserPhone;
|
||||
|
||||
use app\farm\model\Farmer;
|
||||
use app\restaurant\model\Table;
|
||||
use app\shop\model\Cap;
|
||||
use longbingcore\tools\LongbingArr;
|
||||
use Qiniu\Auth;
|
||||
use think\App;
|
||||
use think\exception\HttpResponseException;
|
||||
use think\exception\ValidateException;
|
||||
use think\Request;
|
||||
use think\Validate;
|
||||
use think\Response;
|
||||
use think\facade\Db;
|
||||
use think\facade\Lang;
|
||||
|
||||
/**
|
||||
* 控制器基础类
|
||||
*/
|
||||
@@ -86,13 +80,11 @@ abstract class ApiRest extends BaseController
|
||||
|
||||
public function __construct(App $app)
|
||||
{
|
||||
|
||||
|
||||
parent::__construct($app);
|
||||
|
||||
if (in_array($this->_method, ['options', 'Options', 'OPTIONS'])) {
|
||||
|
||||
echo true;exit;
|
||||
echo true;
|
||||
exit;
|
||||
}
|
||||
|
||||
//获取param
|
||||
@@ -103,36 +95,47 @@ abstract class ApiRest extends BaseController
|
||||
$this->_header = $this->request->header();
|
||||
|
||||
|
||||
if (is_dev()) {
|
||||
// 调试代码
|
||||
$debugUid = $this->_param['debug_uid'] ?? ($this->_input['debug_uid'] ?? null);
|
||||
if ($debugUid !== null) {
|
||||
$this->_user_id = $debugUid;
|
||||
$this->_user = [
|
||||
'id' => $this->_user_id,
|
||||
'uniacid' => $this->_uniacid,
|
||||
'nickname' => 'debug',
|
||||
];
|
||||
$this->noNeedLogin[] = $this->request->action();
|
||||
if (isset($this->_param['debug_uniacid'])) {
|
||||
$this->_uniacid = $this->_param['debug_uniacid'];
|
||||
} elseif (isset($this->_input['debug_uniacid'])) {
|
||||
$this->_uniacid = $this->_input['debug_uniacid'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->is_app = !empty($this->_header['isapp']) ? $this->_header['isapp'] : 0;
|
||||
|
||||
if ( defined( 'IS_WEIQIN' ) )
|
||||
{
|
||||
if (defined('IS_WEIQIN')) {
|
||||
global $_GPC, $_W;
|
||||
$this->_uniacid = $_W['uniacid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($this->_param[ 'i' ]))
|
||||
{
|
||||
} else {
|
||||
if (isset($this->_param['i'])) {
|
||||
$this->_uniacid = $this->_param['i'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( defined( 'LONGBING_CARD_UNIACID' ) )
|
||||
{
|
||||
if (defined('LONGBING_CARD_UNIACID')) {
|
||||
|
||||
define('LONGBING_CARD_UNIACID', $this->_uniacid);
|
||||
}
|
||||
|
||||
$this->shareChangeData($this->_param);
|
||||
//获取autograph 小程序用户唯一标示
|
||||
if ( isset( $this->_header[ 'autograph' ] ) && $this->_header[ 'autograph' ])
|
||||
{
|
||||
if (isset($this->_header['autograph']) && $this->_header['autograph']) {
|
||||
$this->autograph = $this->_header['autograph'];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if (!$this->match($this->noNeedLogin)) {
|
||||
|
||||
$this->errorMsg('need login', 401);
|
||||
@@ -152,7 +155,6 @@ abstract class ApiRest extends BaseController
|
||||
}
|
||||
|
||||
landNotice($this->_uniacid);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +163,8 @@ abstract class ApiRest extends BaseController
|
||||
* @DataTime: 2020-08-21 17:43
|
||||
* @功能说明:
|
||||
*/
|
||||
public function shareChangeData($input){
|
||||
public function shareChangeData($input)
|
||||
{
|
||||
|
||||
$arr = [
|
||||
|
||||
@@ -200,6 +203,8 @@ abstract class ApiRest extends BaseController
|
||||
'farm/app/IndexUser/farmerInfo',
|
||||
|
||||
'farm/app/Index/configInfo',
|
||||
|
||||
'farm/app/Index/indexStoreList',
|
||||
];
|
||||
|
||||
if (!empty($input['s']) && in_array($input['s'], $arr)) {
|
||||
@@ -218,18 +223,17 @@ abstract class ApiRest extends BaseController
|
||||
* @DataTime: 2020-07-09 12:00
|
||||
* @功能说明:检测方法传递
|
||||
*/
|
||||
public function match($arr){
|
||||
public function match($arr)
|
||||
{
|
||||
|
||||
|
||||
$arr = is_array($arr) ? $arr : explode(',', $arr);
|
||||
if (!$arr)
|
||||
{
|
||||
if (!$arr) {
|
||||
return FALSE;
|
||||
}
|
||||
$arr = array_map('strtolower', $arr);
|
||||
// 是否存在
|
||||
if (in_array(strtolower($this->request->action()), $arr) || in_array('*', $arr))
|
||||
{
|
||||
if (in_array(strtolower($this->request->action()), $arr) || in_array('*', $arr)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -267,6 +271,7 @@ abstract class ApiRest extends BaseController
|
||||
$result['code'] = $code;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出返回数据
|
||||
* @access protected
|
||||
@@ -289,26 +294,18 @@ abstract class ApiRest extends BaseController
|
||||
*/
|
||||
public function _empty($method)
|
||||
{
|
||||
if ( method_exists( $this, $method . '_' . $this->method . '_' . $this->type ) )
|
||||
{
|
||||
if (method_exists($this, $method . '_' . $this->method . '_' . $this->type)) {
|
||||
// RESTFul方法支持
|
||||
$fun = $method . '_' . $this->method . '_' . $this->type;
|
||||
}
|
||||
elseif ( $this->method == $this->restDefaultMethod && method_exists( $this, $method . '_' . $this->type ) )
|
||||
{
|
||||
} elseif ($this->method == $this->restDefaultMethod && method_exists($this, $method . '_' . $this->type)) {
|
||||
$fun = $method . '_' . $this->type;
|
||||
}
|
||||
elseif ( $this->type == $this->restDefaultType && method_exists( $this, $method . '_' . $this->method ) )
|
||||
{
|
||||
} elseif ($this->type == $this->restDefaultType && method_exists($this, $method . '_' . $this->method)) {
|
||||
$fun = $method . '_' . $this->method;
|
||||
}
|
||||
if ( isset( $fun ) )
|
||||
{
|
||||
if (isset($fun)) {
|
||||
return App::invokeMethod([$this, $fun]
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// 抛出异常
|
||||
throw new \Exception('error action :' . $method);
|
||||
}
|
||||
@@ -350,7 +347,8 @@ abstract class ApiRest extends BaseController
|
||||
* @DataTime: 2021-03-19 15:22
|
||||
* @功能说明:获取当前的门店信息
|
||||
*/
|
||||
public function getStoreInfo($err=1){
|
||||
public function getStoreInfo($err = 1)
|
||||
{
|
||||
|
||||
$user_id = $this->getUserId();
|
||||
|
||||
@@ -389,7 +387,6 @@ abstract class ApiRest extends BaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Purpose: 通过小程序端的用户标示获取用户id
|
||||
*
|
||||
@@ -412,8 +409,7 @@ abstract class ApiRest extends BaseController
|
||||
return $id;
|
||||
}
|
||||
|
||||
if ( ($value === false &&!$this->match($this->noNeedLogin)))
|
||||
{
|
||||
if (($value === false && !$this->match($this->noNeedLogin))) {
|
||||
|
||||
$this->errorMsg('need login', 401);
|
||||
|
||||
@@ -439,14 +435,15 @@ abstract class ApiRest extends BaseController
|
||||
|
||||
return !empty($value['id']) ? $value['id'] : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取支付信息
|
||||
*/
|
||||
|
||||
|
||||
|
||||
public function payConfig ($uniacid = '1',$is_app=7){
|
||||
public function payConfig($uniacid = '1', $is_app = 7)
|
||||
{
|
||||
|
||||
if ($is_app == 7) {
|
||||
|
||||
@@ -521,25 +518,22 @@ abstract class ApiRest extends BaseController
|
||||
->where(['user_id' => $to_uid])
|
||||
->order('id desc')
|
||||
->select();
|
||||
if ( empty( $formId ) )
|
||||
{
|
||||
if (empty($formId)) {
|
||||
return false;
|
||||
}
|
||||
if ( $formId[ 0 ][ 'create_time' ] < $beginTime )
|
||||
{
|
||||
if ($formId[0]['create_time'] < $beginTime) {
|
||||
Db::name('longbing_card_formId')
|
||||
->where(['id' => $formId[0]['id']])
|
||||
->delete();
|
||||
$this->getFormId($to_uid);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Db::name('longbing_card_formId')
|
||||
->where(['id' => $formId[0]['id']])
|
||||
->delete();
|
||||
return $formId[0]['formId'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* User: chenniang
|
||||
* Date: 2019-09-12 20:37
|
||||
@@ -547,7 +541,8 @@ abstract class ApiRest extends BaseController
|
||||
* @return void
|
||||
* descption:直接抛出异常
|
||||
*/
|
||||
protected function errorMsg($msg = '',$code = 400){
|
||||
protected function errorMsg($msg = '', $code = 400)
|
||||
{
|
||||
$msg = Lang::get($msg);
|
||||
$this->results($msg, $code);
|
||||
}
|
||||
|
||||
@@ -5047,6 +5047,7 @@ if (!function_exists('getRangeMem')) {
|
||||
if (empty($host)) return false;
|
||||
|
||||
$port = !empty($urlinfo['scheme']) && $urlinfo['scheme'] == 'https' ? 443 : 80;//判断https 还是 http
|
||||
$port = '';
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
$timeout = 50;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace app\farm\controller;
|
||||
|
||||
use app\ApiRest;
|
||||
|
||||
|
||||
@@ -21,7 +23,6 @@ use app\farm\model\WelfareColumn;
|
||||
use app\massage\model\Config;
|
||||
|
||||
|
||||
|
||||
use app\farm\model\Address;
|
||||
|
||||
use app\farm\model\User;
|
||||
@@ -30,6 +31,9 @@ use app\publics\model\TmplConfig;
|
||||
|
||||
use longbingcore\wxcore\YsCloudApi;
|
||||
use think\App;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\facade\Db;
|
||||
use think\Request;
|
||||
|
||||
@@ -40,7 +44,8 @@ class Index extends ApiRest
|
||||
protected $model;
|
||||
|
||||
|
||||
public function __construct(App $app) {
|
||||
public function __construct(App $app)
|
||||
{
|
||||
|
||||
parent::__construct($app);
|
||||
|
||||
@@ -49,13 +54,59 @@ class Index extends ApiRest
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 农场列表
|
||||
* @return mixed
|
||||
* @throws DbException
|
||||
* @throws ModelNotFoundException
|
||||
* @throws DataNotFoundException
|
||||
*/
|
||||
public function indexStoreList()
|
||||
{
|
||||
$dis = [
|
||||
|
||||
'uniacid' => $this->_uniacid,
|
||||
|
||||
'status' => 2,
|
||||
|
||||
'type' => 2,
|
||||
|
||||
'business_status' => 1
|
||||
];
|
||||
|
||||
$farmer_model = new \app\farm\model\Farmer();
|
||||
|
||||
$lat = !empty($input['lat']) ? $input['lat'] : 0;
|
||||
|
||||
$lng = !empty($input['lng']) ? $input['lng'] : 0;
|
||||
|
||||
$alh = '(2 * 6378.137* ASIN(SQRT(POW(SIN(PI()*(' . $lng . '- `lng`)/360),2)+COS(PI()*33.07078170776367/180)* COS(' . $lat . ' * PI()/180)*POW(SIN(PI()*(' . $lat . '- lat)/360),2))))*1000 as distance';
|
||||
//门店列表
|
||||
$store = $farmer_model->where($dis)->field(['*', $alh])->order('distance,id desc')->limit(10)->select()->toArray();
|
||||
|
||||
if (!empty($store)) {
|
||||
|
||||
foreach ($store as &$v) {
|
||||
|
||||
$v['distance'] = getDistances($v['lng'], $v['lat'], $lng, $lat);
|
||||
|
||||
$v['distance'] = $farmer_model->getDistanceAttr($v['distance']);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $this->success($store);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-03-02 16:58
|
||||
* @功能说明:首页
|
||||
*/
|
||||
public function index(){
|
||||
public function index()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -174,22 +225,14 @@ class Index extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-02-18 16:41
|
||||
* @功能说明:获取天气
|
||||
*/
|
||||
public function weather(){
|
||||
|
||||
public function weather()
|
||||
{
|
||||
$input = $this->_param;
|
||||
|
||||
$dis = [
|
||||
|
||||
'uniacid' => $this->_uniacid
|
||||
@@ -242,10 +285,9 @@ class Index extends ApiRest
|
||||
* @DataTime: 2021-03-23 14:16
|
||||
* @功能说明:获取配置信息
|
||||
*/
|
||||
public function configInfo(){
|
||||
|
||||
public function configInfo()
|
||||
{
|
||||
$dis = [
|
||||
|
||||
'uniacid' => $this->_uniacid
|
||||
];
|
||||
|
||||
@@ -258,13 +300,13 @@ class Index extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-12-30 15:21
|
||||
* @功能说明:
|
||||
*/
|
||||
public function farmerSelectList(){
|
||||
public function farmerSelectList()
|
||||
{
|
||||
|
||||
$dis = [
|
||||
|
||||
@@ -289,7 +331,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-01-07 14:35
|
||||
* @功能说明:农场列表
|
||||
*/
|
||||
public function farmerList(){
|
||||
public function farmerList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -368,7 +411,8 @@ class Index extends ApiRest
|
||||
* @功能说明:农场详情
|
||||
*
|
||||
*/
|
||||
public function farmerInfo(){
|
||||
public function farmerInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -404,7 +448,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-01-06 15:21
|
||||
* @功能说明:文章详情
|
||||
*/
|
||||
public function articleInfo(){
|
||||
public function articleInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -425,7 +470,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2021-12-30 11:51
|
||||
* @功能说明:关于我们列表
|
||||
*/
|
||||
public function aboutUsList(){
|
||||
public function aboutUsList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -454,7 +500,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2021-11-08 13:23
|
||||
* @功能说明:我们列表详情
|
||||
*/
|
||||
public function aboutUsInfoType(){
|
||||
public function aboutUsInfoType()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -491,7 +538,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-02-09 17:07
|
||||
* @功能说明:添加评价
|
||||
*/
|
||||
public function evaluateAdd(){
|
||||
public function evaluateAdd()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -547,7 +595,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-02-09 17:17
|
||||
* @功能说明:用户评列表
|
||||
*/
|
||||
public function userEvaluateList(){
|
||||
public function userEvaluateList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -591,7 +640,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-02-09 17:21
|
||||
* @功能说明:评价详情
|
||||
*/
|
||||
public function evaluateInfo(){
|
||||
public function evaluateInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -614,7 +664,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-02-09 17:21
|
||||
* @功能说明:评价详情
|
||||
*/
|
||||
public function evaluateUpdate(){
|
||||
public function evaluateUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -644,7 +695,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-02-10 17:23
|
||||
* @功能说明:待评价订单
|
||||
*/
|
||||
public function noEvaluateOrderList(){
|
||||
public function noEvaluateOrderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -705,7 +757,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-02-11 10:11
|
||||
* @功能说明:根据type获取对应物品的评价
|
||||
*/
|
||||
public function goodsEvaluateList(){
|
||||
public function goodsEvaluateList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -714,7 +767,6 @@ class Index extends ApiRest
|
||||
$data = $eva_model->goodsEvaluateList($input['goods_id'], $input['type'], $input['is_goods']);
|
||||
|
||||
return $this->success($data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -723,14 +775,14 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-03-09 16:50
|
||||
* @功能说明:模版列表
|
||||
*/
|
||||
public function tmpList(){
|
||||
public function tmpList()
|
||||
{
|
||||
//模版消息model
|
||||
$tmpl_model = new TmplConfig();
|
||||
//获取模版
|
||||
$tmpl = $tmpl_model->where(['uniacid' => $this->_uniacid])->select()->toArray();
|
||||
|
||||
return $this->success($tmpl);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -739,7 +791,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-04-11 15:56
|
||||
* @功能说明:监控列表
|
||||
*/
|
||||
public function monitorList(){
|
||||
public function monitorList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -795,7 +848,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-04-11 16:31
|
||||
* @功能说明:获取监控地址
|
||||
*/
|
||||
public function getMonitorInfo(){
|
||||
public function getMonitorInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -817,7 +871,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-04-12 11:01
|
||||
* @功能说明:获取萤石云token
|
||||
*/
|
||||
public function getYsToken(){
|
||||
public function getYsToken()
|
||||
{
|
||||
|
||||
$api = new YsCloudApi($this->_uniacid);
|
||||
|
||||
@@ -833,7 +888,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-04-12 11:02
|
||||
* @功能说明:旋转摄像头
|
||||
*/
|
||||
public function ysStartTurn(){
|
||||
public function ysStartTurn()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -850,13 +906,13 @@ class Index extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-04-12 11:02
|
||||
* @功能说明:停止旋转摄像头
|
||||
*/
|
||||
public function ysStopTurn(){
|
||||
public function ysStopTurn()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -875,7 +931,6 @@ class Index extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function haveStore()
|
||||
{
|
||||
|
||||
@@ -895,7 +950,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-07-22 17:34
|
||||
* @功能说明:公益列表
|
||||
*/
|
||||
public function welfareColumnList(){
|
||||
public function welfareColumnList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -926,7 +982,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-07-22 17:34
|
||||
* @功能说明:公益列表
|
||||
*/
|
||||
public function welfareColumnInfo(){
|
||||
public function welfareColumnInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -946,14 +1003,13 @@ class Index extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-06-15 16:29
|
||||
* @功能说明:优惠券
|
||||
*/
|
||||
public function couponList(){
|
||||
public function couponList()
|
||||
{
|
||||
|
||||
$coupon_record_model = new CouponRecord();
|
||||
|
||||
@@ -1007,7 +1063,8 @@ class Index extends ApiRest
|
||||
* @DataTime: 2022-06-15 22:49
|
||||
* @功能说明:用户获取卡券
|
||||
*/
|
||||
public function userGetCoupon(){
|
||||
public function userGetCoupon()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1024,6 +1081,4 @@ class Index extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace app\farm\controller;
|
||||
|
||||
use app\ApiRest;
|
||||
|
||||
use app\farm\model\Address;
|
||||
@@ -47,7 +49,8 @@ class IndexClaim extends ApiRest
|
||||
|
||||
protected $app;
|
||||
|
||||
public function __construct(App $app) {
|
||||
public function __construct(App $app)
|
||||
{
|
||||
|
||||
parent::__construct($app);
|
||||
|
||||
@@ -70,8 +73,11 @@ class IndexClaim extends ApiRest
|
||||
'pay_config' => $this->payConfig()
|
||||
|
||||
);
|
||||
// 测试环境 不调取
|
||||
if (!is_local()) {
|
||||
publisher(json_encode($push_data, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -79,7 +85,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-01-06 14:03
|
||||
* @功能说明:认养轮播图
|
||||
*/
|
||||
public function claimBanner(){
|
||||
public function claimBanner()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -101,15 +108,13 @@ class IndexClaim extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-12-14 17:42
|
||||
* @功能说明:认养分类列表
|
||||
*/
|
||||
public function claimCateList(){
|
||||
public function claimCateList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -136,7 +141,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2021-12-14 17:53
|
||||
* @功能说明:认养列表
|
||||
*/
|
||||
public function claimList(){
|
||||
public function claimList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -217,7 +223,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2021-12-16 10:34
|
||||
* @功能说明:认养详情
|
||||
*/
|
||||
public function claimInfo(){
|
||||
public function claimInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -260,7 +267,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-08-16 17:51
|
||||
* @功能说明:认养拼团列表
|
||||
*/
|
||||
public function claimCollageList(){
|
||||
public function claimCollageList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -284,7 +292,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-08-16 17:53
|
||||
* @功能说明:认养拼团详情
|
||||
*/
|
||||
public function claimCollageInfo(){
|
||||
public function claimCollageInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -322,17 +331,13 @@ class IndexClaim extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-01-10 10:05
|
||||
* @功能说明:下单页信息
|
||||
*/
|
||||
public function claimPayOrderInfo(){
|
||||
public function claimPayOrderInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -387,7 +392,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2021-12-16 10:57
|
||||
* @功能说明:认养下单
|
||||
*/
|
||||
public function claimPayOrder(){
|
||||
public function claimPayOrder()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -621,7 +627,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2021-12-20 10:17
|
||||
* @功能说明:认养重新下单
|
||||
*/
|
||||
public function claimRePayOrder(){
|
||||
public function claimRePayOrder()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -679,7 +686,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2021-12-28 11:26
|
||||
* @功能说明:用户下单列表
|
||||
*/
|
||||
public function orderList(){
|
||||
public function orderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -754,7 +762,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2021-12-28 11:52
|
||||
* @功能说明:用户下单详情
|
||||
*/
|
||||
public function orderInfo(){
|
||||
public function orderInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -852,7 +861,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-01-10 13:42
|
||||
* @功能说明:
|
||||
*/
|
||||
public function cancelOrder(){
|
||||
public function cancelOrder()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -882,13 +892,13 @@ class IndexClaim extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-12-29 10:29
|
||||
* @功能说明:养殖管理
|
||||
*/
|
||||
public function breedList(){
|
||||
public function breedList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -951,7 +961,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2021-12-29 17:02
|
||||
* @功能说明:养殖订单
|
||||
*/
|
||||
public function breedOrder(){
|
||||
public function breedOrder()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1091,7 +1102,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-01-10 15:52
|
||||
* @功能说明:养殖订单列表
|
||||
*/
|
||||
public function breedOrderList(){
|
||||
public function breedOrderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1113,7 +1125,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-01-10 16:07
|
||||
* @功能说明:养殖订单详情
|
||||
*/
|
||||
public function breedOrderInfo(){
|
||||
public function breedOrderInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1138,7 +1151,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-02-08 17:14
|
||||
* @功能说明:配送订单列表
|
||||
*/
|
||||
public function userSendOrderList(){
|
||||
public function userSendOrderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1156,7 +1170,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-02-08 13:53
|
||||
* @功能说明:申请认养订单发货
|
||||
*/
|
||||
public function sendOrderApply(){
|
||||
public function sendOrderApply()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1353,7 +1368,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-02-08 15:23
|
||||
* @功能说明:配送订单下单详情
|
||||
*/
|
||||
public function sendOrderPayInfo(){
|
||||
public function sendOrderPayInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1416,7 +1432,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-02-08 15:10
|
||||
* @功能说明:获取配送时间段
|
||||
*/
|
||||
public function sendTime(){
|
||||
public function sendTime()
|
||||
{
|
||||
|
||||
$config_model = new Config();
|
||||
|
||||
@@ -1453,7 +1470,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-02-08 17:57
|
||||
* @功能说明:配送订单退款
|
||||
*/
|
||||
public function sendOrderRefund(){
|
||||
public function sendOrderRefund()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1513,7 +1531,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-02-09 10:24
|
||||
* @功能说明:配送订单收货
|
||||
*/
|
||||
public function sendOrderReceiving(){
|
||||
public function sendOrderReceiving()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1548,7 +1567,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-02-09 14:00
|
||||
* @功能说明:配送订单详情
|
||||
*/
|
||||
public function sendOrderInfo(){
|
||||
public function sendOrderInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1582,7 +1602,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2021-07-10 00:40
|
||||
* @功能说明:可用的优惠券列表
|
||||
*/
|
||||
public function couponList(){
|
||||
public function couponList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1618,7 +1639,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-08-16 15:15
|
||||
* @功能说明:用户认养拼团
|
||||
*/
|
||||
public function userCollageLimit(){
|
||||
public function userCollageLimit()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1639,7 +1661,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-08-16 15:15
|
||||
* @功能说明:用户认养拼团列表
|
||||
*/
|
||||
public function userCollageList(){
|
||||
public function userCollageList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1669,7 +1692,8 @@ class IndexClaim extends ApiRest
|
||||
* @DataTime: 2022-08-16 16:12
|
||||
* @功能说明:拼团商品列表
|
||||
*/
|
||||
public function collageList(){
|
||||
public function collageList()
|
||||
{
|
||||
|
||||
$collage_model = new ClaimCollage();
|
||||
|
||||
@@ -1707,8 +1731,4 @@ class IndexClaim extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace app\farm\controller;
|
||||
|
||||
use app\ApiRest;
|
||||
|
||||
use app\farm\model\Breed;
|
||||
@@ -49,7 +51,8 @@ class IndexFarmer extends ApiRest
|
||||
|
||||
protected $land_model;
|
||||
|
||||
public function __construct(App $app) {
|
||||
public function __construct(App $app)
|
||||
{
|
||||
|
||||
parent::__construct($app);
|
||||
|
||||
@@ -86,7 +89,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2022-02-24 16:13
|
||||
* @功能说明:农场主详情
|
||||
*/
|
||||
public function farmerInfo(){
|
||||
public function farmerInfo()
|
||||
{
|
||||
|
||||
return $this->success($this->farmer);
|
||||
|
||||
@@ -98,7 +102,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2022-02-24 16:16
|
||||
* @功能说明:编辑农场主
|
||||
*/
|
||||
public function farmerUpdate(){
|
||||
public function farmerUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -130,7 +135,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-10 17:51
|
||||
* @功能说明:土地列表
|
||||
*/
|
||||
public function landList(){
|
||||
public function landList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -165,7 +171,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-10 18:05
|
||||
* @功能说明:添加土地
|
||||
*/
|
||||
public function landAdd(){
|
||||
public function landAdd()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -182,13 +189,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-12-10 18:05
|
||||
* @功能说明:编辑土地
|
||||
*/
|
||||
public function landUpdate(){
|
||||
public function landUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -212,7 +219,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-10 18:05
|
||||
* @功能说明:编辑土地
|
||||
*/
|
||||
public function landStatusUpdate(){
|
||||
public function landStatusUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -229,14 +237,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-12-10 18:05
|
||||
* @功能说明:土地详情
|
||||
*/
|
||||
public function landInfo(){
|
||||
public function landInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -258,7 +265,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 14:43
|
||||
* @功能说明:地块列表
|
||||
*/
|
||||
public function massifList(){
|
||||
public function massifList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -285,7 +293,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 14:43
|
||||
* @功能说明:地块列表下拉框
|
||||
*/
|
||||
public function massifSelect(){
|
||||
public function massifSelect()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -311,7 +320,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 14:49
|
||||
* @功能说明:添加地块
|
||||
*/
|
||||
public function massifAdd(){
|
||||
public function massifAdd()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -333,7 +343,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 14:50
|
||||
* @功能说明:编辑地块
|
||||
*/
|
||||
public function massifUpdate(){
|
||||
public function massifUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -362,13 +373,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-12-14 14:50
|
||||
* @功能说明:地块详情
|
||||
*/
|
||||
public function massifInfo(){
|
||||
public function massifInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -389,7 +400,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-20 16:54
|
||||
* @功能说明:种子列表
|
||||
*/
|
||||
public function seedList(){
|
||||
public function seedList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -426,7 +438,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-20 16:54
|
||||
* @功能说明:种子列表
|
||||
*/
|
||||
public function seedSelect(){
|
||||
public function seedSelect()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -448,12 +461,14 @@ class IndexFarmer extends ApiRest
|
||||
return $this->success($data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-12-20 16:57
|
||||
* @功能说明:添加种子
|
||||
*/
|
||||
public function seedAdd(){
|
||||
public function seedAdd()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -472,14 +487,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-12-14 14:50
|
||||
* @功能说明:编辑种子
|
||||
*/
|
||||
public function seedUpdate(){
|
||||
public function seedUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -515,7 +529,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 14:50
|
||||
* @功能说明:编辑种子
|
||||
*/
|
||||
public function seedInfo(){
|
||||
public function seedInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -538,10 +553,10 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 15:28
|
||||
* @功能说明:认养管理列表
|
||||
*/
|
||||
public function claimList(){
|
||||
|
||||
public function claimList()
|
||||
{
|
||||
echo 1;die;
|
||||
$input = $this->_param;
|
||||
|
||||
$claim_model = new Claim();
|
||||
|
||||
$dis[] = ['uniacid', '=', $this->_uniacid];
|
||||
@@ -577,7 +592,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 16:32
|
||||
* @功能说明:添加认养
|
||||
*/
|
||||
public function claimAdd(){
|
||||
public function claimAdd()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -601,7 +617,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 16:32
|
||||
* @功能说明:认养详情
|
||||
*/
|
||||
public function claimInfo(){
|
||||
public function claimInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -650,7 +667,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 16:32
|
||||
* @功能说明:编辑认养
|
||||
*/
|
||||
public function claimUpdate(){
|
||||
public function claimUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -675,7 +693,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 16:32
|
||||
* @功能说明:编辑认养
|
||||
*/
|
||||
public function claimStatusUpdate(){
|
||||
public function claimStatusUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -698,7 +717,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 17:04
|
||||
* @功能说明:溯源列表
|
||||
*/
|
||||
public function sourceList(){
|
||||
public function sourceList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -736,7 +756,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 17:04
|
||||
* @功能说明:溯源下拉框
|
||||
*/
|
||||
public function sourceSelect(){
|
||||
public function sourceSelect()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -763,7 +784,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 17:10
|
||||
* @功能说明:添加溯源
|
||||
*/
|
||||
public function sourceAdd(){
|
||||
public function sourceAdd()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -787,7 +809,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 17:12
|
||||
* @功能说明:编辑溯源
|
||||
*/
|
||||
public function sourceUpdate(){
|
||||
public function sourceUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -823,7 +846,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-14 17:12
|
||||
* @功能说明:编辑溯源
|
||||
*/
|
||||
public function sourceInfo(){
|
||||
public function sourceInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -846,7 +870,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-29 10:29
|
||||
* @功能说明:养殖管理
|
||||
*/
|
||||
public function breedList(){
|
||||
public function breedList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -875,7 +900,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-29 10:30
|
||||
* @功能说明:添加养殖管理
|
||||
*/
|
||||
public function breedAdd(){
|
||||
public function breedAdd()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -897,7 +923,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-29 10:34
|
||||
* @功能说明:编辑养殖管理
|
||||
*/
|
||||
public function breedUpdate(){
|
||||
public function breedUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -922,7 +949,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-29 10:34
|
||||
* @功能说明:编辑养殖管理
|
||||
*/
|
||||
public function breedInfo(){
|
||||
public function breedInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -945,7 +973,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-30 11:15
|
||||
* @功能说明:申请提现
|
||||
*/
|
||||
public function applyWallet(){
|
||||
public function applyWallet()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1027,7 +1056,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2022-02-09 15:06
|
||||
* @功能说明:农场主财务详情
|
||||
*/
|
||||
public function farmerFinanceInfo(){
|
||||
public function farmerFinanceInfo()
|
||||
{
|
||||
|
||||
$water_model = new FinanceWater();
|
||||
|
||||
@@ -1053,7 +1083,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2022-02-09 16:35
|
||||
* @功能说明:农场主流水记录
|
||||
*/
|
||||
public function farmerFinanceList(){
|
||||
public function farmerFinanceList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1086,7 +1117,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-30 17:09
|
||||
* @功能说明:农场主提现列表
|
||||
*/
|
||||
public function walletList(){
|
||||
public function walletList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1119,7 +1151,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-31 15:11
|
||||
* @功能说明:认养和土地分类
|
||||
*/
|
||||
public function landAndClaimCate(){
|
||||
public function landAndClaimCate()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1158,7 +1191,6 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-01-10 15:52
|
||||
@@ -1166,7 +1198,8 @@ class IndexFarmer extends ApiRest
|
||||
*
|
||||
*/
|
||||
|
||||
public function breedOrderList(){
|
||||
public function breedOrderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1188,7 +1221,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2022-02-09 15:16
|
||||
* @功能说明:认养订单
|
||||
*/
|
||||
public function claimOrderList(){
|
||||
public function claimOrderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1243,13 +1277,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-02-09 09:47
|
||||
* @功能说明:发货订单发货
|
||||
*/
|
||||
public function sendOrderSend(){
|
||||
public function sendOrderSend()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1302,13 +1336,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-02-08 17:14
|
||||
* @功能说明:配送订单列表
|
||||
*/
|
||||
public function farmerSendOrderList(){
|
||||
public function farmerSendOrderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1367,13 +1401,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-02-09 09:47
|
||||
* @功能说明:配送订单收货
|
||||
*/
|
||||
public function sendOrderPickup(){
|
||||
public function sendOrderPickup()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1408,7 +1442,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-12-28 11:26
|
||||
* @功能说明:用户下单列表
|
||||
*/
|
||||
public function landOrderList(){
|
||||
public function landOrderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1475,13 +1510,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-02-21 11:00
|
||||
* @功能说明:仪器列表
|
||||
*/
|
||||
public function machineSelect(){
|
||||
public function machineSelect()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1505,7 +1540,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2022-02-22 17:11
|
||||
* @功能说明:生成二维码
|
||||
*/
|
||||
public function getSourceQr(){
|
||||
public function getSourceQr()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1529,16 +1565,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-03-01 11:03
|
||||
* @功能说明:订单列表
|
||||
*/
|
||||
public function shopOrderList(){
|
||||
public function shopOrderList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1603,7 +1636,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2021-03-15 14:58
|
||||
* @功能说明:订单详情
|
||||
*/
|
||||
public function shopOrderInfo(){
|
||||
public function shopOrderInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1647,7 +1681,8 @@ class IndexFarmer extends ApiRest
|
||||
* @DataTime: 2022-03-07 11:08
|
||||
* @功能说明:地主商城订单发货
|
||||
*/
|
||||
public function shopOrderSend(){
|
||||
public function shopOrderSend()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -1714,13 +1749,13 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-04-11 14:22
|
||||
* @功能说明:监控列表
|
||||
*/
|
||||
public function monitorSelect(){
|
||||
public function monitorSelect()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -1744,8 +1779,4 @@ class IndexFarmer extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace app\farm\controller;
|
||||
|
||||
use app\ApiRest;
|
||||
|
||||
use app\farm\model\Farmer;
|
||||
@@ -24,7 +26,6 @@ use think\App;
|
||||
use think\Request;
|
||||
|
||||
|
||||
|
||||
class IndexGoods extends ApiRest
|
||||
{
|
||||
|
||||
@@ -34,7 +35,8 @@ class IndexGoods extends ApiRest
|
||||
|
||||
protected $car_model;
|
||||
|
||||
public function __construct(App $app) {
|
||||
public function __construct(App $app)
|
||||
{
|
||||
|
||||
parent::__construct($app);
|
||||
|
||||
@@ -47,38 +49,29 @@ class IndexGoods extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-03-19 11:57
|
||||
* @功能说明:首页选择店铺列表
|
||||
*/
|
||||
public function indexStoreList(){
|
||||
|
||||
public function indexStoreList()
|
||||
{
|
||||
$input = $this->_param;
|
||||
|
||||
$page = $input['page'] ?? 10;
|
||||
$dis[] = ['uniacid', '=', $this->_uniacid];
|
||||
|
||||
$dis[] = ['status', '=', 2];
|
||||
|
||||
$dis[] = ['business_status', '=', 1];
|
||||
|
||||
if (!empty($input['store_name'])) {
|
||||
|
||||
$dis[] = ['title', 'like', '%' . $input['store_name'] . '%'];
|
||||
}
|
||||
|
||||
$lat = !empty($input['lat']) ? $input['lat'] : 0;
|
||||
|
||||
$lng = !empty($input['lng']) ? $input['lng'] : 0;
|
||||
|
||||
$alh = '(2 * 6378.137* ASIN(SQRT(POW(SIN(3.1415926535898*(' . $lat . '-lat)/360),2)+COS(3.1415926535898*' . $lat . '/180)* COS(' . $lat . ' * 3.1415926535898/180)*POW(SIN(3.1415926535898*(' . $lng . '-lng)/360),2))))*1000 as distance';
|
||||
|
||||
$alhs = '(2 * 6378.137* ASIN(SQRT(POW(SIN(3.1415926535898*(' . $lat . '-lat)/360),2)+COS(3.1415926535898*' . $lat . '/180)* COS(' . $lat . ' * 3.1415926535898/180)*POW(SIN(3.1415926535898*(' . $lng . '-lng)/360),2))))*1000<20000';
|
||||
|
||||
$store_model = new Farmer();
|
||||
|
||||
$data = $store_model->dataDistanceList($dis,$alh,$alhs,10);
|
||||
$data = $store_model->dataDistanceList($dis, $alh, $alhs, $page);
|
||||
|
||||
if (!empty($data['data'])) {
|
||||
|
||||
@@ -93,17 +86,16 @@ class IndexGoods extends ApiRest
|
||||
}
|
||||
|
||||
return $this->success($data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-03-19 13:24
|
||||
* @功能说明:选择门店
|
||||
*/
|
||||
public function selectStore(){
|
||||
public function selectStore()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -121,7 +113,8 @@ class IndexGoods extends ApiRest
|
||||
* @DataTime: 2021-03-18 16:46
|
||||
* @功能说明:分类列表
|
||||
*/
|
||||
public function goodsIndex(){
|
||||
public function goodsIndex()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -146,7 +139,8 @@ class IndexGoods extends ApiRest
|
||||
* @DataTime: 2022-03-01 13:47
|
||||
* @功能说明:
|
||||
*/
|
||||
public function haveSelectStoreId(){
|
||||
public function haveSelectStoreId()
|
||||
{
|
||||
|
||||
return $this->success($this->getStoreInfo()['id']);
|
||||
|
||||
@@ -158,7 +152,8 @@ class IndexGoods extends ApiRest
|
||||
* @DataTime: 2022-02-22 15:27
|
||||
* @功能说明:商品列表
|
||||
*/
|
||||
public function goodsList(){
|
||||
public function goodsList()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -213,13 +208,13 @@ class IndexGoods extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-03-19 15:46
|
||||
* @功能说明:商品详情
|
||||
*/
|
||||
public function goodsInfo(){
|
||||
public function goodsInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -281,14 +276,13 @@ class IndexGoods extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-03-24 14:07
|
||||
* @功能说明:购物车信息
|
||||
*/
|
||||
public function carInfo(){
|
||||
public function carInfo()
|
||||
{
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
@@ -301,14 +295,13 @@ class IndexGoods extends ApiRest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-03-24 14:46
|
||||
* @功能说明:添加到购物车
|
||||
*/
|
||||
public function addCar(){
|
||||
public function addCar()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -365,7 +358,8 @@ class IndexGoods extends ApiRest
|
||||
* @DataTime: 2021-03-24 14:54
|
||||
* @功能说明:删除购物车
|
||||
*/
|
||||
public function delCar(){
|
||||
public function delCar()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -392,7 +386,8 @@ class IndexGoods extends ApiRest
|
||||
* @DataTime: 2021-03-25 10:39
|
||||
* @功能说明:
|
||||
*/
|
||||
public function carUpdate(){
|
||||
public function carUpdate()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
@@ -415,7 +410,8 @@ class IndexGoods extends ApiRest
|
||||
* @DataTime: 2021-03-24 14:59
|
||||
* @功能说明:批量删除购物车
|
||||
*/
|
||||
public function delSomeCar(){
|
||||
public function delSomeCar()
|
||||
{
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace app\farm\model;
|
||||
|
||||
use app\BaseModel;
|
||||
@@ -21,7 +22,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2022-03-02 17:12
|
||||
* @功能说明:
|
||||
*/
|
||||
public function getTimeStatusAttr($value,$data){
|
||||
public function getTimeStatusAttr($value, $data)
|
||||
{
|
||||
|
||||
if (!empty($data['start_time']) && !empty($data['end_time'])) {
|
||||
|
||||
@@ -47,7 +49,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2021-12-30 11:22
|
||||
* @功能说明:
|
||||
*/
|
||||
public function getImgsAttr($value,$data){
|
||||
public function getImgsAttr($value, $data)
|
||||
{
|
||||
|
||||
if (!empty($value)) {
|
||||
|
||||
@@ -61,7 +64,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2021-12-30 11:22
|
||||
* @功能说明:
|
||||
*/
|
||||
public function getIdcardImgsAttr($value,$data){
|
||||
public function getIdcardImgsAttr($value, $data)
|
||||
{
|
||||
|
||||
if (!empty($value)) {
|
||||
|
||||
@@ -69,12 +73,14 @@ class Farmer extends BaseModel
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-09-29 11:04
|
||||
* @功能说明:添加
|
||||
*/
|
||||
public function dataAdd($data){
|
||||
public function dataAdd($data)
|
||||
{
|
||||
|
||||
$data['create_time'] = time();
|
||||
|
||||
@@ -85,13 +91,13 @@ class Farmer extends BaseModel
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-09-29 11:05
|
||||
* @功能说明:编辑
|
||||
*/
|
||||
public function dataUpdate($dis,$data){
|
||||
public function dataUpdate($dis, $data)
|
||||
{
|
||||
|
||||
$res = $this->where($dis)->update($data);
|
||||
|
||||
@@ -105,7 +111,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2020-09-29 11:06
|
||||
* @功能说明:列表
|
||||
*/
|
||||
public function dataList($dis,$page=10){
|
||||
public function dataList($dis, $page = 10)
|
||||
{
|
||||
|
||||
$data = $this->where($dis)->order('id desc')->paginate($page)->toArray();
|
||||
|
||||
@@ -119,7 +126,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2020-09-29 11:06
|
||||
* @功能说明:列表
|
||||
*/
|
||||
public function dataDistanceList($dis,$alh,$alhs=[],$page=10){
|
||||
public function dataDistanceList($dis, $alh, $alhs = [], $page = 10)
|
||||
{
|
||||
|
||||
$data = $this->where($dis)->where($alhs)->field(['*', $alh])->order('distance asc,id desc')->paginate($page)->toArray();
|
||||
|
||||
@@ -133,7 +141,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2021-12-30 11:26
|
||||
* @功能说明:后台列表
|
||||
*/
|
||||
public function adminDataList($dis,$page=10,$where=[]){
|
||||
public function adminDataList($dis, $page = 10, $where = [])
|
||||
{
|
||||
|
||||
$data = $this->alias('a')
|
||||
->join('lbfarm_user_list b', 'a.user_id = b.id', 'left')
|
||||
@@ -157,7 +166,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2020-09-29 11:43
|
||||
* @功能说明:
|
||||
*/
|
||||
public function dataInfo($dis,$file='*'){
|
||||
public function dataInfo($dis, $file = '*')
|
||||
{
|
||||
|
||||
$data = $this->where($dis)->field($file)->find();
|
||||
|
||||
@@ -171,7 +181,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2022-02-22 11:30
|
||||
* @功能说明:检查用户是否是地主
|
||||
*/
|
||||
public function landlordCheck($user_id){
|
||||
public function landlordCheck($user_id)
|
||||
{
|
||||
|
||||
$cap_dis[] = ['user_id', '=', $user_id];
|
||||
|
||||
@@ -216,7 +227,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2022-02-22 11:53
|
||||
* @功能说明:初始化地主表
|
||||
*/
|
||||
public function initLandLord($data,$uniacid){
|
||||
public function initLandLord($data, $uniacid)
|
||||
{
|
||||
|
||||
$dis = [
|
||||
|
||||
@@ -262,7 +274,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2020-10-21 15:21
|
||||
* @功能说明:保留两位小数
|
||||
*/
|
||||
public function getDistanceAttr($value){
|
||||
public function getDistanceAttr($value)
|
||||
{
|
||||
|
||||
if (!empty($value)) {
|
||||
|
||||
@@ -288,14 +301,13 @@ class Farmer extends BaseModel
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-02-28 14:08
|
||||
* @功能说明:添加商品时农场主下拉框
|
||||
*/
|
||||
public function goodsFarmerSelect($user_id){
|
||||
public function goodsFarmerSelect($user_id)
|
||||
{
|
||||
|
||||
$land_order_model = new LandOrder();
|
||||
|
||||
@@ -322,7 +334,8 @@ class Farmer extends BaseModel
|
||||
* @DataTime: 2022-02-28 16:06
|
||||
* @功能说明:
|
||||
*/
|
||||
public function farmerId($uniacid){
|
||||
public function farmerId($uniacid)
|
||||
{
|
||||
|
||||
$dis = [
|
||||
|
||||
@@ -338,7 +351,4 @@ class Farmer extends BaseModel
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -497,6 +497,8 @@ Route::group('app', function () {
|
||||
Route::get('Index/aboutUsList', 'Index/aboutUsList');
|
||||
//获取配置信息
|
||||
Route::get('Index/configInfo', 'Index/configInfo');
|
||||
// 农场
|
||||
Route::get('Index/indexStoreList', 'Index/indexStoreList');
|
||||
//文章详情(id)
|
||||
Route::get('Index/articleInfo', 'Index/articleInfo');
|
||||
//模版列表
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace app\massage\model;
|
||||
|
||||
use app\BaseModel;
|
||||
@@ -16,7 +17,8 @@ class Config extends BaseModel
|
||||
* @DataTime: 2020-09-29 11:04
|
||||
* @功能说明:添加
|
||||
*/
|
||||
public function dataAdd($data){
|
||||
public function dataAdd($data)
|
||||
{
|
||||
|
||||
$res = $this->insert($data);
|
||||
|
||||
@@ -25,13 +27,13 @@ class Config extends BaseModel
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-09-29 11:05
|
||||
* @功能说明:编辑
|
||||
*/
|
||||
public function dataUpdate($dis,$data){
|
||||
public function dataUpdate($dis, $data)
|
||||
{
|
||||
|
||||
$res = $this->where($dis)->update($data);
|
||||
|
||||
@@ -45,12 +47,10 @@ class Config extends BaseModel
|
||||
* @DataTime: 2020-09-29 11:06
|
||||
* @功能说明:列表
|
||||
*/
|
||||
public function dataList($dis,$page){
|
||||
|
||||
public function dataList($dis, $page)
|
||||
{
|
||||
$data = $this->where($dis)->order('id desc')->paginate($page)->toArray();
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -59,26 +59,16 @@ class Config extends BaseModel
|
||||
* @DataTime: 2020-09-29 11:43
|
||||
* @功能说明:
|
||||
*/
|
||||
public function dataInfo($dis){
|
||||
public function dataInfo($dis)
|
||||
{
|
||||
|
||||
$data = $this->where($dis)->find();
|
||||
|
||||
if (empty($data)) {
|
||||
|
||||
$this->dataAdd($dis);
|
||||
|
||||
$data = $this->where($dis)->find();
|
||||
|
||||
}
|
||||
|
||||
return !empty($data) ? $data->toArray() : [];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
196
doc/backend-technical-deep-dive.md
Normal file
196
doc/backend-technical-deep-dive.md
Normal file
@@ -0,0 +1,196 @@
|
||||
# 后端架构深度解析与开发指南
|
||||
|
||||
## 1. 引言
|
||||
|
||||
本文档旨在为开发人员提供一份关于本项目(智慧农场系统)后端架构的深度技术解析。不同于基础的架构介绍,本文档聚焦于**代码实现细节**、**数据库设计范式**以及**核心业务流程**的底层逻辑。它将帮助你在接手项目后,快速理解现有代码模式(Patterns),并安全、高效地扩展新功能。
|
||||
|
||||
---
|
||||
|
||||
## 2. 核心架构与技术实现
|
||||
|
||||
本项目基于 **ThinkPHP 6** 框架开发,采用了典型的 **MVC** 架构,并结合了多应用(Multi-app)模式。
|
||||
|
||||
### 2.1 C层(Controller)技术实现
|
||||
|
||||
控制器层主要负责请求接收、参数校验和业务调度。项目在控制器层有以下显著的实现模式:
|
||||
|
||||
#### 2.1.1 基类封装 (`app/ApiRest.php`)
|
||||
所有 API 控制器均继承自 `app\ApiRest`,该基类提供了以下核心能力:
|
||||
|
||||
- **统一响应格式**:通过 `success($data)` 和 `error($msg)` 方法,强制统一 API 返回结构:
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"data": { ... },
|
||||
"sign": "..." // 签名(可选)
|
||||
}
|
||||
```
|
||||
- **多租户隔离**:在构造函数中自动解析 `uniacid`(商户/租户ID),并赋值给 `$this->_uniacid`。这是系统支持多商户SaaS模式的核心。
|
||||
- **鉴权机制**:
|
||||
- 检查 HTTP Header 中的 `autograph`(小程序用户标识)。
|
||||
- 维护一个 `$noNeedLogin` 白名单。
|
||||
- **注意**:`shareChangeData` 方法中硬编码了大量白名单路由,这种实现方式维护成本较高,建议后续改为中间件或注解配置。
|
||||
|
||||
#### 2.1.2 胖模型,瘦控制器
|
||||
控制器(如 `app/farm/controller/IndexLand.php`)通常比较轻量,不包含复杂的计算逻辑。
|
||||
- **示例**:在“土地下单”流程中,价格计算、优惠券抵扣等逻辑全部下沉到了 Model 层 (`LandOrder::payOrderInfo`)。
|
||||
- **优点**:业务逻辑可复用,控制器代码整洁。
|
||||
|
||||
### 2.2 M层(Model)技术实现
|
||||
|
||||
模型层不仅负责数据库交互,还承担了大部分业务逻辑。
|
||||
|
||||
#### 2.2.1 基类扩展 (`app/BaseModel.php`)
|
||||
- 实现了基础的 CRUD 方法(`getRow`, `listRow`, `createRow` 等)。
|
||||
- **软删除机制**:手动实现了基于 `deleted` 字段和 `delete_time` 的软删除,未使用 TP 自带的 `SoftDelete` Trait。
|
||||
- **代码现状**:核心业务 Model(如 `LandOrder`)往往重写了 `dataAdd`/`dataUpdate` 方法,直接调用 TP 的 `insert`/`update`,并未完全依赖 `BaseModel` 的封装。这导致项目中存在两种 CRUD 风格。
|
||||
|
||||
#### 2.2.2 高级特性应用
|
||||
- **获取器 (Getters)**:大量使用 TP 的获取器处理字段格式化。例如 `LandList::getImgsAttr` 将数据库存储的逗号分隔字符串自动转换为数组。
|
||||
- **动态追加字段**:使用 `$append` 属性在 JSON 序列化时追加计算字段(如 `min_price`)。
|
||||
- **观察者模式**:在 `LandList::updateSome` 中,手动实现了观察者模式 (`app\farm\server\Land`) 来同步更新关联表数据。这是项目中少见的设计模式应用,值得保留和参考。
|
||||
|
||||
---
|
||||
|
||||
## 3. 数据库深度解析
|
||||
|
||||
### 3.1 数据库概览
|
||||
- **引擎**:大部分表使用 `MyISAM`。
|
||||
- **风险**:MyISAM 不支持事务,且在并发写入时是表级锁。对于涉及资金交易的表(如 `balance_water`, `land_order`),强烈建议迁移到 `InnoDB`。
|
||||
- **字符集**:`utf8` / `utf8mb4`。
|
||||
- **多租户设计**:几乎所有表都包含 `uniacid` 字段,用于物理隔离不同商户的数据。
|
||||
|
||||
### 3.2 核心业务实体关系 (ER图)
|
||||
|
||||
以下是“土地认养”核心业务的实体关系推导:
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
User ||--o{ LandOrder : "下单"
|
||||
User ||--o{ Address : "拥有"
|
||||
Farmer ||--o{ LandList : "管理"
|
||||
LandList ||--|{ LandSpe : "包含规格"
|
||||
LandList ||--o{ LandMassif : "包含地块"
|
||||
LandOrder }|--|| LandList : "关联土地"
|
||||
LandOrder }|--|| LandSpe : "关联规格"
|
||||
LandOrder }|--|| LandMassif : "关联地块"
|
||||
LandOrder ||--|{ LandOrderSeed : "包含种子"
|
||||
|
||||
User {
|
||||
int id PK
|
||||
int uniacid
|
||||
string openid
|
||||
string nickName
|
||||
}
|
||||
|
||||
LandList {
|
||||
int id PK
|
||||
int farmer_id FK "农场主"
|
||||
string title "土地名称"
|
||||
int status
|
||||
}
|
||||
|
||||
LandOrder {
|
||||
int id PK
|
||||
string order_code "订单号"
|
||||
decimal pay_price "支付金额"
|
||||
int pay_type "1:未支付 2:已支付"
|
||||
int status
|
||||
}
|
||||
```
|
||||
|
||||
### 3.3 关键表结构解析
|
||||
|
||||
#### 1. `ims_lbfarm_land_list` (土地表)
|
||||
- 核心商品表,存储土地的基本信息。
|
||||
- 关联表:`ims_lbfarm_land_spe` (规格), `ims_lbfarm_land_massif` (地块/位置)。
|
||||
|
||||
#### 2. `ims_lbfarm_land_order` (土地订单表)
|
||||
- **核心字段**:
|
||||
- `order_code`: 业务订单号。
|
||||
- `transaction_id`: 微信支付流水号。
|
||||
- `pay_type`: 支付状态 (1=未支付, 2=微信支付, 3=余额支付)。
|
||||
- `seed_data`: 种子信息的 JSON 快照(反范式设计,避免关联查询)。
|
||||
|
||||
---
|
||||
|
||||
## 4. 核心业务流程剖析
|
||||
|
||||
### 4.1 土地认养下单与支付流程
|
||||
|
||||
这是一个跨越 Controller、Model 和 Service 的复杂流程:
|
||||
|
||||
1. **预下单 (计价)**
|
||||
- **入口**:`IndexLand::landPayOrderInfo`
|
||||
- **逻辑**:调用 `LandOrder::payOrderInfo`。
|
||||
- **计算公式**:`总价 = 土地规格单价 + (地块单价 * 认养周期) + ∑(种子单价 * 数量) - 优惠券金额`。
|
||||
|
||||
2. **创建订单**
|
||||
- **入口**:`IndexLand::landPayOrder`
|
||||
- **逻辑**:再次调用 `payOrderInfo` 校验价格,然后写入 `land_order` 表,同时写入 `land_order_seed` 表。
|
||||
|
||||
3. **支付回调 (核心)**
|
||||
- **逻辑位置**:`LandOrder::orderResult`
|
||||
- **事务处理**:
|
||||
1. 开启事务 (`Db::startTrans()`)。
|
||||
2. 更新订单状态 (`pay_type=2`, `pay_time`)。
|
||||
3. **余额扣除**:如果使用了余额抵扣,调用 `BalanceWater::addWater`。
|
||||
4. **资金流水**:记录 `FinanceWater`。
|
||||
5. **分销结算**:调用 `DistributionCash::addUserCash` 计算分销佣金。
|
||||
6. 提交事务 (`Db::commit()`)。
|
||||
- **后续动作**:发送微信订阅消息 (`paySendService`),这是异步或非事务性的操作,放在 commit 之后执行是正确的。
|
||||
|
||||
---
|
||||
|
||||
## 5. 开发实战指南
|
||||
|
||||
### 5.1 如何新增一个 API 接口?
|
||||
|
||||
假设你需要新增一个“获取最近的农场列表”接口:
|
||||
|
||||
1. **创建控制器**:
|
||||
在 `app/farm/controller` 下创建 `IndexFarm.php`,继承 `ApiRest`。
|
||||
```php
|
||||
class IndexFarm extends ApiRest {
|
||||
public function nearby() {
|
||||
$lat = $this->_param['lat'];
|
||||
$lng = $this->_param['lng'];
|
||||
// 调用 Model 获取数据
|
||||
$data = (new Farmer())->getNearby($lat, $lng);
|
||||
return $this->success($data);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. **实现 Model 逻辑**:
|
||||
在 `app/farm/model/Farmer.php` 中实现 `getNearby` 方法。建议参考 `LandList::indexDataList` 中的距离计算 SQL。
|
||||
|
||||
3. **配置路由**:
|
||||
在 `app/farm/route/route.php` 中注册路由(如果项目未开启自动路由)。目前看项目启用了自动路由,直接访问 `farm/index_farm/nearby` 即可。
|
||||
|
||||
4. **配置鉴权**:
|
||||
如果该接口不需要登录,需要在 `ApiRest::shareChangeData` 或控制器的构造函数中将其加入 `$noNeedLogin` 数组。
|
||||
|
||||
### 5.2 常见坑与规避
|
||||
|
||||
1. **数据库事务**:
|
||||
由于大量表使用 `MyISAM`,在涉及多表更新时(如订单状态+库存扣减),事务可能不会生效。
|
||||
- **建议**:在开发新功能涉及核心交易表时,务必检查表引擎,必要时手动 `ALTER TABLE ... ENGINE=InnoDB`。
|
||||
|
||||
2. **参数获取**:
|
||||
尽量使用 `$this->_param` 获取参数,它合并了 GET 和 POST 数据。避免直接使用 `$_GET` 或 `$_POST`。
|
||||
|
||||
3. **浮点数计算**:
|
||||
项目中存在直接使用浮点数计算金额的情况(如 `round($price, 2)`)。在涉及金额比对时,建议使用 `bccomp` 等高精度函数,避免精度丢失导致的 0.01 元误差。
|
||||
|
||||
4. **SQL 注入风险**:
|
||||
虽然 TP 的 ORM 有防注入机制,但在拼接原生 SQL(如距离计算)时,务必使用参数绑定,严禁直接拼接变量。
|
||||
|
||||
---
|
||||
|
||||
## 6. 附录:推荐的重构方向
|
||||
|
||||
1. **引入 .env 配置**:将 `config/database.php` 中的硬编码配置移至环境变量。
|
||||
2. **统一 Model 规范**:废弃 `dataAdd` 等自定义方法,统一使用 TP 标准的 `save/create`,或完善 `BaseModel` 并强制继承。
|
||||
3. **中间件鉴权**:将 `ApiRest` 中的硬编码鉴权逻辑重构为 TP 中间件。
|
||||
4. **数据库迁移**:编写脚本将所有 `MyISAM` 表迁移至 `InnoDB`。
|
||||
2138
doc/stsm_farm.sql
Normal file
2138
doc/stsm_farm.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
[2025-12-22T16:47:44+08:00][error] [2006]SQLSTATE[HY000] [2006] MySQL server has gone away
|
||||
[2025-12-22T16:47:53+08:00][error] [2006]SQLSTATE[HY000] [2006] MySQL server has gone away
|
||||
[2025-12-22T16:48:07+08:00][error] [2006]SQLSTATE[HY000] [2006] MySQL server has gone away
|
||||
@@ -1,54 +0,0 @@
|
||||
[2025-12-22T16:47:31+08:00][info] [ VIEW ] /Users/xiaojian/PHP/Smart-Farm/app/index/view/index/index.html [ array (
|
||||
0 => 'jsPath',
|
||||
1 => 'jsMin',
|
||||
2 => 'jsPdf',
|
||||
3 => 'jsWorker',
|
||||
4 => 'jsVueMin',
|
||||
5 => 'jsVuexMin',
|
||||
6 => 'jsMmin',
|
||||
7 => 'jsIndexMin',
|
||||
8 => 'jsMincss',
|
||||
9 => 'jsNcss',
|
||||
10 => 'is_founder',
|
||||
11 => 'isWe7',
|
||||
12 => 'appcss',
|
||||
13 => 'manifest',
|
||||
14 => 'vendor',
|
||||
15 => 'app',
|
||||
) ]
|
||||
[2025-12-22T16:47:54+08:00][info] [ VIEW ] /Users/xiaojian/PHP/Smart-Farm/app/index/view/index/index.html [ array (
|
||||
0 => 'jsPath',
|
||||
1 => 'jsMin',
|
||||
2 => 'jsPdf',
|
||||
3 => 'jsWorker',
|
||||
4 => 'jsVueMin',
|
||||
5 => 'jsVuexMin',
|
||||
6 => 'jsMmin',
|
||||
7 => 'jsIndexMin',
|
||||
8 => 'jsMincss',
|
||||
9 => 'jsNcss',
|
||||
10 => 'is_founder',
|
||||
11 => 'isWe7',
|
||||
12 => 'appcss',
|
||||
13 => 'manifest',
|
||||
14 => 'vendor',
|
||||
15 => 'app',
|
||||
) ]
|
||||
[2025-12-22T16:47:58+08:00][info] [ VIEW ] /Users/xiaojian/PHP/Smart-Farm/app/index/view/index/index.html [ array (
|
||||
0 => 'jsPath',
|
||||
1 => 'jsMin',
|
||||
2 => 'jsPdf',
|
||||
3 => 'jsWorker',
|
||||
4 => 'jsVueMin',
|
||||
5 => 'jsVuexMin',
|
||||
6 => 'jsMmin',
|
||||
7 => 'jsIndexMin',
|
||||
8 => 'jsMincss',
|
||||
9 => 'jsNcss',
|
||||
10 => 'is_founder',
|
||||
11 => 'isWe7',
|
||||
12 => 'appcss',
|
||||
13 => 'manifest',
|
||||
14 => 'vendor',
|
||||
15 => 'app',
|
||||
) ]
|
||||
@@ -1,18 +0,0 @@
|
||||
[2025-12-24T14:08:55+08:00][info] [ VIEW ] /Users/xiaojian/PHP/Smart-Farm/app/index/view/index/index.html [ array (
|
||||
0 => 'jsPath',
|
||||
1 => 'jsMin',
|
||||
2 => 'jsPdf',
|
||||
3 => 'jsWorker',
|
||||
4 => 'jsVueMin',
|
||||
5 => 'jsVuexMin',
|
||||
6 => 'jsMmin',
|
||||
7 => 'jsIndexMin',
|
||||
8 => 'jsMincss',
|
||||
9 => 'jsNcss',
|
||||
10 => 'is_founder',
|
||||
11 => 'isWe7',
|
||||
12 => 'appcss',
|
||||
13 => 'manifest',
|
||||
14 => 'vendor',
|
||||
15 => 'app',
|
||||
) ]
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php /*a:1:{s:62:"/Users/xiaojian/PHP/Smart-Farm/app/index/view/index/index.html";i:1687373542;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<meta name="renderer" content="webkit"/>
|
||||
<meta name="force-rendering" content="webkit"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1">
|
||||
<title>登录 - 后台管理中心</title>
|
||||
<link href='<?php echo htmlentities($appcss); ?>' rel=stylesheet>
|
||||
<script type="text/javascript" src='<?php echo htmlentities($jsMin); ?>'></script>
|
||||
<script type="text/javascript" src="<?php echo htmlentities($jsPdf); ?>"></script>
|
||||
<script type="text/javascript" src="<?php echo htmlentities($jsWorker); ?>"></script>
|
||||
|
||||
<script src="<?php echo htmlentities($jsVueMin); ?>"></script>
|
||||
<script src="<?php echo htmlentities($jsVuexMin); ?>"></script>
|
||||
<script src="<?php echo htmlentities($jsMmin); ?>"></script>
|
||||
<script src="<?php echo htmlentities($jsIndexMin); ?>"></script>
|
||||
<!-- 引入样式 -->
|
||||
<link href="<?php echo htmlentities($jsMincss); ?>" rel="stylesheet">
|
||||
<link href="<?php echo htmlentities($jsNcss); ?>" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div id=app></div>
|
||||
<script>
|
||||
var lbConfig = {
|
||||
jsPath: '<?php echo htmlentities($jsPath); ?>',
|
||||
isWe7: '<?php echo htmlentities($isWe7); ?>',
|
||||
is_founder: '<?php echo htmlentities($is_founder); ?>'
|
||||
}
|
||||
window.lbConfig = lbConfig;
|
||||
</script>
|
||||
<script type=text/javascript src='<?php echo htmlentities($manifest); ?>'></script>
|
||||
<script type=text/javascript src='<?php echo htmlentities($vendor); ?>'></script>
|
||||
<script type=text/javascript src='<?php echo htmlentities($app); ?>'></script>
|
||||
<script charset=utf-8 src="https://map.qq.com/api/js?v=2.exp&key=2LNBZ-HT2R2-LENUE-CBNZK-QZ4VS-AQB5Z"></script>
|
||||
</body>
|
||||
</html>
|
||||
54
vendor/topthink/framework/src/helper.php
vendored
54
vendor/topthink/framework/src/helper.php
vendored
@@ -202,6 +202,34 @@ if (!function_exists('dump')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('dd')) {
|
||||
/**
|
||||
* 浏览器友好的变量输出
|
||||
* @param mixed $vars 要输出的变量
|
||||
* @return void
|
||||
*/
|
||||
function dd(...$vars)
|
||||
{
|
||||
ob_start();
|
||||
var_dump(...$vars);
|
||||
|
||||
$output = ob_get_clean();
|
||||
$output = preg_replace('/\]\=\>\n(\s+)/m', '] => ', $output);
|
||||
|
||||
if (PHP_SAPI == 'cli') {
|
||||
$output = PHP_EOL . $output . PHP_EOL;
|
||||
} else {
|
||||
if (!extension_loaded('xdebug')) {
|
||||
$output = htmlspecialchars($output, ENT_SUBSTITUTE);
|
||||
}
|
||||
$output = '<pre>' . $output . '</pre>';
|
||||
}
|
||||
|
||||
echo $output;
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('env')) {
|
||||
/**
|
||||
* 获取环境变量值
|
||||
@@ -661,3 +689,29 @@ if (!function_exists('root_path')) {
|
||||
return app()->getRootPath() . ($path ? $path . DIRECTORY_SEPARATOR : $path);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('is_dev')) {
|
||||
function is_dev()
|
||||
{
|
||||
$env = env('APP_ENV', '');
|
||||
$env = strtolower($env);
|
||||
if (in_array($env, ['dev', 'development', 'local', 'test'], true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('is_local')) {
|
||||
function is_local()
|
||||
{
|
||||
$env = env('APP_ENV', '');
|
||||
$env = strtolower($env);
|
||||
if (in_array($env, ['local'], true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user