Skip to content

Commit b7324f6

Browse files
committed
更新使用说明文档等
1 parent 8c2c606 commit b7324f6

File tree

7 files changed

+33
-52
lines changed

7 files changed

+33
-52
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/.idea
22
/.vscode
3+
/vendor
34
*.log
4-
/vendor
5+
.env
6+
composer.lock

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ VueCMF开发框架主要有以下功能:
2626
创建新项目
2727

2828
~~~
29-
composer create-project emei8/vuecmf myproject
29+
composer create-project vuecmf/vuecmf myproject
3030
~~~
3131

3232
若在已有基于thinkphp6的项目中安装, 则需执行下面
3333
~~~
34-
composer require emei8/framework
34+
composer require vuecmf/framework
3535
3636
php think vuecmf:publish
3737
~~~
@@ -48,7 +48,7 @@ php think migrate:run
4848

4949
## 更新框架
5050
~~~
51-
composer update emei8/framework
51+
composer update vuecmf/framework
5252
~~~
5353

5454

app/vuecmf/common.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// +----------------------------------------------------------------------
33
// | Copyright (c) 2019~2022 http://www.vuecmf.com All rights reserved.
44
// +----------------------------------------------------------------------
5-
// | Licensed ( https://github.com/emei8/vuecmf/blob/master/LICENSE )
5+
// | Licensed ( https://github.com/vuecmf/framework/blob/main/LICENSE )
66
// +----------------------------------------------------------------------
7-
// | Author: emei8 <2278667823@qq.com>
7+
// | Author: vuecmf <tulihua2004@126.com>
88
// +----------------------------------------------------------------------
99

1010
/**
@@ -25,15 +25,20 @@ function ajaxSuccess(string $msg = '', $data = [], int $code = 0): \think\respon
2525

2626
/**
2727
* ajax请求失败返回的数据结构
28-
* @param object $exception 异常对象
28+
* @param object|string $exception 异常对象|异常信息
2929
* @param int $code 状态码
3030
* @param array $data 返回的数据
3131
* @return \think\response\Json
3232
*/
3333
function ajaxFail($exception, int $code = 1000, array $data = []): \think\response\Json
3434
{
3535
$msg = '异常:';
36-
$msg .= config('app.show_error_msg') == true ? $exception->getMessage() . ' 在文件' . $exception->getFile() . '中第' . $exception->getLine() . '': $exception->getMessage();
36+
37+
if(is_object($exception)){
38+
$msg .= config('app.show_error_msg') == true ? $exception->getMessage() . ' 在文件' . $exception->getFile() . '中第' . $exception->getLine() . '': $exception->getMessage();
39+
}else if(is_string($exception)){
40+
$msg .= $exception;
41+
}
3742

3843
return json([
3944
'data' => $data,

app/vuecmf/controller/Index.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
<?php
2-
// +----------------------------------------------------------------------
3-
// | Copyright (c) 2019~2022 http://www.vuecmf.com All rights reserved.
4-
// +----------------------------------------------------------------------
5-
// | Licensed ( https://github.com/emei8/vuecmf/blob/master/LICENSE )
6-
// +----------------------------------------------------------------------
7-
// | Author: emei8 <2278667823@qq.com>
8-
// +----------------------------------------------------------------------
92
declare (strict_types = 1);
103

114
namespace app\vuecmf\controller;
@@ -15,7 +8,7 @@ class Index
158
{
169
public function index(): string
1710
{
18-
return 'Welcome to VueCMF!';
11+
return '<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:) </h1><p>Welcome to VueCMF V2.<br/></p><span style="font-size:25px;">[ Powered by <a href="http://www.vuecmf.com/" target="_blank">vuecmf</a> ]</span><script src="https://hm.baidu.com/hm.js?74079f71bcec1421dd89f7c08ed21d68"></script></div>';
1912
}
20-
2113
}
14+

composer.json

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,14 @@
11
{
2-
"name": "emei8/vuecmf",
3-
"description": "VueCMF是一款完全开源免费的内容管理快速开发框架。采用前后端分离模式搭建,2.0+版本前端使用vue3、Element Plus和TypeScript构建,后端API基于ThinkPHP6开发。可用于快速开发CMS、CRM、WMS、OMS、ERP等管理系统,开发简单、高效易用,极大减少系统的开发周期和研发成本!甚至不用写一行代码使用VueCMF就能设计出功能强大的后台管理系统。",
2+
"name": "vuecmf/vuecmf",
3+
"description": "VueCMF是一款完全开源免费的内容管理快速开发框架。采用前后端分离模式搭建,2.0+版本前端使用vue3、Element Plus和TypeScript构建,后端API基于ThinkPHP6开发。可用于快速开发CMS、CRM、WMS、OMS、ERP等管理系统,开发简单、高效易用,极大减少系统的开发周期和研发成本!甚至不用写一行代码使用VueCMF就能设计出功能强大的后台管理系统。",
44
"keywords": [
55
"framework",
66
"thinkphp",
77
"vuecmf"
88
],
9-
"type": "project",
9+
"type": "project",
1010
"homepage": "http://www.vuecmf.com/",
1111
"license": "Apache-2.0",
12-
"autoload": {
13-
"psr-4": {
14-
"app\\vuecmf\\": "src/",
15-
"app\\": "app"
16-
},
17-
"psr-0": {
18-
"": "extend/"
19-
}
20-
},
21-
"authors": [
22-
{
23-
"name": "emei8",
24-
"email": "2278667823@qq.com"
25-
}
26-
],
2712
"require": {
2813
"php": ">=7.2.5",
2914
"topthink/framework": "^6.0.0",
@@ -32,26 +17,28 @@
3217
"casbin/casbin": "^3.16",
3318
"topthink/think-multi-app": "^1.0",
3419
"casbin/think-authz": "^1.5",
35-
"emei8/framework": "^2.0"
20+
"vuecmf/framework": "^2.0"
3621
},
3722
"require-dev": {
3823
"symfony/var-dumper": "^4.2",
3924
"topthink/think-trace":"^1.0"
4025
},
41-
"config": {
26+
"autoload": {
27+
"psr-4": {
28+
"app\\vuecmf\\": "src/",
29+
"app\\": "app"
30+
},
31+
"psr-0": {
32+
"": "extend/"
33+
}
34+
},
35+
"config": {
4236
"preferred-install": "dist"
4337
},
44-
"scripts": {
38+
"scripts": {
4539
"post-autoload-dump": [
4640
"@php think service:discover",
4741
"@php think vendor:publish"
4842
]
49-
},
50-
"extra": {
51-
"think": {
52-
"services": [
53-
"app\\vuecmf\\VuecmfService"
54-
]
55-
}
5643
}
5744
}

public/.htaccess

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
<IfModule mod_rewrite.c>
22
Options +FollowSymlinks -Multiviews
33
RewriteEngine On
4-
5-
# RewriteRule ^(admin|static|storage) - [L]
6-
7-
RewriteCond $1 !^(admin|static|storage)
84

95
RewriteCond %{REQUEST_FILENAME} !-d
106
RewriteCond %{REQUEST_FILENAME} !-f
11-
12-
#RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
13-
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
7+
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
148
</IfModule>

public/nginx.htaccess

Whitespace-only changes.

0 commit comments

Comments
 (0)