50 changed files with 7400 additions and 0 deletions
@ -0,0 +1 @@ |
|||||
|
APP_DEBUG = false
[APP]
DEFAULT_TIMEZONE = Asia/Shanghai
[DATABASE]
TYPE = mysql
HOSTNAME = localhost
DATABASE = iin_wenhua_com
USERNAME = root
PASSWORD = root
HOSTPORT = 3306
CHARSET = utf8
DEBUG = false
[CACHE]
DRIVER = file
[REDIS]
HOSTNAME = 127.0.0.1
HOSTPORT = 6379
PASSWORD =
SELECT = 0
[LANG]
default_lang = zh-cn |
||||
@ -0,0 +1,3 @@ |
|||||
|
/.idea |
||||
|
/.vscode |
||||
|
*.log |
||||
@ -0,0 +1 @@ |
|||||
|
|
||||
@ -0,0 +1,42 @@ |
|||||
|
sudo: false |
||||
|
|
||||
|
language: php |
||||
|
|
||||
|
branches: |
||||
|
only: |
||||
|
- stable |
||||
|
|
||||
|
cache: |
||||
|
directories: |
||||
|
- $HOME/.composer/cache |
||||
|
|
||||
|
before_install: |
||||
|
- composer self-update |
||||
|
|
||||
|
install: |
||||
|
- composer install --no-dev --no-interaction --ignore-platform-reqs |
||||
|
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip . |
||||
|
- composer require --update-no-dev --no-interaction "topthink/think-image:^1.0" |
||||
|
- composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0" |
||||
|
- composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0" |
||||
|
- composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0" |
||||
|
- composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0" |
||||
|
- composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0" |
||||
|
- composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0" |
||||
|
- composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0" |
||||
|
- composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0" |
||||
|
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip . |
||||
|
|
||||
|
script: |
||||
|
- php think unit |
||||
|
|
||||
|
deploy: |
||||
|
provider: releases |
||||
|
api_key: |
||||
|
secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw= |
||||
|
file: |
||||
|
- ThinkPHP_Core.zip |
||||
|
- ThinkPHP_Full.zip |
||||
|
skip_cleanup: true |
||||
|
on: |
||||
|
tags: true |
||||
@ -0,0 +1,7 @@ |
|||||
|
<html> |
||||
|
<head><title>404 Not Found</title></head> |
||||
|
<body> |
||||
|
<center><h1>404 Not Found</h1></center> |
||||
|
<hr><center>nginx</center> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,191 @@ |
|||||
|
Apache License |
||||
|
Version 2.0, January 2004 |
||||
|
http://www.apache.org/licenses/ |
||||
|
|
||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||
|
|
||||
|
1. Definitions. |
||||
|
|
||||
|
"License" shall mean the terms and conditions for use, reproduction, and |
||||
|
distribution as defined by Sections 1 through 9 of this document. |
||||
|
|
||||
|
"Licensor" shall mean the copyright owner or entity authorized by the copyright |
||||
|
owner that is granting the License. |
||||
|
|
||||
|
"Legal Entity" shall mean the union of the acting entity and all other entities |
||||
|
that control, are controlled by, or are under common control with that entity. |
||||
|
For the purposes of this definition, "control" means (i) the power, direct or |
||||
|
indirect, to cause the direction or management of such entity, whether by |
||||
|
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||
|
outstanding shares, or (iii) beneficial ownership of such entity. |
||||
|
|
||||
|
"You" (or "Your") shall mean an individual or Legal Entity exercising |
||||
|
permissions granted by this License. |
||||
|
|
||||
|
"Source" form shall mean the preferred form for making modifications, including |
||||
|
but not limited to software source code, documentation source, and configuration |
||||
|
files. |
||||
|
|
||||
|
"Object" form shall mean any form resulting from mechanical transformation or |
||||
|
translation of a Source form, including but not limited to compiled object code, |
||||
|
generated documentation, and conversions to other media types. |
||||
|
|
||||
|
"Work" shall mean the work of authorship, whether in Source or Object form, made |
||||
|
available under the License, as indicated by a copyright notice that is included |
||||
|
in or attached to the work (an example is provided in the Appendix below). |
||||
|
|
||||
|
"Derivative Works" shall mean any work, whether in Source or Object form, that |
||||
|
is based on (or derived from) the Work and for which the editorial revisions, |
||||
|
annotations, elaborations, or other modifications represent, as a whole, an |
||||
|
original work of authorship. For the purposes of this License, Derivative Works |
||||
|
shall not include works that remain separable from, or merely link (or bind by |
||||
|
name) to the interfaces of, the Work and Derivative Works thereof. |
||||
|
|
||||
|
"Contribution" shall mean any work of authorship, including the original version |
||||
|
of the Work and any modifications or additions to that Work or Derivative Works |
||||
|
thereof, that is intentionally submitted to Licensor for inclusion in the Work |
||||
|
by the copyright owner or by an individual or Legal Entity authorized to submit |
||||
|
on behalf of the copyright owner. For the purposes of this definition, |
||||
|
"submitted" means any form of electronic, verbal, or written communication sent |
||||
|
to the Licensor or its representatives, including but not limited to |
||||
|
communication on electronic mailing lists, source code control systems, and |
||||
|
issue tracking systems that are managed by, or on behalf of, the Licensor for |
||||
|
the purpose of discussing and improving the Work, but excluding communication |
||||
|
that is conspicuously marked or otherwise designated in writing by the copyright |
||||
|
owner as "Not a Contribution." |
||||
|
|
||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf |
||||
|
of whom a Contribution has been received by Licensor and subsequently |
||||
|
incorporated within the Work. |
||||
|
|
||||
|
2. Grant of Copyright License. |
||||
|
|
||||
|
Subject to the terms and conditions of this License, each Contributor hereby |
||||
|
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, |
||||
|
irrevocable copyright license to reproduce, prepare Derivative Works of, |
||||
|
publicly display, publicly perform, sublicense, and distribute the Work and such |
||||
|
Derivative Works in Source or Object form. |
||||
|
|
||||
|
3. Grant of Patent License. |
||||
|
|
||||
|
Subject to the terms and conditions of this License, each Contributor hereby |
||||
|
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, |
||||
|
irrevocable (except as stated in this section) patent license to make, have |
||||
|
made, use, offer to sell, sell, import, and otherwise transfer the Work, where |
||||
|
such license applies only to those patent claims licensable by such Contributor |
||||
|
that are necessarily infringed by their Contribution(s) alone or by combination |
||||
|
of their Contribution(s) with the Work to which such Contribution(s) was |
||||
|
submitted. If You institute patent litigation against any entity (including a |
||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work or a |
||||
|
Contribution incorporated within the Work constitutes direct or contributory |
||||
|
patent infringement, then any patent licenses granted to You under this License |
||||
|
for that Work shall terminate as of the date such litigation is filed. |
||||
|
|
||||
|
4. Redistribution. |
||||
|
|
||||
|
You may reproduce and distribute copies of the Work or Derivative Works thereof |
||||
|
in any medium, with or without modifications, and in Source or Object form, |
||||
|
provided that You meet the following conditions: |
||||
|
|
||||
|
You must give any other recipients of the Work or Derivative Works a copy of |
||||
|
this License; and |
||||
|
You must cause any modified files to carry prominent notices stating that You |
||||
|
changed the files; and |
||||
|
You must retain, in the Source form of any Derivative Works that You distribute, |
||||
|
all copyright, patent, trademark, and attribution notices from the Source form |
||||
|
of the Work, excluding those notices that do not pertain to any part of the |
||||
|
Derivative Works; and |
||||
|
If the Work includes a "NOTICE" text file as part of its distribution, then any |
||||
|
Derivative Works that You distribute must include a readable copy of the |
||||
|
attribution notices contained within such NOTICE file, excluding those notices |
||||
|
that do not pertain to any part of the Derivative Works, in at least one of the |
||||
|
following places: within a NOTICE text file distributed as part of the |
||||
|
Derivative Works; within the Source form or documentation, if provided along |
||||
|
with the Derivative Works; or, within a display generated by the Derivative |
||||
|
Works, if and wherever such third-party notices normally appear. The contents of |
||||
|
the NOTICE file are for informational purposes only and do not modify the |
||||
|
License. You may add Your own attribution notices within Derivative Works that |
||||
|
You distribute, alongside or as an addendum to the NOTICE text from the Work, |
||||
|
provided that such additional attribution notices cannot be construed as |
||||
|
modifying the License. |
||||
|
You may add Your own copyright statement to Your modifications and may provide |
||||
|
additional or different license terms and conditions for use, reproduction, or |
||||
|
distribution of Your modifications, or for any such Derivative Works as a whole, |
||||
|
provided Your use, reproduction, and distribution of the Work otherwise complies |
||||
|
with the conditions stated in this License. |
||||
|
|
||||
|
5. Submission of Contributions. |
||||
|
|
||||
|
Unless You explicitly state otherwise, any Contribution intentionally submitted |
||||
|
for inclusion in the Work by You to the Licensor shall be under the terms and |
||||
|
conditions of this License, without any additional terms or conditions. |
||||
|
Notwithstanding the above, nothing herein shall supersede or modify the terms of |
||||
|
any separate license agreement you may have executed with Licensor regarding |
||||
|
such Contributions. |
||||
|
|
||||
|
6. Trademarks. |
||||
|
|
||||
|
This License does not grant permission to use the trade names, trademarks, |
||||
|
service marks, or product names of the Licensor, except as required for |
||||
|
reasonable and customary use in describing the origin of the Work and |
||||
|
reproducing the content of the NOTICE file. |
||||
|
|
||||
|
7. Disclaimer of Warranty. |
||||
|
|
||||
|
Unless required by applicable law or agreed to in writing, Licensor provides the |
||||
|
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, |
||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, |
||||
|
including, without limitation, any warranties or conditions of TITLE, |
||||
|
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are |
||||
|
solely responsible for determining the appropriateness of using or |
||||
|
redistributing the Work and assume any risks associated with Your exercise of |
||||
|
permissions under this License. |
||||
|
|
||||
|
8. Limitation of Liability. |
||||
|
|
||||
|
In no event and under no legal theory, whether in tort (including negligence), |
||||
|
contract, or otherwise, unless required by applicable law (such as deliberate |
||||
|
and grossly negligent acts) or agreed to in writing, shall any Contributor be |
||||
|
liable to You for damages, including any direct, indirect, special, incidental, |
||||
|
or consequential damages of any character arising as a result of this License or |
||||
|
out of the use or inability to use the Work (including but not limited to |
||||
|
damages for loss of goodwill, work stoppage, computer failure or malfunction, or |
||||
|
any and all other commercial damages or losses), even if such Contributor has |
||||
|
been advised of the possibility of such damages. |
||||
|
|
||||
|
9. Accepting Warranty or Additional Liability. |
||||
|
|
||||
|
While redistributing the Work or Derivative Works thereof, You may choose to |
||||
|
offer, and charge a fee for, acceptance of support, warranty, indemnity, or |
||||
|
other liability obligations and/or rights consistent with this License. However, |
||||
|
in accepting such obligations, You may act only on Your own behalf and on Your |
||||
|
sole responsibility, not on behalf of any other Contributor, and only if You |
||||
|
agree to indemnify, defend, and hold each Contributor harmless for any liability |
||||
|
incurred by, or claims asserted against, such Contributor by reason of your |
||||
|
accepting any such warranty or additional liability. |
||||
|
|
||||
|
END OF TERMS AND CONDITIONS |
||||
|
|
||||
|
APPENDIX: How to apply the Apache License to your work |
||||
|
|
||||
|
To apply the Apache License to your work, attach the following boilerplate |
||||
|
notice, with the fields enclosed by brackets "{}" replaced with your own |
||||
|
identifying information. (Don't include the brackets!) The text should be |
||||
|
enclosed in the appropriate comment syntax for the file format. We also |
||||
|
recommend that a file or class name and description of purpose be included on |
||||
|
the same "printed page" as the copyright notice for easier identification within |
||||
|
third-party archives. |
||||
|
|
||||
|
Copyright 2018 萤火科技 |
||||
|
|
||||
|
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
|
you may not use this file except in compliance with the License. |
||||
|
You may obtain a copy of the License at |
||||
|
|
||||
|
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
|
||||
|
Unless required by applicable law or agreed to in writing, software |
||||
|
distributed under the License is distributed on an "AS IS" BASIS, |
||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
|
See the License for the specific language governing permissions and |
||||
|
limitations under the License. |
||||
@ -0,0 +1,74 @@ |
|||||
|
{ |
||||
|
"name": "topthink/think", |
||||
|
"description": "the new thinkphp framework", |
||||
|
"type": "project", |
||||
|
"keywords": [ |
||||
|
"framework", |
||||
|
"thinkphp", |
||||
|
"ORM" |
||||
|
], |
||||
|
"homepage": "http://thinkphp.cn/", |
||||
|
"license": "Apache-2.0", |
||||
|
"authors": [ |
||||
|
{ |
||||
|
"name": "liu21st", |
||||
|
"email": "liu21st@gmail.com" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "yunwuxin", |
||||
|
"email": "448901948@qq.com" |
||||
|
} |
||||
|
], |
||||
|
"require": { |
||||
|
"php": ">=7.4.0", |
||||
|
"ext-gd": "*", |
||||
|
"ext-curl": "*", |
||||
|
"ext-bcmath": "*", |
||||
|
"ext-json": "*", |
||||
|
"ext-pdo": "*", |
||||
|
"ext-openssl": "*", |
||||
|
"ext-mbstring": "*", |
||||
|
"ext-libxml": "*", |
||||
|
"ext-simplexml": "*", |
||||
|
"ext-zlib": "*", |
||||
|
"ext-zip": "*", |
||||
|
"ext-redis": "*", |
||||
|
"ext-fileinfo": "*", |
||||
|
"topthink/framework": "^6.0.0", |
||||
|
"topthink/think-orm": "^2.0", |
||||
|
"topthink/think-multi-app": "^1.0", |
||||
|
"topthink/think-worker": "^3.0", |
||||
|
"topthink/think-filesystem": "^2.0", |
||||
|
"qiniu/php-sdk": "^7.2", |
||||
|
"aliyuncs/oss-sdk-php": "^2.3", |
||||
|
"qcloud/cos-sdk-v5": "^2.4", |
||||
|
"kosinix/grafika": "dev-master", |
||||
|
"myclabs/php-enum": "^1.6", |
||||
|
"lvht/geohash": "^1.1", |
||||
|
"phpoffice/phpspreadsheet": "^1.18", |
||||
|
"overtrue/easy-sms": "^2.0", |
||||
|
"yiovo/tp6-captcha": "^1.1" |
||||
|
}, |
||||
|
"require-dev": { |
||||
|
"symfony/var-dumper": "^4.2", |
||||
|
"topthink/think-trace":"^1.0" |
||||
|
}, |
||||
|
"autoload": { |
||||
|
"psr-4": { |
||||
|
"app\\": "app", |
||||
|
"cores\\": "cores" |
||||
|
}, |
||||
|
"psr-0": { |
||||
|
"": "extend/" |
||||
|
} |
||||
|
}, |
||||
|
"config": { |
||||
|
"preferred-install": "dist" |
||||
|
}, |
||||
|
"scripts": { |
||||
|
"post-autoload-dump": [ |
||||
|
"@php think service:discover", |
||||
|
"@php think vendor:publish" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,41 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 应用设置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
return [ |
||||
|
// 应用地址 |
||||
|
'app_host' => env('app.host', ''), |
||||
|
// 应用的命名空间 |
||||
|
'app_namespace' => '', |
||||
|
// 是否启用路由 |
||||
|
'with_route' => false, |
||||
|
// 是否启用事件 |
||||
|
'with_event' => true, |
||||
|
// 默认应用 |
||||
|
'default_app' => 'api', |
||||
|
// 默认时区 |
||||
|
'default_timezone' => 'Asia/Shanghai', |
||||
|
|
||||
|
// 应用映射(自动多应用模式有效) |
||||
|
'app_map' => [ |
||||
|
'admin' => 'admin', |
||||
|
'store' => 'store', |
||||
|
'api' => 'api', |
||||
|
], |
||||
|
// 域名绑定(自动多应用模式有效) |
||||
|
'domain_bind' => [], |
||||
|
// 禁止URL访问的应用列表(自动多应用模式有效) |
||||
|
'deny_app_list' => [ |
||||
|
'common', |
||||
|
'timer' |
||||
|
], |
||||
|
|
||||
|
// 异常页面的模板文件 |
||||
|
'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl', |
||||
|
|
||||
|
// 错误显示信息,非调试模式有效 |
||||
|
'error_message' => '页面错误!请稍后再试~', |
||||
|
// 显示错误信息 |
||||
|
'show_error_msg' => true, |
||||
|
]; |
||||
@ -0,0 +1,56 @@ |
|||||
|
<?php |
||||
|
|
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 缓存设置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
// 设置绝对路径 |
||||
|
// 因为在console中使用cache会导致找不到正确的runtime目录, 所以此处不能使用相对路径 |
||||
|
$rootPath = dirname(__DIR__); |
||||
|
|
||||
|
return [ |
||||
|
// 默认缓存驱动 |
||||
|
'default' => env('cache.driver', 'file'), |
||||
|
|
||||
|
// 缓存连接方式配置 |
||||
|
'stores' => [ |
||||
|
'file' => [ |
||||
|
// 驱动方式 |
||||
|
'type' => 'File', |
||||
|
// 缓存保存目录 |
||||
|
'path' => "{$rootPath}/runtime/cache/", |
||||
|
// 缓存前缀 |
||||
|
'prefix' => '', |
||||
|
// 缓存有效期 0表示永久缓存 |
||||
|
'expire' => 0, |
||||
|
// 缓存标签前缀 |
||||
|
'tag_prefix' => 'tag:', |
||||
|
// 序列化机制 例如 ['serialize', 'unserialize'] |
||||
|
'serialize' => [], |
||||
|
], |
||||
|
// 更多的缓存连接 |
||||
|
// redis缓存 |
||||
|
'redis' => [ |
||||
|
// 驱动方式 |
||||
|
'type' => 'redis', |
||||
|
// 服务器地址 |
||||
|
'host' => env('redis.hostname', '127.0.0.1'), |
||||
|
// 端口 |
||||
|
'port' => (int)env('redis.hostport', '6379'), |
||||
|
// 密码 |
||||
|
'password' => env('redis.password', ''), |
||||
|
// 缓存有效期 0表示永久缓存 |
||||
|
'expire' => 0, |
||||
|
// 缓存前缀 |
||||
|
'prefix' => '', |
||||
|
// 缓存标签前缀 |
||||
|
'tag_prefix' => 'tag:', |
||||
|
// 数据库 0号数据库 |
||||
|
'select' => (int)env('redis.select', 0), |
||||
|
// 序列化机制 例如 ['serialize', 'unserialize'] |
||||
|
'serialize' => [], |
||||
|
// 服务端超时 |
||||
|
'timeout' => 0 |
||||
|
], |
||||
|
], |
||||
|
]; |
||||
@ -0,0 +1,35 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Captcha配置文件 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
return [ |
||||
|
//验证码位数 |
||||
|
'length' => 5, |
||||
|
// 验证码字符集合 |
||||
|
'codeSet' => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY', |
||||
|
// 验证码过期时间 |
||||
|
'expire' => 1800, |
||||
|
// 是否使用中文验证码 |
||||
|
'useZh' => false, |
||||
|
// 是否使用算术验证码 |
||||
|
'math' => false, |
||||
|
// 是否使用背景图 |
||||
|
'useImgBg' => false, |
||||
|
//验证码字符大小 |
||||
|
'fontSize' => 25, |
||||
|
// 是否使用混淆曲线 |
||||
|
'useCurve' => true, |
||||
|
//是否添加杂点 |
||||
|
'useNoise' => true, |
||||
|
// 验证码字体 不设置则随机 |
||||
|
'fontttf' => '', |
||||
|
//背景颜色 |
||||
|
'bg' => [243, 251, 254], |
||||
|
// 验证码图片高度 |
||||
|
'imageH' => 0, |
||||
|
// 验证码图片宽度 |
||||
|
'imageW' => 0, |
||||
|
// 验证码可重复验证的次数 |
||||
|
'checkTimes' => 5, |
||||
|
]; |
||||
@ -0,0 +1,11 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 控制台配置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
return [ |
||||
|
// 指令定义 |
||||
|
'commands' => [ |
||||
|
// 定时任务 |
||||
|
'timer' => \app\timer\command\Timer::class, |
||||
|
], |
||||
|
]; |
||||
@ -0,0 +1,18 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Cookie设置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
return [ |
||||
|
// cookie 保存时间 |
||||
|
'expire' => 0, |
||||
|
// cookie 保存路径 |
||||
|
'path' => '/', |
||||
|
// cookie 有效域名 |
||||
|
'domain' => '', |
||||
|
// cookie 启用安全传输 |
||||
|
'secure' => false, |
||||
|
// httponly设置 |
||||
|
'httponly' => false, |
||||
|
// 是否使用 setcookie |
||||
|
'setcookie' => true, |
||||
|
]; |
||||
@ -0,0 +1,78 @@ |
|||||
|
<?php |
||||
|
|
||||
|
// 数据库配置 |
||||
|
$config = [ |
||||
|
// 服务器地址 |
||||
|
'host' => '127.0.0.1', |
||||
|
// 数据库名 |
||||
|
'database' => 'in_wenhua_com', |
||||
|
// 用户名 |
||||
|
'username' => 'in_wenhua_com', |
||||
|
// 密码 |
||||
|
'password' => 'jZME2zSERdW4TWzL', |
||||
|
// 端口号 |
||||
|
'hostport' => '3306', |
||||
|
// 数据库编码默认采用utf8 |
||||
|
'charset' => 'utf8', |
||||
|
]; |
||||
|
|
||||
|
return [ |
||||
|
// 默认使用的数据库连接配置 |
||||
|
'default' => env('database.driver', 'mysql'), |
||||
|
|
||||
|
// 自定义时间查询规则 |
||||
|
'time_query_rule' => [], |
||||
|
|
||||
|
// 自动写入时间戳字段 |
||||
|
// true为自动识别类型 false关闭 |
||||
|
// 字符串则明确指定时间字段类型 支持 int timestamp datetime date |
||||
|
'auto_timestamp' => true, |
||||
|
|
||||
|
// 时间字段取出后的默认时间格式 |
||||
|
'datetime_format' => 'Y-m-d H:i:s', |
||||
|
|
||||
|
// 数据库连接配置信息 |
||||
|
'connections' => [ |
||||
|
'mysql' => [ |
||||
|
// 数据库类型 |
||||
|
'type' => env('database.type', 'mysql'), |
||||
|
// 服务器地址 |
||||
|
'hostname' => env('database.hostname', $config['host']), |
||||
|
// 数据库名 |
||||
|
'database' => env('database.database', $config['database']), |
||||
|
// 用户名 |
||||
|
'username' => env('database.username', $config['username']), |
||||
|
// 密码 |
||||
|
'password' => env('database.password', $config['password']), |
||||
|
// 端口 |
||||
|
'hostport' => env('database.hostport', $config['hostport']), |
||||
|
// 数据库连接参数 |
||||
|
'params' => [], |
||||
|
// 数据库编码默认采用utf8 |
||||
|
'charset' => env('database.charset', 'utf8'), |
||||
|
// 数据库表前缀 |
||||
|
'prefix' => env('database.prefix', 'yoshop_'), |
||||
|
|
||||
|
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) |
||||
|
'deploy' => 0, |
||||
|
// 数据库读写是否分离 主从式有效 |
||||
|
'rw_separate' => false, |
||||
|
// 读写分离后 主服务器数量 |
||||
|
'master_num' => 1, |
||||
|
// 指定从服务器序号 |
||||
|
'slave_no' => '', |
||||
|
// 是否严格检查字段是否存在 |
||||
|
'fields_strict' => true, |
||||
|
// 是否需要断线重连 |
||||
|
'break_reconnect' => false, |
||||
|
// 监听SQL |
||||
|
'trigger_sql' => env('app_debug', true), |
||||
|
// 开启字段缓存 |
||||
|
'fields_cache' => false, |
||||
|
// 字段缓存路径 |
||||
|
'schema_cache_path' => app()->getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR, |
||||
|
], |
||||
|
|
||||
|
// 更多的数据库配置信息 |
||||
|
], |
||||
|
]; |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
// 默认磁盘 |
||||
|
'default' => env('filesystem.driver', 'local'), |
||||
|
// 磁盘列表 |
||||
|
'disks' => [ |
||||
|
'local' => [ |
||||
|
'type' => 'local', |
||||
|
'root' => app()->getRuntimePath() . 'local', |
||||
|
], |
||||
|
'public' => [ |
||||
|
// 磁盘类型 |
||||
|
'type' => 'local', |
||||
|
// 磁盘路径 |
||||
|
'root' => app()->getRootPath() . 'public/uploads', |
||||
|
// 磁盘路径对应的外部URL路径 |
||||
|
'url' => '/uploads', |
||||
|
// 可见性 |
||||
|
'visibility' => 'public', |
||||
|
], |
||||
|
'data' => [ |
||||
|
// 磁盘类型 |
||||
|
'type' => 'local', |
||||
|
// 磁盘路径 |
||||
|
'root' => app()->getRootPath() . 'data', |
||||
|
], |
||||
|
// 更多的磁盘配置信息 |
||||
|
], |
||||
|
]; |
||||
@ -0,0 +1,45 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: liu21st <liu21st@gmail.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Workerman设置 仅对 php think worker:gateway 指令有效 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
return [ |
||||
|
// 扩展自身需要的配置 |
||||
|
'protocol' => 'websocket', // 协议 支持 tcp udp unix http websocket text |
||||
|
'host' => '0.0.0.0', // 监听地址 |
||||
|
'port' => 2348, // 监听端口 |
||||
|
'socket' => '', // 完整监听地址 |
||||
|
'context' => [], // socket 上下文选项 |
||||
|
'register_deploy' => true, // 是否需要部署register |
||||
|
'businessWorker_deploy' => true, // 是否需要部署businessWorker |
||||
|
'gateway_deploy' => true, // 是否需要部署gateway |
||||
|
|
||||
|
// Register配置 |
||||
|
'registerAddress' => '127.0.0.1:1236', |
||||
|
|
||||
|
// Gateway配置 |
||||
|
'name' => 'thinkphp', |
||||
|
'count' => 1, |
||||
|
'lanIp' => '127.0.0.1', |
||||
|
'startPort' => 2000, |
||||
|
'daemonize' => false, |
||||
|
'pingInterval' => 30, |
||||
|
'pingNotResponseLimit' => 0, |
||||
|
'pingData' => '{"type":"ping"}', |
||||
|
|
||||
|
// BusinsessWorker配置 |
||||
|
'businessWorker' => [ |
||||
|
'name' => 'BusinessWorker', |
||||
|
'count' => 1, |
||||
|
'eventHandler' => '\think\worker\Events', |
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,25 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 多语言设置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
return [ |
||||
|
// 默认语言 |
||||
|
'default_lang' => env('lang.default_lang', 'zh-cn'), |
||||
|
// 允许的语言列表 |
||||
|
'allow_lang_list' => [], |
||||
|
// 多语言自动侦测变量名 |
||||
|
'detect_var' => 'lang', |
||||
|
// 是否使用Cookie记录 |
||||
|
'use_cookie' => true, |
||||
|
// 多语言cookie变量 |
||||
|
'cookie_var' => 'think_lang', |
||||
|
// 扩展语言包 |
||||
|
'extend_list' => [], |
||||
|
// Accept-Language转义为对应语言包名称 |
||||
|
'accept_language' => [ |
||||
|
'zh-hans-cn' => 'zh-cn', |
||||
|
], |
||||
|
// 是否支持语言分组 |
||||
|
'allow_group' => false, |
||||
|
]; |
||||
@ -0,0 +1,47 @@ |
|||||
|
<?php |
||||
|
|
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 日志设置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
return [ |
||||
|
// 默认日志记录通道 |
||||
|
'default' => env('log.channel', 'file'), |
||||
|
// 日志记录级别 |
||||
|
'level' => [], |
||||
|
// 日志类型记录的通道 ['error'=>'email',...] |
||||
|
'type_channel' => [], |
||||
|
// 关闭全局日志写入 |
||||
|
'close' => false, |
||||
|
// 全局日志处理 支持闭包 |
||||
|
'processor' => null, |
||||
|
|
||||
|
// 日志通道列表 |
||||
|
'channels' => [ |
||||
|
'file' => [ |
||||
|
// 日志记录方式 |
||||
|
'type' => 'File', |
||||
|
// 日志保存目录 |
||||
|
'path' => '', |
||||
|
// 单文件日志写入 |
||||
|
'single' => false, |
||||
|
// 独立日志级别 |
||||
|
'apart_level' => ['begin', 'error', 'sql', 'info'], |
||||
|
// 最大日志文件数量 |
||||
|
'max_files' => 0, |
||||
|
// 使用JSON格式记录 |
||||
|
'json' => false, |
||||
|
// 日志处理 |
||||
|
'processor' => null, |
||||
|
// 关闭通道日志写入 |
||||
|
'close' => false, |
||||
|
// 日志时间格式 |
||||
|
'time_format' => 'Y-m-d H:i:s', |
||||
|
// 日志输出格式化 |
||||
|
'format' => '[%s] [%s] %s', |
||||
|
// 是否实时写入 |
||||
|
'realtime_write' => false, |
||||
|
], |
||||
|
// 其它日志通道配置 |
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,8 @@ |
|||||
|
<?php |
||||
|
// 中间件配置 |
||||
|
return [ |
||||
|
// 别名或分组 |
||||
|
'alias' => [], |
||||
|
// 优先级设置,此数组中的中间件会按照数组中的顺序优先执行 |
||||
|
'priority' => [], |
||||
|
]; |
||||
@ -0,0 +1,58 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 路由设置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
############################################## |
||||
|
|
||||
|
// 是否显示入口文件[index.php],true:显示,false:隐藏 |
||||
|
// 隐藏入口文件需要先配置URL重写,请参考如下文档 |
||||
|
// https://www.kancloud.cn/manual/thinkphp6_0/1037488 |
||||
|
'url_show_root' => true, |
||||
|
|
||||
|
// 强制https |
||||
|
'url_force_https' => false, |
||||
|
|
||||
|
############################################## |
||||
|
|
||||
|
// pathinfo分隔符 |
||||
|
'pathinfo_depr' => '/', |
||||
|
// URL伪静态后缀 |
||||
|
'url_html_suffix' => '', |
||||
|
// URL普通方式参数 用于自动生成 |
||||
|
'url_common_param' => true, |
||||
|
// 是否开启路由延迟解析 |
||||
|
'url_lazy_route' => false, |
||||
|
// 是否强制使用路由 |
||||
|
'url_route_must' => false, // true false |
||||
|
// 合并路由规则 |
||||
|
'route_rule_merge' => false, |
||||
|
// 路由是否完全匹配 |
||||
|
'route_complete_match' => false, |
||||
|
// 访问控制器层名称 |
||||
|
'controller_layer' => 'controller', |
||||
|
// 空控制器名 |
||||
|
'empty_controller' => 'Error', |
||||
|
// 是否使用控制器后缀 |
||||
|
'controller_suffix' => false, |
||||
|
// 默认的路由变量规则 |
||||
|
'default_route_pattern' => '[\w\.]+', |
||||
|
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 |
||||
|
'request_cache_key' => false, |
||||
|
// 请求缓存有效期 |
||||
|
'request_cache_expire' => null, |
||||
|
// 全局请求缓存排除规则 |
||||
|
'request_cache_except' => [], |
||||
|
// 默认控制器名 |
||||
|
'default_controller' => 'Index', |
||||
|
// 默认操作名 |
||||
|
'default_action' => 'index', |
||||
|
// 操作方法后缀 |
||||
|
'action_suffix' => '', |
||||
|
// 默认JSONP格式返回的处理方法 |
||||
|
'default_jsonp_handler' => 'jsonpReturn', |
||||
|
// 默认JSONP处理方法 |
||||
|
'var_jsonp_handler' => 'callback', |
||||
|
]; |
||||
@ -0,0 +1,19 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 会话设置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
return [ |
||||
|
// session name |
||||
|
'name' => 'PHPSESSID', |
||||
|
// SESSION_ID的提交变量,解决flash上传跨域 |
||||
|
'var_session_id' => '', |
||||
|
// 驱动方式 支持file cache |
||||
|
'type' => 'file', |
||||
|
// 存储连接标识 当type使用cache的时候有效 |
||||
|
'store' => null, |
||||
|
// 过期时间 |
||||
|
'expire' => (60 * 60) * 5, // 5个小时 |
||||
|
// 前缀 |
||||
|
'prefix' => '', |
||||
|
]; |
||||
@ -0,0 +1,12 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
// 请求成功 |
||||
|
'success' => 200, |
||||
|
// 未登录 |
||||
|
'not_logged' => 401, |
||||
|
// 没有权限访问 |
||||
|
'not_permission' => 403, |
||||
|
// 服务器内部错误 |
||||
|
'error' => 500, |
||||
|
]; |
||||
@ -0,0 +1,10 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Trace设置 开启调试模式后有效 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
return [ |
||||
|
// 内置Html和Console两种方式 支持扩展 |
||||
|
'type' => 'Console', |
||||
|
// 读取的日志通道名 |
||||
|
'channel' => '', |
||||
|
]; |
||||
@ -0,0 +1,25 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 模板设置 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
return [ |
||||
|
// 模板引擎类型使用Think |
||||
|
'type' => 'Think', |
||||
|
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 |
||||
|
'auto_rule' => 1, |
||||
|
// 模板目录名 |
||||
|
'view_dir_name' => 'view', |
||||
|
// 模板后缀 |
||||
|
'view_suffix' => 'html', |
||||
|
// 模板文件名分隔符 |
||||
|
'view_depr' => DIRECTORY_SEPARATOR, |
||||
|
// 模板引擎普通标签开始标记 |
||||
|
'tpl_begin' => '{', |
||||
|
// 模板引擎普通标签结束标记 |
||||
|
'tpl_end' => '}', |
||||
|
// 标签库标签开始标记 |
||||
|
'taglib_begin' => '{', |
||||
|
// 标签库标签结束标记 |
||||
|
'taglib_end' => '}', |
||||
|
]; |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: liu21st <liu21st@gmail.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Workerman设置 仅对 php think worker 指令有效 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
return [ |
||||
|
// 扩展自身需要的配置 |
||||
|
'host' => '0.0.0.0', // 监听地址 |
||||
|
'port' => 2346, // 监听端口 |
||||
|
'root' => '', // WEB 根目录 默认会定位public目录 |
||||
|
'app_path' => '', // 应用目录 守护进程模式必须设置(绝对路径) |
||||
|
'file_monitor' => false, // 是否开启PHP文件更改监控(调试模式下自动开启) |
||||
|
'file_monitor_interval' => 2, // 文件监控检测时间间隔(秒) |
||||
|
'file_monitor_path' => [], // 文件监控目录 默认监控application和config目录 |
||||
|
|
||||
|
// 支持workerman的所有配置参数 |
||||
|
'name' => 'thinkphp', |
||||
|
'count' => 4, |
||||
|
'daemonize' => false, |
||||
|
'pidFile' => '', |
||||
|
]; |
||||
@ -0,0 +1,55 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: liu21st <liu21st@gmail.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Workerman设置 仅对 php think worker:server 指令有效 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
return [ |
||||
|
// 扩展自身需要的配置 |
||||
|
'protocol' => 'websocket', // 协议 支持 tcp udp unix http websocket text |
||||
|
'host' => '0.0.0.0', // 监听地址 |
||||
|
'port' => 2345, // 监听端口 |
||||
|
'socket' => '', // 完整监听地址 |
||||
|
'context' => [], // socket 上下文选项 |
||||
|
'worker_class' => '', // 自定义Workerman服务类名 支持数组定义多个服务 |
||||
|
|
||||
|
// 支持workerman的所有配置参数 |
||||
|
'name' => 'thinkphp', |
||||
|
'count' => 4, |
||||
|
'daemonize' => false, |
||||
|
'pidFile' => '', |
||||
|
|
||||
|
// 支持事件回调 |
||||
|
// onWorkerStart |
||||
|
'onWorkerStart' => function ($worker) { |
||||
|
|
||||
|
}, |
||||
|
// onWorkerReload |
||||
|
'onWorkerReload' => function ($worker) { |
||||
|
|
||||
|
}, |
||||
|
// onConnect |
||||
|
'onConnect' => function ($connection) { |
||||
|
|
||||
|
}, |
||||
|
// onMessage |
||||
|
'onMessage' => function ($connection, $data) { |
||||
|
$connection->send('receive success'); |
||||
|
}, |
||||
|
// onClose |
||||
|
'onClose' => function ($connection) { |
||||
|
|
||||
|
}, |
||||
|
// onError |
||||
|
'onError' => function ($connection, $code, $msg) { |
||||
|
echo "error [ $code ] $msg\n"; |
||||
|
}, |
||||
|
]; |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
declare (strict_types=1); |
||||
|
|
||||
|
namespace cores; |
||||
|
|
||||
|
use think\Service; |
||||
|
use think\facade\Log; |
||||
|
use think\facade\Request; |
||||
|
|
||||
|
/** |
||||
|
* 应用服务类 |
||||
|
*/ |
||||
|
class AppService extends Service |
||||
|
{ |
||||
|
// 服务注册 |
||||
|
public function register() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 服务启动 |
||||
|
public function boot() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,164 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
declare (strict_types=1); |
||||
|
|
||||
|
namespace cores; |
||||
|
|
||||
|
use think\App; |
||||
|
use think\Validate; |
||||
|
use think\response\Json; |
||||
|
use think\exception\ValidateException; |
||||
|
|
||||
|
/** |
||||
|
* 控制器基础类 |
||||
|
*/ |
||||
|
abstract class BaseController |
||||
|
{ |
||||
|
/** |
||||
|
* Request实例 |
||||
|
* @var \think\Request |
||||
|
*/ |
||||
|
protected \think\Request $request; |
||||
|
|
||||
|
/** |
||||
|
* 应用实例 |
||||
|
* @var App |
||||
|
*/ |
||||
|
protected App $app; |
||||
|
|
||||
|
/** |
||||
|
* 是否批量验证 |
||||
|
* @var bool |
||||
|
*/ |
||||
|
protected bool $batchValidate = false; |
||||
|
|
||||
|
/** |
||||
|
* 控制器中间件 |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected array $middleware = []; |
||||
|
|
||||
|
/** |
||||
|
* 构造方法 |
||||
|
* @access public |
||||
|
* @param App $app 应用对象 |
||||
|
*/ |
||||
|
public function __construct(App $app) |
||||
|
{ |
||||
|
$this->app = $app; |
||||
|
$this->request = $this->app->request; |
||||
|
|
||||
|
// 控制器初始化 |
||||
|
$this->initialize(); |
||||
|
} |
||||
|
|
||||
|
// 初始化 |
||||
|
protected function initialize() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 验证数据 |
||||
|
* @access protected |
||||
|
* @param array $data 数据 |
||||
|
* @param string|array $validate 验证器名或者验证规则数组 |
||||
|
* @param array $message 提示信息 |
||||
|
* @param bool $batch 是否批量验证 |
||||
|
* @return array|string|true |
||||
|
* @throws ValidateException |
||||
|
*/ |
||||
|
protected function validate(array $data, $validate, array $message = [], bool $batch = false) |
||||
|
{ |
||||
|
if (is_array($validate)) { |
||||
|
$v = new Validate(); |
||||
|
$v->rule($validate); |
||||
|
} else { |
||||
|
if (strpos($validate, '.')) { |
||||
|
// 支持场景 |
||||
|
[$validate, $scene] = explode('.', $validate); |
||||
|
} |
||||
|
$class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate); |
||||
|
$v = new $class(); |
||||
|
if (!empty($scene)) { |
||||
|
$v->scene($scene); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$v->message($message); |
||||
|
|
||||
|
// 是否批量验证 |
||||
|
if ($batch || $this->batchValidate) { |
||||
|
$v->batch(true); |
||||
|
} |
||||
|
|
||||
|
return $v->failException(true)->check($data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 返回封装后的 API 数据到客户端 |
||||
|
* @param int|null $status |
||||
|
* @param string $message |
||||
|
* @param array $data |
||||
|
* @return Json |
||||
|
*/ |
||||
|
protected final function renderJson(int $status = null, string $message = '', array $data = []): Json |
||||
|
{ |
||||
|
return json(compact('status', 'message', 'data')); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 返回操作成功json |
||||
|
* @param array|string $data |
||||
|
* @param string $message |
||||
|
* @return Json |
||||
|
*/ |
||||
|
protected final function renderSuccess($data = [], string $message = 'success'): Json |
||||
|
{ |
||||
|
if (is_string($data)) { |
||||
|
$message = $data; |
||||
|
$data = []; |
||||
|
} |
||||
|
return $this->renderJson(config('status.success'), $message, $data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 返回操作失败json |
||||
|
* @param string $message |
||||
|
* @param array $data |
||||
|
* @return Json |
||||
|
*/ |
||||
|
protected final function renderError(string $message = 'error', array $data = []): Json |
||||
|
{ |
||||
|
return $this->renderJson(config('status.error'), $message, $data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取post数据 (数组) |
||||
|
* @param null $key |
||||
|
* @param bool $filter |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
protected final function postData($key = null, bool $filter = false) |
||||
|
{ |
||||
|
return $this->request->post(empty($key) ? '' : "{$key}/a", null, $filter ? '' : null); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取post数据 (数组) |
||||
|
* @param string|null $key |
||||
|
* @param bool $filter |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
protected final function postForm(?string $key = 'form', bool $filter = true) |
||||
|
{ |
||||
|
return $this->postData(empty($key) ? 'form' : $key, $filter); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,298 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
declare (strict_types=1); |
||||
|
|
||||
|
namespace cores; |
||||
|
|
||||
|
use think\Model; |
||||
|
use think\db\Query; |
||||
|
use cores\traits\ErrorTrait; |
||||
|
|
||||
|
/** |
||||
|
* 模型基类 |
||||
|
* Class BaseModel |
||||
|
* @package app\common\model |
||||
|
*/ |
||||
|
abstract class BaseModel extends Model |
||||
|
{ |
||||
|
use ErrorTrait; |
||||
|
|
||||
|
// 当前访问的商城ID |
||||
|
public static $storeId; |
||||
|
|
||||
|
// 定义表名 |
||||
|
protected $name; |
||||
|
|
||||
|
// 模型别名 |
||||
|
protected $alias = ''; |
||||
|
|
||||
|
// 定义全局的查询范围 |
||||
|
protected $globalScope = ['store_id']; |
||||
|
|
||||
|
// 是否允许全局查询store_id |
||||
|
protected $isGlobalScopeStoreId = true; |
||||
|
|
||||
|
// 错误信息 |
||||
|
protected $error = ''; |
||||
|
|
||||
|
/** |
||||
|
* 模型基类初始化 |
||||
|
*/ |
||||
|
public static function init() |
||||
|
{ |
||||
|
parent::init(); |
||||
|
// 绑定store_id |
||||
|
self::getStoreId(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查找单条记录 |
||||
|
* @param $data |
||||
|
* @param array $with |
||||
|
* @return array|false|static|null |
||||
|
*/ |
||||
|
public static function get($data, array $with = []) |
||||
|
{ |
||||
|
try { |
||||
|
$query = (new static)->with($with); |
||||
|
return is_array($data) ? $query->where($data)->find() : $query->find((int)$data); |
||||
|
} catch (\Exception $e) { |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 定义全局的查询范围 |
||||
|
* @param Query $query |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function scopeStore_id(Query $query): bool |
||||
|
{ |
||||
|
if (!$this->isGlobalScopeStoreId) return false; |
||||
|
$storeId = self::getStoreId(); |
||||
|
$storeId > 0 && $query->where($query->getTable() . '.store_id', $storeId); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取当前操作的商城ID |
||||
|
* @return int|null |
||||
|
*/ |
||||
|
private static function getStoreId(): ?int |
||||
|
{ |
||||
|
if (empty(self::$storeId) && in_array(app_name(), ['store', 'api'])) { |
||||
|
self::$storeId = getStoreId(); |
||||
|
} |
||||
|
return self::$storeId; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取当前调用来源的应用名称 |
||||
|
* 例如:admin, api, store, task |
||||
|
* @return string|bool |
||||
|
*/ |
||||
|
protected static function getCalledModule() |
||||
|
{ |
||||
|
if (preg_match('/app\\\(\w+)/', get_called_class(), $class)) { |
||||
|
return $class[1]; |
||||
|
} |
||||
|
return 'common'; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 设置默认的检索数据 |
||||
|
* @param array $query |
||||
|
* @param array $default |
||||
|
* @return array |
||||
|
*/ |
||||
|
protected function setQueryDefaultValue(array $query, array $default = []): array |
||||
|
{ |
||||
|
$data = array_merge($default, $query); |
||||
|
foreach ($query as $field => $value) { |
||||
|
// 不存在默认值跳出循环 |
||||
|
if (!isset($default[$field])) continue; |
||||
|
// 如果传参为空, 设置默认值 |
||||
|
if (empty($value) && $value !== '0') { |
||||
|
$data[$field] = $default[$field]; |
||||
|
} |
||||
|
} |
||||
|
return $data; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 设置基础查询条件(用于简化基础alias和field) |
||||
|
* @test 2019-4-25 |
||||
|
* @param string $alias |
||||
|
* @param array $join |
||||
|
* @return static |
||||
|
*/ |
||||
|
public function setBaseQuery(string $alias = '', array $join = []) |
||||
|
{ |
||||
|
// 设置别名 |
||||
|
$aliasValue = $alias ?: $this->alias; |
||||
|
$query = $this->alias($aliasValue)->field("{$aliasValue}.*"); |
||||
|
// join条件 |
||||
|
if (!empty($join)) : foreach ($join as $item): |
||||
|
$query->join($item[0], "{$item[0]}.{$item[1]}={$aliasValue}." . ($item[2] ?? $item[1])); |
||||
|
endforeach; endif; |
||||
|
return $query; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 更新数据 |
||||
|
* 重写\think\Model::update方法, 目的可以返回更新的状态bool |
||||
|
* @access public |
||||
|
* @param array $data 数据数组 |
||||
|
* @param array $where 更新条件 |
||||
|
* @param array $allowField 允许字段 |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public static function updateBase(array $data, array $where = [], array $allowField = []): bool |
||||
|
{ |
||||
|
$model = new static; |
||||
|
if (!empty($allowField)) { |
||||
|
$model->allowField($allowField); |
||||
|
} |
||||
|
if (!empty($where)) { |
||||
|
$model->setUpdateWhere($where); |
||||
|
} |
||||
|
return $model->exists(true)->save($data); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量更新数据(支持带where条件) |
||||
|
* @param iterable $dataSet [0 => ['data'=>[], 'where'=>[]]] |
||||
|
* @return array|false |
||||
|
*/ |
||||
|
public function updateAll(iterable $dataSet) |
||||
|
{ |
||||
|
if (empty($dataSet)) { |
||||
|
return false; |
||||
|
} |
||||
|
return $this->transaction(function () use ($dataSet) { |
||||
|
$result = []; |
||||
|
foreach ($dataSet as $key => $item) { |
||||
|
$result[$key] = self::updateBase($item['data'], $item['where']); |
||||
|
} |
||||
|
return $result; |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量新增数据 |
||||
|
* @param iterable $dataSet [0 => ['id'=>10001, 'name'=>'wang']] |
||||
|
* @return array|false |
||||
|
*/ |
||||
|
public function addAll(iterable $dataSet) |
||||
|
{ |
||||
|
if (empty($dataSet)) { |
||||
|
return false; |
||||
|
} |
||||
|
return $this->transaction(function () use ($dataSet) { |
||||
|
$result = []; |
||||
|
foreach ($dataSet as $key => $item) { |
||||
|
$result[$key] = self::create($item, $this->field); |
||||
|
} |
||||
|
return $result; |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除记录 |
||||
|
* @param array $where |
||||
|
* 方式1: ['goods_id' => $goodsId] |
||||
|
* 方式2: [ |
||||
|
* ['store_user_id', '=', $storeUserId], |
||||
|
* ['role_id', 'in', $deleteRoleIds] |
||||
|
* ] |
||||
|
* @return bool|int 这里实际返回的是数量int |
||||
|
*/ |
||||
|
public static function deleteAll(array $where) |
||||
|
{ |
||||
|
return (new static)->where($where)->delete(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 字段值增长 |
||||
|
* @param array|int|bool $where |
||||
|
* @param string $field |
||||
|
* @param float $step |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
protected function setInc($where, string $field, float $step = 1) |
||||
|
{ |
||||
|
if (is_numeric($where)) { |
||||
|
$where = [$this->getPk() => (int)$where]; |
||||
|
} |
||||
|
return $this->where($where)->inc($field, $step)->update(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 字段值消减 |
||||
|
* @param array|int|bool $where |
||||
|
* @param string $field |
||||
|
* @param float $step |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
protected function setDec($where, string $field, float $step = 1) |
||||
|
{ |
||||
|
if (is_numeric($where)) { |
||||
|
$where = [$this->getPk() => (int)$where]; |
||||
|
} |
||||
|
return $this->where($where)->dec($field, $step)->update(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 实例化新查询对象 |
||||
|
* @return \think\db\BaseQuery |
||||
|
*/ |
||||
|
protected function getNewQuery() |
||||
|
{ |
||||
|
return $this->db(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增hidden属性 |
||||
|
* @param array $hidden |
||||
|
* @return $this |
||||
|
*/ |
||||
|
protected function addHidden(array $hidden) |
||||
|
{ |
||||
|
$this->hidden = array_merge($this->hidden, $hidden); |
||||
|
return $this; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 生成字段列表(字段加上$alias别名) |
||||
|
* @param string $alias 别名 |
||||
|
* @param array $withoutFields 排除的字段 |
||||
|
* @return array |
||||
|
*/ |
||||
|
protected function getAliasFields(string $alias, array $withoutFields = []): array |
||||
|
{ |
||||
|
$fields = array_diff($this->getTableFields(), $withoutFields); |
||||
|
foreach ($fields as &$field) { |
||||
|
$field = "$alias.$field"; |
||||
|
} |
||||
|
return $fields; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取隐藏的属性 |
||||
|
* @param array $hidden |
||||
|
* @return array |
||||
|
*/ |
||||
|
public static function getHidden(array $hidden = []): array |
||||
|
{ |
||||
|
$model = new static; |
||||
|
return array_merge($model->hidden, $hidden); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,152 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
namespace cores; |
||||
|
|
||||
|
use Throwable; |
||||
|
use think\Response; |
||||
|
use think\response\Json; |
||||
|
use think\facade\Log; |
||||
|
use think\facade\Request; |
||||
|
use think\exception\Handle; |
||||
|
use think\db\exception\PDOException; |
||||
|
use think\exception\HttpResponseException; |
||||
|
use cores\exception\BaseException; |
||||
|
|
||||
|
/** |
||||
|
* 应用异常处理类 |
||||
|
*/ |
||||
|
class ExceptionHandle extends Handle |
||||
|
{ |
||||
|
// 状态码 |
||||
|
private int $status = 200; |
||||
|
|
||||
|
// 错误信息 |
||||
|
private string $message; |
||||
|
|
||||
|
// 附加数据 |
||||
|
public array $data = []; |
||||
|
|
||||
|
/** |
||||
|
* 记录异常信息(包括日志或者其它方式记录) |
||||
|
* @access public |
||||
|
* @param Throwable $exception |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function report(Throwable $exception): void |
||||
|
{ |
||||
|
// 不使用内置的方式记录异常日志 |
||||
|
// parent::report($exception); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Render an exception into an HTTP response. |
||||
|
* |
||||
|
* @access public |
||||
|
* @param $request |
||||
|
* @param Throwable $e |
||||
|
* @return Response |
||||
|
*/ |
||||
|
public function render($request, Throwable $e): Response |
||||
|
{ |
||||
|
if ($e instanceof HttpResponseException) { |
||||
|
return $e->getResponse(); |
||||
|
} |
||||
|
// 手动触发的异常 BaseException |
||||
|
if ($e instanceof BaseException) { |
||||
|
$this->status = $e->status; |
||||
|
$this->message = $e->message; |
||||
|
$this->data = $e->data; |
||||
|
$extend = property_exists($e, 'extend') ? $e->extend : []; |
||||
|
return $this->output($extend); |
||||
|
} |
||||
|
// 系统运行的异常 |
||||
|
$this->status = config('status.error'); |
||||
|
$this->message = $e->getMessage() ?: '很抱歉,服务器内部错误'; |
||||
|
// 如果是debug模式, 输出调试信息 |
||||
|
if (is_debug()) { |
||||
|
return $this->outputDebug($e); |
||||
|
} |
||||
|
// 将运行异常写入日志 |
||||
|
$this->errorLog($e); |
||||
|
return $this->output(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 返回json格式数据 |
||||
|
* @param array $extend 扩展的数据 |
||||
|
* @return Json |
||||
|
*/ |
||||
|
private function output(array $extend = []): Json |
||||
|
{ |
||||
|
$jsonData = ['message' => $this->message, 'status' => $this->status, 'data' => $this->data]; |
||||
|
return json(array_merge($jsonData, $extend)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 返回json格式数据 (debug模式) |
||||
|
* @param Throwable $e |
||||
|
* @return Json |
||||
|
*/ |
||||
|
private function outputDebug(Throwable $e): Json |
||||
|
{ |
||||
|
$debug = [ |
||||
|
'name' => get_class($e), |
||||
|
'file' => $e->getFile(), |
||||
|
'line' => $e->getLine(), |
||||
|
'code' => $this->getCode($e), |
||||
|
'message' => $this->getMessage($e), |
||||
|
'trace' => $e->getTrace(), |
||||
|
'source' => $this->getSourceCode($e), |
||||
|
]; |
||||
|
return $this->output(['debug' => $debug]); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 将异常写入日志 |
||||
|
* @param Throwable $e |
||||
|
*/ |
||||
|
private function errorLog(Throwable $e) |
||||
|
{ |
||||
|
// 错误信息 |
||||
|
$data = [ |
||||
|
'file' => $e->getFile(), |
||||
|
'line' => $e->getLine(), |
||||
|
'message' => $this->getMessage($e), |
||||
|
'status' => $this->getCode($e), |
||||
|
]; |
||||
|
// 日志内容 |
||||
|
$log = $this->getVisitor(); |
||||
|
$log .= "\r\n" . "[ message ] [{$data['status']}] {$data['message']}"; |
||||
|
$log .= "\r\n" . "[ file ] {$data['file']}:{$data['line']}"; |
||||
|
// $log .= "\r\n" . "[ time ] " . format_time(time()); |
||||
|
$log .= "\r\n" . '[ header ] ' . print_r(Request::header(), true); |
||||
|
$log .= '[ param ] ' . print_r(Request::param(), true); |
||||
|
// 如果是数据库报错, 则记录sql语句 |
||||
|
if ($e instanceof PDOException) { |
||||
|
$log .= "[ Error SQL ] " . $e->getData()['Database Status']['Error SQL']; |
||||
|
$log .= "\r\n"; |
||||
|
} |
||||
|
$log .= "\r\n" . $e->getTraceAsString(); |
||||
|
$log .= "\r\n" . '--------------------------------------------------------------------------------------------'; |
||||
|
// 写入日志文件 |
||||
|
Log::record($log, 'error'); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取请求路径信息 |
||||
|
* @return string |
||||
|
*/ |
||||
|
private function getVisitor(): string |
||||
|
{ |
||||
|
$data = [Request::ip(), Request::method(), Request::url(true)]; |
||||
|
return implode(' ', $data); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
namespace cores; |
||||
|
|
||||
|
// 应用请求对象类 |
||||
|
class Request extends \think\Request |
||||
|
{ |
||||
|
// 全局过滤规则 |
||||
|
protected $filter = ['my_trim', 'my_htmlspecialchars', 'filter_emoji']; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
declare (strict_types=1); |
||||
|
|
||||
|
namespace cores\exception; |
||||
|
|
||||
|
use think\Exception; |
||||
|
|
||||
|
/** |
||||
|
* 自定义异常类的基类 |
||||
|
* Class BaseException |
||||
|
* @package cores\exception |
||||
|
*/ |
||||
|
class BaseException extends Exception |
||||
|
{ |
||||
|
// 状态码 |
||||
|
public $status; |
||||
|
|
||||
|
// 错误信息 |
||||
|
public $message = ''; |
||||
|
|
||||
|
// 输出的数据 |
||||
|
public $data = []; |
||||
|
|
||||
|
/** |
||||
|
* 构造函数,接收一个关联数组 |
||||
|
* @param array $params 关联数组只应包含status、msg、data,且不应该是空值 |
||||
|
*/ |
||||
|
public function __construct($params = []) |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
$this->status = $params['status'] ?? config('status.error'); |
||||
|
$this->message = $params['message'] ?? '很抱歉,服务器内部错误'; |
||||
|
$this->data = $params['data'] ?? []; |
||||
|
} |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,38 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
declare (strict_types=1); |
||||
|
|
||||
|
namespace cores\exception; |
||||
|
|
||||
|
/** |
||||
|
* 自定义异常类:调试输出 |
||||
|
* Class DebugException |
||||
|
* @package cores\exception |
||||
|
*/ |
||||
|
class DebugException extends BaseException |
||||
|
{ |
||||
|
// 附加的数据 |
||||
|
public $extend = []; |
||||
|
|
||||
|
/** |
||||
|
* 构造函数,接收一个关联数组 |
||||
|
* @param array $params 关联数组只应包含status、msg、data,且不应该是空值 |
||||
|
* @param mixed $debug 调试输出的数据 |
||||
|
*/ |
||||
|
public function __construct(array $params = [], $debug = null) |
||||
|
{ |
||||
|
parent::__construct($params); |
||||
|
$this->status = config('status.success'); |
||||
|
$this->message = '-- 调试输出 --'; |
||||
|
$this->extend = ['debug' => $debug]; |
||||
|
} |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,110 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace cores\library; |
||||
|
|
||||
|
use app\common\library\helper; |
||||
|
use cores\exception\BaseException; |
||||
|
|
||||
|
/** |
||||
|
* 版本号工具类 |
||||
|
*/ |
||||
|
class Version |
||||
|
{ |
||||
|
/** |
||||
|
* 获取当前系统版本号 |
||||
|
* @return string |
||||
|
* @throws BaseException |
||||
|
*/ |
||||
|
public static function getVersion(): string |
||||
|
{ |
||||
|
static $version = []; |
||||
|
if (empty($version)) { |
||||
|
// 读取version.json文件 |
||||
|
$filePath = root_path() . '/version.json'; |
||||
|
!file_exists($filePath) && throwError('version.json not found'); |
||||
|
// 解析json数据 |
||||
|
$version = helper::jsonDecode(file_get_contents($filePath)); |
||||
|
!is_array($version) && throwError('version cannot be decoded'); |
||||
|
} |
||||
|
return $version['version']; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取下一个版本号 |
||||
|
* @param string $currentVersion 当前的版本号 |
||||
|
* @param array $versionCollection 版本号列表 |
||||
|
* @return false|string |
||||
|
* @throws BaseException |
||||
|
*/ |
||||
|
public static function nextVersion(string $currentVersion, array $versionCollection) |
||||
|
{ |
||||
|
$vers1 = self::versionToInteger($currentVersion); |
||||
|
$dataset = []; |
||||
|
foreach ($versionCollection as $value) { |
||||
|
$vers2 = self::versionToInteger($value); |
||||
|
$vers2 > $vers1 && $dataset[] = $vers2; |
||||
|
} |
||||
|
if (empty($dataset)) { |
||||
|
return false; |
||||
|
} |
||||
|
return self::integerToVersion(min($dataset)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 将版本转为数字 |
||||
|
* @param string $version |
||||
|
* @return int |
||||
|
* @throws BaseException |
||||
|
*/ |
||||
|
public static function versionToInteger(string $version): int |
||||
|
{ |
||||
|
if (!self::check($version)) { |
||||
|
throwError('version Validate Error'); |
||||
|
} |
||||
|
list($major, $minor, $sub) = explode('.', $version); |
||||
|
return intval($major * 10000 + $minor * 100 + $sub); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 将数字转为版本 |
||||
|
* @param int $versionCode 版本的数字表示 |
||||
|
* @return string |
||||
|
* @throws BaseException |
||||
|
*/ |
||||
|
public static function integerToVersion(int $versionCode): string |
||||
|
{ |
||||
|
if (!is_numeric($versionCode) || $versionCode >= 100000) { |
||||
|
throwError('version code Validate Error'); |
||||
|
} |
||||
|
$version = array(); |
||||
|
$version[0] = (int)($versionCode / 10000); |
||||
|
$version[1] = (int)($versionCode % 10000 / 100); |
||||
|
$version[2] = $versionCode % 100; |
||||
|
return implode('.', $version); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 检查版本格式是否正确 |
||||
|
* @param string $version 版本 |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public static function check(string $version): bool |
||||
|
{ |
||||
|
return (bool)preg_match('/^[0-9]{1,3}\.[0-9]{1,2}\.[0-9]{1,2}$/', $version); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 比较两个版本的值 |
||||
|
* @param string $version1 版本1 |
||||
|
* @param string $version2 版本2 |
||||
|
* @return int -1:版本1小于版本2, 0:相等, 1:版本1大于版本2 |
||||
|
* @throws BaseException |
||||
|
*/ |
||||
|
public static function compare(string $version1, string $version2): int |
||||
|
{ |
||||
|
if (!self::check($version1) || !self::check($version2)) { |
||||
|
throwError('version1 or version2 Validate Error'); |
||||
|
} |
||||
|
return version_compare($version1, $version2); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,101 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
declare (strict_types=1); |
||||
|
|
||||
|
namespace cores\middleware; |
||||
|
|
||||
|
use Closure; |
||||
|
use think\Config; |
||||
|
use think\Request; |
||||
|
use think\Response; |
||||
|
|
||||
|
/** |
||||
|
* 跨域请求支持 |
||||
|
* Class AllowCrossDomain |
||||
|
* @package cores\middleware |
||||
|
*/ |
||||
|
class AllowCrossDomain |
||||
|
{ |
||||
|
// cookie的所属域名 |
||||
|
protected $cookieDomain; |
||||
|
|
||||
|
/** |
||||
|
* 构造方法 |
||||
|
* AllowCrossDomain constructor. |
||||
|
* @param Config $config |
||||
|
*/ |
||||
|
public function __construct(Config $config) |
||||
|
{ |
||||
|
$this->cookieDomain = $config->get('cookie.domain', ''); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取允许跨域的header参数 [自定义] |
||||
|
* @return array |
||||
|
*/ |
||||
|
private function getCustomHeader() |
||||
|
{ |
||||
|
return [ |
||||
|
'Access-Token', |
||||
|
'storeId', |
||||
|
'platform', |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取允许跨域的header参数 |
||||
|
* @return array |
||||
|
*/ |
||||
|
private function getHeader() |
||||
|
{ |
||||
|
$headers = array_merge([ |
||||
|
'Authorization', 'Content-Type', 'X-CSRF-TOKEN', 'X-Requested-With', |
||||
|
'If-Match', 'If-Modified-Since', 'If-None-Match', 'If-Unmodified-Since' |
||||
|
], $this->getCustomHeader()); |
||||
|
|
||||
|
return [ |
||||
|
// 允许所有域名访问 |
||||
|
'Access-Control-Allow-Origin' => '*', |
||||
|
// 允许cookie跨域访问 |
||||
|
'Access-Control-Allow-Credentials' => 'true', |
||||
|
// 预检请求的有效期 |
||||
|
'Access-Control-Max-Age' => 1800, |
||||
|
// 允许跨域的方法 |
||||
|
'Access-Control-Allow-Methods' => 'GET, POST, PATCH, PUT, DELETE, OPTIONS', |
||||
|
// 跨域请求header头 |
||||
|
'Access-Control-Allow-Headers' => implode(',', $headers), |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 允许跨域请求 |
||||
|
* @access public |
||||
|
* @param Request $request |
||||
|
* @param Closure $next |
||||
|
* @param array|null $header |
||||
|
* @return Response |
||||
|
*/ |
||||
|
public function handle(Request $request, Closure $next, ?array $header = []) |
||||
|
{ |
||||
|
$header = !empty($header) ? array_merge($this->getHeader(), $header) : $this->getHeader(); |
||||
|
if (!isset($header['Access-Control-Allow-Origin'])) { |
||||
|
$origin = $request->header('origin'); |
||||
|
|
||||
|
if ($origin && ('' == $this->cookieDomain || strpos($origin, $this->cookieDomain))) { |
||||
|
$header['Access-Control-Allow-Origin'] = $origin; |
||||
|
} else { |
||||
|
$header['Access-Control-Allow-Origin'] = '*'; |
||||
|
} |
||||
|
} |
||||
|
return $next($request)->header($header); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,66 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
declare (strict_types=1); |
||||
|
|
||||
|
namespace cores\middleware; |
||||
|
|
||||
|
use think\Response; |
||||
|
use think\facade\Log as FacadeLog; |
||||
|
use app\common\library\Log; |
||||
|
|
||||
|
/** |
||||
|
* 中间件:应用日志 |
||||
|
*/ |
||||
|
class AppLog |
||||
|
{ |
||||
|
// 访问日志 |
||||
|
private static $beginLog = ''; |
||||
|
|
||||
|
/** |
||||
|
* 前置中间件 |
||||
|
* @param \think\Request $request |
||||
|
* @param \Closure $next |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function handle(\think\Request $request, \Closure $next) |
||||
|
{ |
||||
|
// 记录访问日志 |
||||
|
if (env('begin_log')) { |
||||
|
$log = $this->getVisitor($request); |
||||
|
$log .= "\r\n" . '[ header ] ' . print_r($request->header(), true); |
||||
|
$log .= "" . '[ param ] ' . print_r($request->param(), true); |
||||
|
$log .= '--------------------------------------------------------------------------------------------'; |
||||
|
static::$beginLog = $log; |
||||
|
} |
||||
|
return $next($request); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 记录访问日志 |
||||
|
* @param Response $response |
||||
|
*/ |
||||
|
public function end(Response $response) |
||||
|
{ |
||||
|
FacadeLog::record(static::$beginLog, 'begin'); |
||||
|
Log::end(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取请求路径信息 |
||||
|
* @param \think\Request $request |
||||
|
* @return string |
||||
|
*/ |
||||
|
private function getVisitor(\think\Request $request): string |
||||
|
{ |
||||
|
$data = [$request->ip(), $request->method(), $request->url(true)]; |
||||
|
return implode(' ', $data); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: 萤火科技 <admin@yiovo.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
namespace cores\traits; |
||||
|
|
||||
|
/** |
||||
|
* 错误信息Trait类 |
||||
|
*/ |
||||
|
trait ErrorTrait |
||||
|
{ |
||||
|
/** |
||||
|
* 错误信息 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $error = ''; |
||||
|
|
||||
|
/** |
||||
|
* 设置错误信息 |
||||
|
* @param string $error |
||||
|
* @return bool |
||||
|
*/ |
||||
|
protected function setError(string $error): bool |
||||
|
{ |
||||
|
$this->error = $error ?: '未知错误'; |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取错误信息 |
||||
|
* @return string |
||||
|
*/ |
||||
|
public function getError(): string |
||||
|
{ |
||||
|
return $this->error; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 是否存在错误信息 |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function hasError(): bool |
||||
|
{ |
||||
|
return !empty($this->error); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,2 @@ |
|||||
|
* |
||||
|
!.gitignore |
||||
@ -0,0 +1,2 @@ |
|||||
|
* |
||||
|
!.gitignore |
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,39 @@ |
|||||
|
<!doctype html> |
||||
|
<html> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>恭喜,站点创建成功!</title> |
||||
|
<style> |
||||
|
.container { |
||||
|
width: 60%; |
||||
|
margin: 10% auto 0; |
||||
|
background-color: #f0f0f0; |
||||
|
padding: 2% 5%; |
||||
|
border-radius: 10px |
||||
|
} |
||||
|
|
||||
|
ul { |
||||
|
padding-left: 20px; |
||||
|
} |
||||
|
|
||||
|
ul li { |
||||
|
line-height: 2.3 |
||||
|
} |
||||
|
|
||||
|
a { |
||||
|
color: #20a53a |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="container"> |
||||
|
<h1>恭喜, 站点创建成功!</h1> |
||||
|
<h3>这是默认index.html,本页面由系统自动生成</h3> |
||||
|
<ul> |
||||
|
<li>本页面在FTP根目录下的index.html</li> |
||||
|
<li>您可以修改、删除或覆盖本页面</li> |
||||
|
<li>FTP相关信息,请到“面板系统后台 > FTP” 查看</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,17 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | ThinkPHP [ WE CAN DO IT JUST THINK ] |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved. |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: liu21st <liu21st@gmail.com> |
||||
|
// +---------------------------------------------------------------------- |
||||
|
use think\facade\Route; |
||||
|
|
||||
|
Route::get('think', function () { |
||||
|
return 'hello,ThinkPHP6!'; |
||||
|
}); |
||||
|
|
||||
|
Route::get('hello/:name', 'index/hello'); |
||||
@ -0,0 +1,2 @@ |
|||||
|
* |
||||
|
!.gitignore |
||||
@ -0,0 +1,10 @@ |
|||||
|
#!/usr/bin/env php |
||||
|
<?php |
||||
|
namespace think; |
||||
|
|
||||
|
// 命令行入口文件 |
||||
|
// 加载基础文件 |
||||
|
require __DIR__ . '/vendor/autoload.php'; |
||||
|
|
||||
|
// 应用初始化 |
||||
|
(new App())->console->run(); |
||||
@ -0,0 +1,3 @@ |
|||||
|
{ |
||||
|
"version": "2.0.8" |
||||
|
} |
||||
Binary file not shown.
@ -0,0 +1,494 @@ |
|||||
|
|
||||
|
# v2.0.8 |
||||
|
# 修改时间:2023-04-24 |
||||
|
UPDATE `yoshop_region` SET `code`='110100' WHERE (`id`='2'); |
||||
|
UPDATE `yoshop_region` SET `code`='120100' WHERE (`id`='20'); |
||||
|
UPDATE `yoshop_region` SET `code`='310100' WHERE (`id`='783'); |
||||
|
UPDATE `yoshop_region` SET `code`='500100' WHERE (`id`='2224'); |
||||
|
|
||||
|
DELETE FROM `yoshop_region` WHERE (`pid`='1495' AND `level`='3'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`pid`='1671' AND `level`='3'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`pid`='2195' AND `level`='3'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`pid`='3094' AND `level`='3'); |
||||
|
|
||||
|
INSERT INTO `yoshop_region` VALUES ('3706', '省直辖县级行政区划', '1495', '419000', '2'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3707', '省直辖县级行政区划', '1671', '429000', '2'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3708', '省直辖县级行政区划', '2195', '469000', '2'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3709', '县', '2223', '500200', '2'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3710', '自治区直辖县级行政区划', '3094', '659000', '2'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3711', '石家庄高新技术产业开发区', '38', '130171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3712', '石家庄循环化工园区', '38', '130172', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3713', '河北唐山芦台经济开发区', '61', '130271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3714', '唐山市汉沽管理区', '61', '130272', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3715', '唐山高新技术产业开发区', '61', '130273', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3716', '河北唐山海港经济开发区', '61', '130274', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3717', '秦皇岛市经济技术开发区', '76', '130371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3718', '北戴河新区', '76', '130372', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3719', '邯郸经济技术开发区', '84', '130471', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3720', '邯郸冀南新区', '84', '130473', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3721', '襄都区', '103', '130502', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3722', '信都区', '103', '130503', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3723', '任泽区', '103', '130505', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3724', '南和区', '103', '130506', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3725', '河北邢台经济开发区', '103', '130571', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3726', '保定高新技术产业开发区', '123', '130671', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3727', '保定白沟新城', '123', '130672', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3728', '张家口经济开发区', '148', '130771', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3729', '张家口市察北管理区', '148', '130772', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3730', '张家口市塞北管理区', '148', '130773', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3731', '承德高新技术产业开发区', '165', '130871', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3732', '河北沧州经济开发区', '177', '130971', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3733', '沧州高新技术产业开发区', '177', '130972', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3734', '沧州渤海新区', '177', '130973', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3735', '廊坊经济技术开发区', '194', '131071', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3736', '河北衡水高新技术产业开发区', '205', '131171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3737', '衡水滨湖新区', '205', '131172', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3738', '山西转型综合改革示范区', '218', '140171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3739', '山西大同经济开发区', '229', '140271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3740', '山西长治高新技术产业园区', '246', '140471', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3741', '山西朔州经济开发区', '266', '140671', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3742', '五台山风景名胜区', '299', '140971', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3743', '呼和浩特经济技术开发区', '347', '150172', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3744', '包头稀土高新技术产业开发区', '357', '150271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3745', '通辽经济技术开发区', '384', '150571', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3746', '乌拉盖管委会', '445', '152571', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3747', '内蒙古阿拉善高新技术产业开发区', '458', '152971', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3748', '长春经济技术开发区', '578', '220171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3749', '长春净月高新技术产业开发区', '578', '220172', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3750', '长春高新技术产业开发区', '578', '220173', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3751', '长春汽车经济技术开发区', '578', '220174', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3752', '公主岭市', '578', '220184', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3753', '吉林经济开发区', '589', '220271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3754', '吉林高新技术产业开发区', '589', '220272', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3755', '吉林中国新加坡食品区', '589', '220273', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3756', '吉林松原经济开发区', '626', '220771', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3757', '吉林白城经济开发区', '632', '220871', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3758', '大庆高新技术产业开发区', '712', '230671', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3759', '牡丹江经济技术开发区', '749', '231071', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3760', '加格达奇区', '778', '232761', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3761', '松岭区', '778', '232762', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3762', '新林区', '778', '232763', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3763', '呼中区', '778', '232764', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3764', '徐州经济技术开发区', '821', '320371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3765', '苏州工业园区', '839', '320571', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3766', '崇川区', '849', '320613', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3767', '海门区', '849', '320614', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3768', '南通经济技术开发区', '849', '320671', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3769', '连云港经济技术开发区', '858', '320771', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3770', '连云港高新技术产业开发区', '858', '320772', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3771', '淮安经济技术开发区', '865', '320871', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3772', '盐城经济技术开发区', '873', '320971', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3773', '扬州经济技术开发区', '883', '321071', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3774', '镇江新区', '890', '321171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3775', '泰州医药高新技术产业开发区', '897', '321271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3776', '宿迁经济技术开发区', '904', '321371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3777', '临平区', '911', '330113', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3778', '钱塘区', '911', '330114', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3779', '合肥高新技术产业开发区', '1013', '340171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3780', '合肥经济技术开发区', '1013', '340172', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3781', '合肥新站高新技术产业开发区', '1013', '340173', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3782', '弋江区', '1023', '340209', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3783', '湾沚区', '1023', '340210', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3784', '繁昌区', '1023', '340212', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3785', '芜湖经济技术开发区', '1023', '340271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3786', '安徽芜湖三山经济开发区', '1023', '340272', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3787', '蚌埠市高新技术开发区', '1032', '340371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3788', '蚌埠市经济开发区', '1032', '340372', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3789', '安徽安庆经济开发区', '1065', '340871', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3790', '中新苏滁高新技术产业开发区', '1084', '341171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3791', '滁州经济技术开发区', '1084', '341172', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3792', '阜阳合肥现代产业园区', '1093', '341271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3793', '阜阳经济技术开发区', '1093', '341272', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3794', '宿州马鞍山现代产业园区', '1102', '341371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3795', '宿州经济技术开发区', '1102', '341372', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3796', '宣城市经济开发区', '1126', '341871', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3797', '三元区', '1162', '350404', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3798', '沙县区', '1162', '350405', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3799', '龙海区', '1188', '350604', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3800', '长泰区', '1188', '350605', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3801', '龙南市', '1272', '360783', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3802', '济南高新技术产业开发区', '1342', '370171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3803', '青岛高新技术产业开发区', '1355', '370271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3804', '东营经济技术开发区', '1382', '370571', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3805', '东营港经济开发区', '1382', '370572', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3806', '蓬莱区', '1388', '370614', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3807', '烟台高新技术产业开发区', '1388', '370671', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3808', '烟台经济技术开发区', '1388', '370672', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3809', '潍坊滨海经济技术开发区', '1401', '370772', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3810', '济宁高新技术产业开发区', '1414', '370871', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3811', '威海火炬高技术产业开发区', '1433', '371071', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3812', '威海经济技术开发区', '1433', '371072', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3813', '威海临港经济技术开发区', '1433', '371073', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3814', '日照经济技术开发区', '1438', '371171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3815', '临沂高新技术产业开发区', '1443', '371371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3816', '德州天衢新区', '1456', '371471', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3817', '菏泽经济技术开发区', '1485', '371771', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3818', '菏泽高新技术开发区', '1485', '371772', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3819', '郑州经济技术开发区', '1496', '410171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3820', '郑州高新技术产业开发区', '1496', '410172', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3821', '郑州航空港经济综合实验区', '1496', '410173', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3822', '偃师区', '1519', '410307', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3823', '孟津区', '1519', '410308', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3824', '洛阳高新技术产业开发区', '1519', '410371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3825', '平顶山高新技术产业开发区', '1535', '410471', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3826', '平顶山市城乡一体化示范区', '1535', '410472', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3827', '安阳高新技术产业开发区', '1546', '410571', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3828', '鹤壁经济技术开发区', '1556', '410671', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3829', '新乡高新技术产业开发区', '1562', '410771', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3830', '新乡经济技术开发区', '1562', '410772', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3831', '新乡市平原城乡一体化示范区', '1562', '410773', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3832', '焦作城乡一体化示范区', '1575', '410871', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3833', '河南濮阳工业园区', '1586', '410971', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3834', '濮阳经济技术开发区', '1586', '410972', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3835', '许昌经济技术开发区', '1593', '411071', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3836', '漯河经济技术开发区', '1600', '411171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3837', '河南三门峡经济开发区', '1606', '411271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3838', '南阳高新技术产业开发区', '1613', '411371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3839', '南阳市城乡一体化示范区', '1613', '411372', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3840', '豫东综合物流产业聚集区', '1627', '411471', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3841', '河南商丘经济开发区', '1627', '411472', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3842', '信阳高新技术产业开发区', '1637', '411571', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3843', '河南周口经济开发区', '1648', '411671', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3844', '河南驻马店经济开发区', '1659', '411771', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3845', '济源市', '3706', '419001', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3846', '荆州经济技术开发区', '1744', '421071', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3847', '监利市', '1744', '421088', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3848', '龙感湖管理区', '1753', '421171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3849', '仙桃市', '3707', '429004', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3850', '潜江市', '3707', '429005', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3851', '天门市', '3707', '429006', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3852', '神农架林区', '3707', '429021', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3853', '湖南湘潭高新技术产业园区', '1809', '430371', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3854', '湘潭昭山示范区', '1809', '430372', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3855', '湘潭九华示范区', '1809', '430373', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3856', '衡阳综合保税区', '1815', '430471', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3857', '湖南衡阳高新技术产业园区', '1815', '430472', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3858', '湖南衡阳松木经济开发区', '1815', '430473', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3859', '岳阳市屈原管理区', '1841', '430671', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3860', '常德市西洞庭管理区', '1851', '430771', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3861', '益阳市大通湖管理区', '1866', '430971', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3862', '湖南益阳高新技术产业园区', '1866', '430972', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3863', '永州经济技术开发区', '1885', '431171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3864', '永州市回龙圩管理区', '1885', '431173', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3865', '祁阳市', '1885', '431181', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3866', '怀化市洪江管理区', '1897', '431271', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3867', '东城街道', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3868', '东莞滨海湾新区', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3869', '石岐街道', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3870', '民众街道', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3871', '南朗街道', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3872', '横州市', '2070', '450181', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3873', '西沙群岛', '2206', '460321', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3874', '那大镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3875', '五指山市', '3708', '469001', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3876', '琼海市', '3708', '469002', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3877', '文昌市', '3708', '469005', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3878', '万宁市', '3708', '469006', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3879', '东方市', '3708', '469007', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3880', '定安县', '3708', '469021', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3881', '屯昌县', '3708', '469022', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3882', '澄迈县', '3708', '469023', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3883', '临高县', '3708', '469024', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3884', '白沙黎族自治县', '3708', '469025', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3885', '昌江黎族自治县', '3708', '469026', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3886', '乐东黎族自治县', '3708', '469027', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3887', '陵水黎族自治县', '3708', '469028', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3888', '保亭黎族苗族自治县', '3708', '469029', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3889', '琼中黎族苗族自治县', '3708', '469030', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3890', '城口县', '3709', '500229', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3891', '丰都县', '3709', '500230', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3892', '垫江县', '3709', '500231', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3893', '忠县', '3709', '500233', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3894', '云阳县', '3709', '500235', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3895', '奉节县', '3709', '500236', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3896', '巫山县', '3709', '500237', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3897', '巫溪县', '3709', '500238', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3898', '石柱土家族自治县', '3709', '500240', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3899', '秀山土家族苗族自治县', '3709', '500241', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3900', '酉阳土家族苗族自治县', '3709', '500242', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3901', '彭水苗族土家族自治县', '3709', '500243', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3902', '新津区', '2264', '510118', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3903', '会理市', '2450', '513402', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3904', '水城区', '2480', '520204', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3905', '黔西市', '2507', '520581', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3906', '禄丰市', '2646', '532302', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3907', '格尔木藏青工业园区', '2713', '540171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3908', '拉萨经济技术开发区', '2713', '540172', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3909', '西藏文化旅游创意园区', '2713', '540173', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3910', '达孜工业园区', '2713', '540174', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3911', '凤翔区', '2814', '610305', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3912', '旬阳市', '2893', '610981', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3913', '兰州新区', '2913', '620171', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3914', '市辖区', '2922', '620201', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3915', '同仁市', '3034', '632301', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3916', '大柴旦行政委员会', '3059', '632857', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3917', '库尔勒经济技术开发区', '3130', '652871', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3918', '沙湾市', '3189', '654203', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3919', '石河子市', '3710', '659001', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3920', '阿拉尔市', '3710', '659002', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3921', '图木舒克市', '3710', '659003', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3922', '五家渠市', '3710', '659004', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3923', '北屯市', '3710', '659005', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3924', '铁门关市', '3710', '659006', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3925', '双河市', '3710', '659007', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3926', '可克达拉市', '3710', '659008', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3927', '昆玉市', '3710', '659009', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3928', '胡杨河市', '3710', '659010', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3929', '新星市', '3710', '659011', '3'); |
||||
|
|
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='104'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='105'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='106'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='111'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='112'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='604'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='850'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='851'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='856'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='913'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='914'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1025'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1027'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1028'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1029'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1163'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1164'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1170'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1184'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1194'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1199'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1281'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1393'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1397'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1524'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1526'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1534'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1748'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='1888'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3620'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3655'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3663'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3665'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3674'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2082'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3679'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3682'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2251'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2252'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2253'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2254'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2255'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2256'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2257'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2258'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2259'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2260'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2261'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2262'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2279'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2455'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2483'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2510'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2656'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2818'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='2902'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3700'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3701'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3702'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3703'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3704'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3035'); |
||||
|
DELETE FROM `yoshop_region` WHERE (`id`='3193'); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
# v2.0.7 |
||||
|
# 修改时间:2023-02-20 |
||||
|
UPDATE `yoshop_region` SET `name`='北京市' WHERE (`id`='1'); |
||||
|
UPDATE `yoshop_region` SET `name`='天津市' WHERE (`id`='19'); |
||||
|
UPDATE `yoshop_region` SET `name`='上海市' WHERE (`id`='782'); |
||||
|
UPDATE `yoshop_region` SET `name`='重庆市' WHERE (`id`='2223'); |
||||
|
UPDATE `yoshop_region` SET `name`='北京市' WHERE (`id`='1'); |
||||
|
|
||||
|
# 修改时间:2022-04-18 |
||||
|
INSERT INTO `yoshop_store_api` VALUES ('11186', '上传视频文件', '/upload/video', '11008', '112', '1614556800', '1614556800'); |
||||
|
|
||||
|
# 修改时间:2022-03-03 |
||||
|
INSERT INTO `yoshop_store_menu_api` VALUES ('10664', '10015', '11025', '1614556800'); |
||||
|
INSERT INTO `yoshop_store_menu_api` VALUES ('10665', '10015', '11022', '1614556800'); |
||||
|
INSERT INTO `yoshop_store_menu_api` VALUES ('10666', '10015', '11020', '1614556800'); |
||||
|
|
||||
|
------------------------------------- |
||||
|
|
||||
|
# v2.0.5 |
||||
|
# 修改时间:2022-01-24 |
||||
|
ALTER TABLE `yoshop_goods` |
||||
|
ADD COLUMN `video_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '主图视频ID' AFTER `goods_no`, |
||||
|
ADD COLUMN `video_cover_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '主图视频ID' AFTER `video_id`; |
||||
|
|
||||
|
# v2.0.4 |
||||
|
# 修改时间:2021-11-29 |
||||
|
ALTER TABLE `yoshop_wxapp` COMMENT='微信小程序记录表(已废弃)'; |
||||
|
|
||||
|
CREATE TABLE `yoshop_wxapp_setting` ( |
||||
|
`key` varchar(30) NOT NULL DEFAULT '' COMMENT '设置项标示', |
||||
|
`describe` varchar(255) NOT NULL DEFAULT '' COMMENT '设置项描述', |
||||
|
`values` mediumtext NOT NULL COMMENT '设置内容(json格式)', |
||||
|
`store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '商城ID', |
||||
|
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', |
||||
|
UNIQUE KEY `unique_key` (`key`,`store_id`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信小程序设置表'; |
||||
|
|
||||
|
|
||||
|
CREATE TABLE `yoshop_h5_setting` ( |
||||
|
`key` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '设置项标示', |
||||
|
`describe` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '设置项描述', |
||||
|
`values` mediumtext CHARACTER SET utf8 NOT NULL COMMENT '设置内容(json格式)', |
||||
|
`store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '商城ID', |
||||
|
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', |
||||
|
UNIQUE KEY `unique_key` (`key`,`store_id`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='H5端设置表'; |
||||
|
|
||||
|
|
||||
|
UPDATE `yoshop_store_api` SET `url`='/client.wxapp.setting/update', `sort`='105' WHERE (`api_id`='11153'); |
||||
|
UPDATE `yoshop_store_api` SET `url`='/client.wxapp.setting/detail', `sort`='100' WHERE (`api_id`='11182'); |
||||
|
|
||||
|
INSERT INTO `yoshop_store_api` VALUES ('11270', 'H5端', '-', '11151', '105', '1614556800', '1614556800'); |
||||
|
INSERT INTO `yoshop_store_api` VALUES ('11271', '获取设置项', '/client.h5.setting/detail', '11270', '100', '1614556800', '1614556800'); |
||||
|
INSERT INTO `yoshop_store_api` VALUES ('11272', '更新设置项', '/client.h5.setting/update', '11270', '105', '1614556800', '1614556800'); |
||||
|
|
||||
|
|
||||
|
-------------------------------------------- |
||||
|
|
||||
|
# v2.0.3 |
||||
|
# 修改时间:2021-10-19 |
||||
|
DROP TABLE IF EXISTS `yoshop_order_export`; |
||||
|
CREATE TABLE `yoshop_order_export` ( |
||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', |
||||
|
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间(开始)', |
||||
|
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间(结束)', |
||||
|
`file_path` varchar(255) NOT NULL DEFAULT '' COMMENT 'excel文件路径', |
||||
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '导出状态(10进行中 20已完成 30失败)', |
||||
|
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID', |
||||
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', |
||||
|
PRIMARY KEY (`id`) USING BTREE, |
||||
|
KEY `store_id` (`store_id`) |
||||
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单导出Excel记录表'; |
||||
|
|
||||
|
|
||||
|
# v2.0.3 |
||||
|
# 修改时间:2021-10-19 |
||||
|
INSERT INTO `yoshop_store_api` VALUES ('11185', '删除订单', '/order.event/delete', '11132', '135', '1614556800', '1614556800'); |
||||
|
INSERT INTO `yoshop_store_menu` VALUES ('10141', '20', '删除订单', '', 'delete', '10051', '115', '1614556800', '1614556800'); |
||||
|
INSERT INTO `yoshop_store_menu_api` VALUES ('10661', '10141', '11185', '1614556800'); |
||||
|
INSERT INTO `yoshop_store_menu_api` VALUES ('10662', '10141', '11132', '1614556800'); |
||||
|
INSERT INTO `yoshop_store_menu_api` VALUES ('10663', '10141', '11076', '1614556800'); |
||||
|
|
||||
|
|
||||
|
# v2.0.3 |
||||
|
# 修改时间:2021-10-19 |
||||
|
ALTER TABLE `yoshop_order` |
||||
|
ADD COLUMN `platform` varchar(20) NOT NULL DEFAULT '' COMMENT '来源客户端 (APP、H5、小程序等)' AFTER `order_source_id`; |
||||
|
|
||||
|
-------------------------------------------- |
||||
|
|
||||
|
|
||||
|
# v2.0.1 |
||||
|
# 修改时间:2021-3-26 |
||||
|
ALTER TABLE `yoshop_user_oauth` ADD INDEX `oauth_type_2` (`oauth_type`, `oauth_id`) USING BTREE ; |
||||
|
|
||||
|
|
||||
|
# v2.0.1 |
||||
|
# 修改时间:2021-3-26 |
||||
|
ALTER TABLE `yoshop_user_oauth` |
||||
|
ADD COLUMN `is_delete` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除' AFTER `store_id` ; |
||||
|
|
||||
|
|
||||
|
# v2.0.1 |
||||
|
# 修改时间:2021-6-2 |
||||
|
INSERT INTO `yoshop_region` VALUES ('3620', '东城街道', '2051', '44190', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3621', '南城街道', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3622', '万江街道', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3623', '莞城街道', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3624', '石碣镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3625', '石龙镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3626', '茶山镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3627', '石排镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3628', '企石镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3629', '横沥镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3630', '桥头镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3631', '谢岗镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3632', '东坑镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3633', '常平镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3634', '寮步镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3635', '樟木头镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3636', '大朗镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3637', '黄江镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3638', '清溪镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3639', '塘厦镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3640', '凤岗镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3641', '大岭山镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3642', '长安镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3643', '虎门镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3644', '厚街镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3645', '沙田镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3646', '道滘镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3647', '洪梅镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3648', '麻涌镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3649', '望牛墩镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3650', '中堂镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3651', '高埗镇', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3652', '松山湖', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3653', '东莞港', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3654', '东莞生态园', '2051', '441900', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3655', '石岐街道', '2052', '44200', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3656', '东区街道', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3657', '中山港街道', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3658', '西区街道', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3659', '南区街道', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3660', '五桂山街道', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3661', '小榄镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3662', '黄圃镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3663', '民众镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3664', '东凤镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3665', '东升镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3666', '古镇镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3667', '沙溪镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3668', '坦洲镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3669', '港口镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3670', '三角镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3671', '横栏镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3672', '南头镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3673', '阜沙镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3674', '南朗镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3675', '三乡镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3676', '板芙镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3677', '大涌镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3678', '神湾镇', '2052', '442000', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3679', '西沙群岛', '2206', '46032', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3680', '南沙群岛', '2206', '460322', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3681', '中沙群岛的岛礁及其海域', '2206', '460323', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3682', '那大镇', '2207', '46040', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3683', '和庆镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3684', '南丰镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3685', '大成镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3686', '雅星镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3687', '兰洋镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3688', '光村镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3689', '木棠镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3690', '海头镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3691', '峨蔓镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3692', '王五镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3693', '白马井镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3694', '中和镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3695', '排浦镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3696', '东成镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3697', '新州镇', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3698', '洋浦经济开发区', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3699', '华南热作学院', '2207', '460400', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3700', '雄关街道', '2922', '62020', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3701', '钢城街道', '2922', '620201', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3702', '新城镇', '2922', '620201', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3703', '峪泉镇', '2922', '620201', '3'); |
||||
|
INSERT INTO `yoshop_region` VALUES ('3704', '文殊镇', '2922', '620201', '3'); |
||||
@ -0,0 +1,143 @@ |
|||||
|
|
||||
|
### v2.0.8更新日志 ### |
||||
|
|
||||
|
优化:补充composer.json文件中扩展要求 |
||||
|
优化:定时任务模块console改名为timer |
||||
|
优化:超管环境检测文件上传最大值 |
||||
|
修复:补充地区数据省直辖县级行政区划 |
||||
|
修复:后台设置会员指定等级时报错 |
||||
|
|
||||
|
---------------------------------------------- |
||||
|
|
||||
|
### v2.0.7更新日志 ### |
||||
|
|
||||
|
新增:修改个人信息(头像昵称) |
||||
|
新增:微信小程序新增订单中心页入口 |
||||
|
优化:升级tp框架版本到v6.1.2 |
||||
|
优化:后台订单导出支持表单记忆 |
||||
|
优化:将微信用户默认昵称添加编号便于后台管理 |
||||
|
优化:调整上传视频文件大小限制为20m |
||||
|
优化:后台其他列表页在小屏幕显示超出问题 |
||||
|
优化:短信发送失败记录日志 |
||||
|
优化:隐藏订单商品信息image字段 |
||||
|
优化:订单详情页商品封面显示SKU图 |
||||
|
优化:后台文件库管理仅显示商家上传 |
||||
|
优化:后台优惠券管理最低消费金额改为1元 |
||||
|
优化:后台弹窗表单提交防重复处理 |
||||
|
修复:微信授权登录后用户头像被覆盖问题 |
||||
|
修复:后台商品管理增删规格值的报错问题 |
||||
|
修复:定时任务回退订单积分报错 |
||||
|
修复:后台非管理员账户上传视频提示无权限 |
||||
|
修复:购物车商品sku不存在时报错问题 |
||||
|
修复:用户端个人中心页余额超出错位问题 |
||||
|
|
||||
|
---------------------------------------------- |
||||
|
|
||||
|
### v2.0.6更新日志 ### |
||||
|
|
||||
|
新增:商品分类模板(分类+商品) |
||||
|
新增:后台订单列表支持根据收货人筛选 |
||||
|
优化:访问index.php入口文件提示 |
||||
|
优化:浮点数计算精度问题 |
||||
|
修复:充值套餐金额是小数时报错 |
||||
|
修复:购物车商品结算时二次计算会员价 |
||||
|
修复:优惠券设置为隐藏领券中心会显示 |
||||
|
修复:后台新增商家地址提示没权限 |
||||
|
修复:批量移动文件分组时报错 |
||||
|
修复:后台添加已删除管理员登录提示被删除 |
||||
|
修复:后台删除七牛云文件时报错 |
||||
|
修复:后台上传视频时提示没有api权限 |
||||
|
|
||||
|
---------------------------------------------- |
||||
|
|
||||
|
### v2.0.5 更新日志 ### |
||||
|
|
||||
|
新增:商户后台支持上传视频文件 |
||||
|
新增:后台富文本编辑器支持添加视频 |
||||
|
新增:后台富文本编辑器支持添加链接 |
||||
|
新增:用户端商品详情页支持主图视频 |
||||
|
优化:用户端个人中心显示售后单数量角标 |
||||
|
优化:订单导出后订单号科学计数问题 |
||||
|
优化:订单导出显示商品的规格信息 |
||||
|
优化:订单结算使用优惠券时仅折扣适用商品 |
||||
|
优化:订单结算页显示账户可用余额 |
||||
|
优化:购物车列表显示会员折扣价 |
||||
|
优化:后台验证多规格商品规格值重复 |
||||
|
优化:后台售后单显示退货物流信息 |
||||
|
修复:查询物流信息时报错 |
||||
|
修复:用户被删除后前台退出登录态 |
||||
|
修复:后台优惠券管理折扣率不正确 |
||||
|
|
||||
|
---------------------------------------------- |
||||
|
|
||||
|
### v2.0.4 更新日志 ### |
||||
|
|
||||
|
新增:新版授权登录模块(可关闭小程序端手机号验证) |
||||
|
新增:后台支持订单导出功能 |
||||
|
新增:短信云平台(支持阿里云腾讯云七牛云) |
||||
|
新增:服务端支持配置使用Redis缓存 |
||||
|
新增:定时任务支持启用守护进程 |
||||
|
优化:后台可设置是否允许H5端访问 |
||||
|
优化:更新Thinkphp6框架版本 |
||||
|
优化:短信验证码由4位改为6位 |
||||
|
优化:安装脚本支持填写数据库端口号 |
||||
|
优化:区别未使用和可用的优惠券 |
||||
|
修复:RoleMenu模型deleteAll方法报错 |
||||
|
修复:定时任务未处理过期的优惠券 |
||||
|
修复:保存多规格时min方法报错 |
||||
|
修复:根据key获取规格组和规格值错误 |
||||
|
|
||||
|
---------------------------------------------- |
||||
|
|
||||
|
### v2.03 更新日志 ### |
||||
|
|
||||
|
新增:服务端默认允许跨域请求 |
||||
|
新增:订单管理支持删除订单记录 |
||||
|
新增:新增订单时记录来源客户端 |
||||
|
新增:后台可设置余额充值最低金额 |
||||
|
修复:优惠券有效期1天时无法使用 |
||||
|
修复:后台编辑商品评价时清空图片 |
||||
|
优化:完善begin和error的日志内容 |
||||
|
优化:补充composer.json扩展依赖 |
||||
|
修复:文件上传时uploadFile报错 |
||||
|
修复:后台会员列表中会员等级筛选无效 |
||||
|
|
||||
|
---------------------------------------------- |
||||
|
|
||||
|
### v2.02 更新日志 ### |
||||
|
|
||||
|
新增:已完成订单自动结算 |
||||
|
优化:商品列表api隐藏冗余的字段 |
||||
|
优化:多图并发上传文件名重复问题 |
||||
|
优化:服务端文件上传的异常处理 |
||||
|
修复:后台页面设计html转义报错 |
||||
|
修复:定时任务报错(会员等级) |
||||
|
修复:php7强类型传参的一些报错 |
||||
|
修复:订单商品未写入商品名称 |
||||
|
修复:订单商品表未写入正确的内容 |
||||
|
修复:退换/售后页的tab状态筛选 |
||||
|
修复:获取可用的优惠券未处理有效期条件 |
||||
|
修复:优惠券折扣率范围 |
||||
|
修复:取消订单时未回退商品总库存 |
||||
|
修复:后台编辑文章时不显示封面图 |
||||
|
修复:领取固定时间的优惠券日期不正确 |
||||
|
修复:购物车商品不存在时报错 |
||||
|
|
||||
|
---------------------------------------------- |
||||
|
|
||||
|
### v2.01 更新日志 ### |
||||
|
|
||||
|
优化:微信快捷登录失败时显示错误信息 |
||||
|
优化:补充部分城市缺失的3级区划 |
||||
|
优化:微信api请求失败时输出错误内容 |
||||
|
优化:api地址改为兼容模式 |
||||
|
优化:删除用户同时删除第三方用户信息 |
||||
|
优化:get_guid_v4方法兼容性 |
||||
|
修复:满额包邮商品下单报错 |
||||
|
修复:当前用户待发货订单数量不正确 |
||||
|
修复:上传图片时候未传参指定分组 |
||||
|
修复:保存微信小程序支付证书文件错误 |
||||
|
修复:后台商品管理未填写划线价报错 |
||||
|
修复:登录时判断oauth_id是否已绑定 |
||||
|
修复:删除商品分类时无效的商品引用 |
||||
|
|
||||
Loading…
Reference in new issue