Skip to content

Commit c1aebc3

Browse files
committed
代码优化--增加minix和render等前端功能
1 parent 33be248 commit c1aebc3

File tree

24 files changed

+1321
-403
lines changed

24 files changed

+1321
-403
lines changed

back.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
`composer install`
33

44
## 2、复制配置文件,进行数据库配置
5-
`cp .env.example .env`
5+
`cp .env.example .env`
6+
> 根据需求,配置.env文件中的DB_DATABASE、DB_USERNAME和DB_PASSWORD
7+
`php artisan key:generate`
8+
69

710
## 3、生成项目所需的数据表
811
`php artisan migrate`

backend/app/Http/Controllers/Auth/LoginController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ public function refresh(Request $request)
9292
$data = [
9393
'grant_type' => 'refresh_token',
9494
'refresh_token' => $refreshToken,
95-
'client_id' => env('Password_ID'),
96-
'client_secret' => env('Password_Secret'),
95+
'client_id' => env('PASSPORT_CLIENT_ID'),
96+
'client_secret' => env('PASSPORT_CLIENT_SECRET'),
9797
'scope' => '',
9898
];
9999
return $this->token($data);
@@ -103,8 +103,8 @@ public function refresh(Request $request)
103103
protected function proxy($username, $password){
104104
$data = [
105105
'grant_type' => 'password',
106-
'client_id' => env('Password_ID'),
107-
'client_secret' => env('Password_Secret'),
106+
'client_id' => env('PASSPORT_CLIENT_ID'),
107+
'client_secret' => env('PASSPORT_CLIENT_SECRET'),
108108
'username' => $username,
109109
'password' => $password,
110110
'scope' => '',

backend/app/Http/Controllers/Controller.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
use Illuminate\Support\Facades\Route;
1212
use Rap2hpoutre\FastExcel\FastExcel;
1313
use Illuminate\Support\Facades\Validator;
14+
/**
15+
* @SWG\Swagger(
16+
* basePath="/calculate-rates",
17+
* @SWG\Info(
18+
* title="项目名称 API",
19+
* version="1.0.0"
20+
* )
21+
* )
22+
*/
1423

1524
class Controller extends BaseController
1625
{

0 commit comments

Comments
 (0)