diff --git a/README.en.md b/README.en.md index 21099bf..d7223c4 100644 --- a/README.en.md +++ b/README.en.md @@ -1,36 +1,221 @@ -# EasyAdmin +## Project Introduction -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} +For a better development experience. -#### Software Architecture -Software architecture description +Only for `developers' services, only for `demand customization' services. -#### Installation +A rapidly developed backend management system based on ThinkPHP6.1 and layui2.8. -1. xxxx -2. xxxx -3. xxxx +Technical exchange QQ group: [207160418](https://jq.qq.com/?_wv=1027&k=TULvsosz) -#### Instructions +## Installation tutorial -1. xxxx -2. xxxx -3. xxxx +>ulthon_admin uses Composer to manage project dependencies. Therefore, before using ulthon_admin, make sure your machine has Composer installed. -#### Contribution +> It is recommended to set the composer's image to the Alibaba image source -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request +### Download the installation package through git, and install dependency packages through composer + +```bash +The first step is to download the installation package +git clone https://gitee.com/ulthon/ulthon_admin + +Or use composer to create +composer create-project ulthon/ulthon_admin -#### Gitee Feature +The second step is to install dependent packages (can be ignored when created using composer) +composer install -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +The third step, configure `.env` +Copy `.example.env` to `.env` +Modify `env` file + +[DATABASE] +TYPE=mysql +HOSTNAME=host.docker.internal +DATABASE=ulthon +USERNAME=root +PASSWORD=root +HOSTPORT=3306 +CHARSET=utf8 +DEBUG=true +PREFIX=ul_ + + +Step 4, install the database +php think migrate:run + +Step 5: Initialize database data +php think seed:run + +Finally, run locally temporarily +php think run + +``` + +> This installation method is very friendly to the development experience + +### ~~Download the complete package~~ + +The complete package download method is being updated. + + +### Online installation (initialization) database + +The framework does not have the function of online installation, and it will not be provided built-in in the future. + +However, ulthon_admin uses the database migration tool to install the database. It does not have to be used in the command line environment. It can also be used in ordinary controllers. We provide a simple code script to demonstrate how to install it online. + +[How to install the database online](https://doc.ulthon.com/read/augushong/ulthon_admin/online_install.html) + +## Why choose ulthon_admin + +- No `plug-in ecology` and `application market`, no historical baggage and development baggage +- **Keep up to date with the latest technology stack and development ideas** +- **Continuously improve the development experience** +- You want to make a product or customized project that can be developed and maintained in the long term +- You need a project that can reach a certain level of functional construction with simple code development +- You want a **complete** tutorial document + - ulthon_admin documentation will be continuously improved + - The document agrees on detailed directory specifications, code specifications, code specification management tool configuration files, etc. + - Documentation showing detailed best practices and feature use cases + - Documentation includes frequently asked questions and low-level introduction +- Standard dependency management supports streamlining and customization based on actual conditions + +## Site address + +* Official website: [http://admin.demo.ulthon.com](http://admin.demo.ulthon.com) + +* Document address: [http://doc.ulthon.com/home/read/ulthon_admin/home.html](http://doc.ulthon.com/home/read/ulthon_admin/home.html) + +* Demo address: [http://admin.demo.ulthon.com/admin](http://admin.demo.ulthon.com/admin) (Account: admin, password: 123456. Note: Only permission to view information ) + +## Code repository + +* Gitee address: [https://gitee.com/ulthon/ulthon_admin](https://gitee.com/ulthon/ulthon_admin) + + +## Project Features +* Compatible with PHP8.1 + * Minimum version PHP7.4 +* Support mobile form to card conversion +* Support multiple skins + * standard + * quasi-object + * Prototype + * Sci-fi + *GTK + * pixels + *WIN7 +* Fast CURD command line + * Generate controller, model, view and JS files with one click + * Support related queries, field settings, etc. + * Supports generating **database migration code** + * Supports generating **property declarations for model fields** +* Permission management system based on `auth` + * Implement `auth` authority node management through `annotation` + * One-click update of `auth` permission nodes, no need to manually enter management + * Complete back-end permission verification and front page button display and hide control +* Perfect menu management + * Management by modules + * Infinitus menu + * Menu editing will prompt `Permission Node` +* Complete upload component function + * Local storage + *Alibaba Cloud OSS`recommended` + * Tencent Cloud COS + * Qiniuyun OSS +* Complete front-end component functions + * Re-encapsulate layui's form form, eliminating the need to manually splice data requests + * Simple and easy-to-use `picture and file` upload component + * Simple and easy-to-use rich text editor `ckeditor` + * Re-encapsulate the pop-up layer and use it in a minimalist way + * Re-encapsulate the table to make it more comfortable to use + * Encapsulate again according to the `cols` parameter of the table, provide interfaces to implement functions such as `image`, `switch`, `list`, etc., and then basically expand it yourself + * Generate `search form` according to table parameters with one click, no need to write it yourself +* Use database for logging by default +* Deploy static resources to OSS with one click + * All files in the `public\static` directory can be deployed with one click + * One configuration item switches static resources (oss/local) +* Upload file record management +* Customize the background path to prevent others from finding the corresponding background address +* Highly customizable + * Can streamline code functions + * Support customized deletion of unnecessary dependencies + + +## new version update + +Keep in sync with the versions of thinkPHP and layui. + +In the future, whenever a new feature is implemented, a tag will be released. + +> The main meaning of tag is to facilitate querying documents and comparing differences. (ulthon_admin itself is for customization and will not be forced to update) + +## Open Source Agreement + +Mulan Open Source Agreement + +## What is + +`tp6 background`, `thinkphp6 background`, `layui background`, `curd background` + +## Skin Preview + +> Supports a variety of special effect skins, please go to [Demo Site](http://admin.demo.ulthon.com) for more information + +### standard +Well-behaved, concise and generous, steady yet lively. +![](/public/static/index/images/preview/normal.png) +### Skeuomorphism +Elegance is coming! Become an elegant programmer from now on. +![](/public/static/index/images/preview/neomorphic.png) +### Science Fiction +Suitable for night use and unconventional backend use such as Internet of Things systems, monitoring systems, and large-screen systems. +![](/public/static/index/images/preview/sifi.png) +### gnome +Feel the fear from gnome? A "Linux-compatible" backend framework. +![](/public/static/index/images/preview/gtk.png) + +## Development dependencies + +### Basic environment + +Only the most basic PHP development environment is required. + +- PHP8.0 (PATH environment variable is set correctly) +- composer +- Mysql5.7+ (necessary for development) + +In the development environment, it is not necessary to install nginx, apache, ftp and other software, and you can develop directly through the built-in server. + +> In fact, if you use SQLite to develop, you don't even want to install MySQL, but SQLite cannot adjust data tables and columns very well, so you generally use conventional databases such as MySQL. + +### SASS + +Some underlying components in the framework use SASS features, but generally you don’t need to worry about it. If you use vscode, you can refer to the following: + +``` +Name: Live Sass Compiler +ID: glenn2223.live-sass +Description: Compile Sass or Scss to CSS at realtime. +Version: 5.5.1 +Posted by: Glenn Marks +VS Marketplace link: https://marketplace.visualstudio.com/items?itemName=glenn2223.live-sass +``` + +### Configuration + +Configuration of liveSassCompiler in vscode: + +```json +{ + "liveSassCompile.settings.includeItems": [ + "/public/static/common/css/theme/*.scss", + "/public/static/plugs/lay-module/tableData/tableData.scss", + "/public/static/plugs/lay-module/tagInput/tagInput.scss", + "/public/static/plugs/lay-module/propertyInput/propertyInput.scss" + ] +} +``` \ No newline at end of file diff --git a/README.md b/README.md index d371614..7fb1ca0 100644 --- a/README.md +++ b/README.md @@ -178,4 +178,46 @@ php think run ![](/public/static/index/images/preview/sifi.png) ### gnome 感受到来自gnome的恐惧了吗?一个“兼容Linux”的后台框架。 -![](/public/static/index/images/preview/gtk.png) \ No newline at end of file +![](/public/static/index/images/preview/gtk.png) + +## 开发依赖 + +### 基本环境 + +只需要最基础的PHP开发环境即可。 + +- PHP8.0(正确设置PATH环境变量) +- composer +- Mysql5.7+(开发必备) + +开发环境中,并不必须安装nginx、apache、ftp等软件,可以直接通过内置服务器进行开发。 + +> 实际上,如果你使用sqlite开发,连mysql都不想要安装,但是sqlite并不能很好地调整数据表和列,所以一般使用mysql等常规数据库。 + +### SASS + +框架中部分底层组件使用了SASS特性,但一般不需要关心,如果使用vscode,可参考以下内容: + +``` +名称: Live Sass Compiler +ID: glenn2223.live-sass +说明: Compile Sass or Scss to CSS at realtime. +版本: 5.5.1 +发布者: Glenn Marks +VS Marketplace 链接: https://marketplace.visualstudio.com/items?itemName=glenn2223.live-sass +``` + +### 配置 + +vscode中liveSassCompiler的配置: + +```json +{ + "liveSassCompile.settings.includeItems": [ + "/public/static/common/css/theme/*.scss", + "/public/static/plugs/lay-module/tableData/tableData.scss", + "/public/static/plugs/lay-module/tagInput/tagInput.scss", + "/public/static/plugs/lay-module/propertyInput/propertyInput.scss" + ] +} +``` diff --git a/app/admin/view/mall/goods/edit.html b/app/admin/view/mall/goods/edit.html index 93fc2f5..68d19cb 100644 --- a/app/admin/view/mall/goods/edit.html +++ b/app/admin/view/mall/goods/edit.html @@ -69,7 +69,7 @@
-
{$row.property|raw|ua_htmlspecialchars_decode|default=''}
+
{$row.property|raw|default=''}
diff --git a/app/admin/view/mall/goods/read.html b/app/admin/view/mall/goods/read.html index d627b86..8f52be2 100644 --- a/app/admin/view/mall/goods/read.html +++ b/app/admin/view/mall/goods/read.html @@ -101,7 +101,7 @@
- {$row.describe|raw|ua_htmlspecialchars_decode} + {$row.describe|raw}
diff --git a/app/common.php b/app/common.php index ca8359a..563ad31 100644 --- a/app/common.php +++ b/app/common.php @@ -219,39 +219,6 @@ if (!function_exists('unparse_url')) { } } -if (!function_exists('ua_htmlspecialchars')) { - function ua_htmlspecialchars($string) - { - if (is_null($string)) { - $string = ''; - } - - return htmlspecialchars($string); - } -} - -if (!function_exists('ua_htmlentities')) { - function ua_htmlentities($string) - { - if (is_null($string)) { - $string = ''; - } - - return htmlentities($string); - } -} - -if (!function_exists('ua_htmlspecialchars_decode')) { - function ua_htmlspecialchars_decode($string, $flag = ENT_QUOTES | ENT_SUBSTITUTE) - { - if (is_null($string)) { - $string = ''; - } - - return htmlspecialchars_decode($string, $flag); - } -} - function build_upload_url($url, $upload_type = null) { if (is_null($upload_type)) { diff --git a/app/common/controller/AdminController.php b/app/common/controller/AdminController.php index 9e21596..0eccaaa 100644 --- a/app/common/controller/AdminController.php +++ b/app/common/controller/AdminController.php @@ -246,7 +246,8 @@ class AdminController extends BaseController */ protected function buildTableParames($excludeFields = []) { - $get = $this->request->get('', null, []); + $get = $this->request->get('', null); + $page = isset($get['page']) && !empty($get['page']) ? $get['page'] : 1; $limit = isset($get['limit']) && !empty($get['limit']) ? $get['limit'] : 15; $group = isset($get['group']) && !empty($get['group']) ? $get['group'] : null; diff --git a/app/common/provider/Request.php b/app/common/provider/Request.php index 7b30633..69918b7 100644 --- a/app/common/provider/Request.php +++ b/app/common/provider/Request.php @@ -5,5 +5,5 @@ namespace app\common\provider; // 应用请求对象类 class Request extends \think\Request { - protected $filter = ['ua_htmlspecialchars']; + protected $filter = []; } diff --git a/composer.lock b/composer.lock index 688f2ac..c06ff71 100644 --- a/composer.lock +++ b/composer.lock @@ -1743,16 +1743,16 @@ }, { "name": "qiniu/php-sdk", - "version": "v7.10.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/qiniu/php-sdk.git", - "reference": "dfa6893417c126735d9fbeffdb54fe14671dc4d3" + "reference": "9ee81f0acd57fa7bb435ffe9e515d7a9fdd0489b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/qiniu/php-sdk/zipball/dfa6893417c126735d9fbeffdb54fe14671dc4d3", - "reference": "dfa6893417c126735d9fbeffdb54fe14671dc4d3", + "url": "https://api.github.com/repos/qiniu/php-sdk/zipball/9ee81f0acd57fa7bb435ffe9e515d7a9fdd0489b", + "reference": "9ee81f0acd57fa7bb435ffe9e515d7a9fdd0489b", "shasum": "" }, "require": { @@ -1795,9 +1795,9 @@ ], "support": { "issues": "https://github.com/qiniu/php-sdk/issues", - "source": "https://github.com/qiniu/php-sdk/tree/v7.10.1" + "source": "https://github.com/qiniu/php-sdk/tree/v7.11.0" }, - "time": "2023-08-04T13:33:41+00:00" + "time": "2023-09-05T12:33:39+00:00" }, { "name": "ralouphie/getallheaders", @@ -2122,24 +2122,27 @@ }, { "name": "topthink/think-migration", - "version": "v3.0.6", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/top-think/think-migration.git", - "reference": "82c4226cb14f973b9377c7fc6e89c525cbb8b030" + "reference": "22c44058e1454f3af1d346e7f6524fbe654de7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-migration/zipball/82c4226cb14f973b9377c7fc6e89c525cbb8b030", - "reference": "82c4226cb14f973b9377c7fc6e89c525cbb8b030", + "url": "https://api.github.com/repos/top-think/think-migration/zipball/22c44058e1454f3af1d346e7f6524fbe654de7fb", + "reference": "22c44058e1454f3af1d346e7f6524fbe654de7fb", "shasum": "" }, "require": { + "php": ">=7.2", "topthink/framework": "^6.0 || ^8.0", "topthink/think-helper": "^3.0.3" }, "require-dev": { - "fzaninotto/faker": "^1.8" + "composer/composer": "^2.5.8", + "fzaninotto/faker": "^1.8", + "robmorgan/phinx": "^0.13.4" }, "suggest": { "fzaninotto/faker": "Required to use the factory builder (^1.8)." @@ -2154,7 +2157,7 @@ }, "autoload": { "psr-4": { - "Phinx\\": "phinx/src/Phinx", + "Phinx\\": "phinx", "think\\migration\\": "src" } }, @@ -2170,9 +2173,9 @@ ], "support": { "issues": "https://github.com/top-think/think-migration/issues", - "source": "https://github.com/top-think/think-migration/tree/v3.0.6" + "source": "https://github.com/top-think/think-migration/tree/v3.1.1" }, - "time": "2023-07-01T11:01:52+00:00" + "time": "2023-09-14T05:51:31+00:00" }, { "name": "topthink/think-multi-app", diff --git a/config/view.php b/config/view.php index 7b0099b..e460907 100644 --- a/config/view.php +++ b/config/view.php @@ -32,5 +32,5 @@ return [ '__STATIC__' => Env::get('adminsystem.static_path', '/static'), '__JS__' => '/static/javascript', ], - 'default_filter' => 'ua_htmlentities', // 默认过滤方法 用于普通标签输出 + 'default_filter' => '', // 默认过滤方法 用于普通标签输出 ]; diff --git a/scssindex.md b/scssindex.md deleted file mode 100644 index c570365..0000000 --- a/scssindex.md +++ /dev/null @@ -1,41 +0,0 @@ -需要编译的scss文件: -``` -public/static/common/css/theme/*.scss -public/static/plugs/lay-module/tableData/tableData.scss -public/static/plugs/lay-module/tagInput/tagInput.scss -public/static/plugs/lay-module/propertyInput/propertyInput.scss -``` - - -## VSCODE - -### 扩展 -如果在vscode中,安装下面的扩展 - -``` -名称: Live Sass Compiler -ID: glenn2223.live-sass -说明: Compile Sass or Scss to CSS at realtime. -版本: 5.5.1 -发布者: Glenn Marks -VS Marketplace 链接: https://marketplace.visualstudio.com/items?itemName=glenn2223.live-sass -``` - -### 配置 - -vscode中liveSassCompiler的配置: - -```json -{ - "liveSassCompile.settings.includeItems": [ - "/public/static/common/css/theme/*.scss", - "/public/static/plugs/lay-module/tableData/tableData.scss", - "/public/static/plugs/lay-module/tagInput/tagInput.scss", - "/public/static/plugs/lay-module/propertyInput/propertyInput.scss" - ] -} -``` - -## 扩展命令 - -ulthon_admin将提供一个命令,实时编译文件,目前开发中。 \ No newline at end of file diff --git a/view/index/welcome.html b/view/index/welcome.html index ac2d595..68abe6a 100644 --- a/view/index/welcome.html +++ b/view/index/welcome.html @@ -166,7 +166,7 @@ }) }) - {:ua_htmlspecialchars_decode(sysconfig('site','site_js_insert'))} + {:sysconfig('site','site_js_insert')} \ No newline at end of file