This issue recommends a wechat background management platform based on ThinkPHP – ThinkAdmin.
ThinkAdmin is a background management framework based on the latest ThinkPHP V6 development, using the most relaxed MIT protocol open source. The backend of the project relies on a self-made component ThinkLibrary v6, which encapsulates a large number of common operations, which can quickly develop conventional CURD applications without affecting the original ThinkPHP ecosystem; The background management UI is based on the latest version of the LayUI front-end framework, which loads all LayUI components by default and can be used directly in the framework.
Default integration components:
File storage engine: Support Qiniu cloud storage, local server storage, Ali Cloud OSS storage, Tencent Cloud COS storage;
Wechat development components: Support wechat service number, wechat enterprise number, wechat mini program, wechat open platform, Wechat merchant payment, Alipay payment;
Other basic components: Support interface services, form tokens, asynchronous tasks (and multi-process task response time is less than 0.5 seconds, compatible with windows and linux);
Install and run:
Most projects now have third-party plug-ins for managing their projects with Composer, and it is recommended that everyone use the Composer tool.
1. Set Aliyun Composer agent
Because domestic access Composer is slow, it is recommended to set the Ariyun Composer image. Run the following command to set ali cloud agent > # composer config – g repo. Packagist composer https://mirrors.aliyun.com/composer
2. Download the app code
># git clone https://github.com/zoujingli/ThinkAdmin
3. Install dependent components
Go to the ThinkAdmin directory and run the command to install the dependencies
># cd ThinkAdmin
># composer install
4. Import the database configuration application
Import the MySql database file and configure config/database.php
5. Debug and run PHP built-in services
># php think run // debug (CMD interface is displayed)
># php think xadmin:queue webstart // daemon (without CMD interface)
6, local development debugging access
Go to http://127.0.0.1:8000 in your browser
7. Online production environment deployment
For details, see ThinkPHP official documentation. You are advised to use the Pagoda panel to manage the Linux/Windows server O&M management panel.
8. Deploy the pseudo-static reference configuration
Pagoda integration environment, directly select mvc rules
Apache Server Configuration
The mod_rewrite-so module is loaded in the httpd.conf configuration file
AllowOverride None changes None to All
Save the following as a.htaccess file in the same directory as the application entry file
<IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]</IfModule>
- Nginx server configuration
if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last;}
- IIS Server Management
If your server environment supports ISAPI_Rewrite, you can configure the httpd.ini file to add the following: RewriteRule (.*)$/index\.php\? s=$1 [I]
You can configure web.Config under a higher version of IIS to add the rewrite node in the middle:
<rewrite> <rules> <rule name="OrgPage" stopProcessing="true"> <match url="^(.*)$"/> <conditions logicalGrouping="MatchAll"> <add input="{HTTP_HOST}" pattern="^(.*)$"/> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php/{R:1}"/> </rule> </rules></rewrite>
directory structure:
.├─ app Application base directory│ ├─ admin Background application directory│ │ ├─ controller 应用控制器│ │ ├─ route 应用路由配置│ │ ├─ view 应用视图目录│ │ └─ sys.php 模块注册文件│ ├─ index 默认应用入口│ │ └─ controller 控制器目录│ └─ wechat 微信应用目录│ ├─ command 应用指令目录│ ├─ controller 控制器目录│ ├─ service 应用服务目录│ ├─ view 应用视图目录│ └─ sys.php 模块注册文件├─ config 全局配置目录│ ├─ app.php 应用配置│ ├─ cache.php 缓存配置 │ ├─ cookie.php Cookie 配置│ ├─ database.php 数据库配置│ ├─ filesystem.php 文件磁盘配置│ ├─ lang.php 系统多语言配置│ ├─ log.php 全局日志配置│ ├─ route.php URL和路由配置│ ├─ session.php Session 配置 │ └─ view.php 视图配置 ├─ public 网站开放目录│ ├─ static 静态资源目录│ │ ├─ plugs 后台应用插件│ │ └─ theme 后台应用主题│ ├─ upload 上传存储目录│ ├─ index.php 网站访问入口│ ├─ router.php 网站测试入口│ └─ think 指令访问入口├─ runtime 应用的运行时目录,需要可写权限│ ├─ admin 系统应用运行目录│ ├─ cache 系统默认缓存目录│ ├─ log 系统指令运行日志│ ├─ session Session 会话缓存│ └─ wechat 微信应用运行目录├─ safefile 安全文件上传目录└─ vendor Composer 安装的第三方类库目录
Note:
The background UI loads third-party plug-ins based on the latest version of LayUI and RequireJs (LayUI and RequireJs are recommended).
Self-made storage engine: support seven cows cloud storage, local server storage, Ali cloud OSS storage, etc. It is recommended to use seven cows cloud storage, which is relatively affordable and has good support;
Asynchronous task components: built-in asynchronous system tasks, can achieve long-term data processing and cyclic task processing, such as: data export, data synchronization, cyclic processing, big data processing, etc.
Wechat development components: Support wechat service number, wechat mini program, wechat open platform, Wechat merchant payment, Alipay payment, etc. For specific use, refer to the document of WeChatDeveloper;
Module registration file: the sys.php below each module is the system registration file, which will affect the entire project, and can define the public interface functions in the module, and register the instructions in the module.
Remove TP official multi-application components: ThinkAdmin has built-in multi-application components, you do not need to install ThinkPHP official multi-application components (to avoid plug-in service conflicts, you need to uninstall the official multi-application plug-ins).
Interface preview:
Log in
- home page
- console
- Wechat management
- system management
You can read more on your own.
If you need project recommendations and resources, please send private letters to the author