Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9869bde

Browse files
committed
显示调整:后端修正调用oauth授权时候的SSL校验;前端为了更美观,让系统退出之前把所有打开的页面都关闭
1 parent 83d8f4f commit 9869bde

File tree

4 files changed

+42
-24
lines changed

4 files changed

+42
-24
lines changed

‎api/app/Http/Controllers/Admin/LoginController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ protected function token($data = []){
200200
$http = new Client();
201201
$url = env('APP_URL');
202202
$result = $http->post("$url/oauth/token", [
203-
'form_params' => $data
203+
'form_params' => $data,
204+
"verify" => false
204205
]);
205206
$result = json_decode((string) $result->getBody(), true);
206207
return response()->json([

‎back.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 1.apache的配置
1+
## 1.apache的配置
22
~~~
33
<VirtualHost *:80>
44
# 本地目录,注意到后端项目的public目录
@@ -19,53 +19,60 @@
1919
~~~
2020

2121

22-
## 2在后端目录下,安装依赖
22+
## 2. 在后端目录下,安装依赖
2323
~~~
2424
composer install
2525
~~~
2626

2727
## 3. 新建数据库
2828
> 数据库中的字符集为utfmb8--UTF-8 Unicode , 排序规则为utf8mb4_unicode_ci
2929
30-
## 4复制配置文件,生成项目密匙
30+
## 4. 复制配置文件,生成项目密匙
3131

3232
~~~php
3333
cp .env.example .env
3434
php artisan key:generate
3535
~~~
3636

3737

38-
## 5.项目配置(数据库和域名配置)
38+
## 5.项目配置(数据库和域名配置)
3939
> .env文件中的APP_URL为后端域名,以http或者https开头
4040
>
4141
> 配置.env文件中的DB_DATABASE、DB_USERNAME和DB_PASSWORD 设置数据库
4242
>
4343
44-
## 6生成项目所需的数据表
44+
## 6. 生成项目所需的数据表
4545

46-
~~~
46+
~~~php
4747
php artisan migrate
4848
~~~
4949

50-
## 7生成用户数据和各种结构数据
50+
## 7. 生成用户数据和各种结构数据
5151

5252
> 用户名/密码: admin/123456
5353
54-
~~~
54+
~~~php
5555
php artisan db:seed
5656
~~~
5757

5858

59-
## 8使用OAuth认证,生成passport的密钥
59+
## 8. 使用OAuth认证,生成passport的密钥
6060
~~~php
6161
php artisan passport:keys
6262
php artisan passport:client --password
6363
~~~
6464

6565
> 生成的密匙填写到.env文件中的OAuth认证这一块的PASSPORT_CLIENT_ID和PASSPORT_CLIENT_SECRET的参数
6666
67+
## 9. 建立图像软连接
68+
> linux上要设置相关目录的权限为777 public目录和storage目录
69+
~~~
70+
php artian storage:link
71+
~~~
72+
6773

68-
## 9、消息推送(websocket配置,可以稍后)
74+
## 10. 消息推送
75+
> 如果需要打开客服功能,必须配置,根据情况可以稍后配置
6976
7077
需要根据要求配置laravel-echo-server,全局安装
7178

‎element/src/layout/components/Navbar.vue

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,23 @@ export default {
4242
this.$store.dispatch('app/toggleSideBar');
4343
},
4444
async logout() {
45-
// if (process.env.VUE_APP_WEBSOCKET === 'ON' && process.env.VUE_APP_SINGLE_LOGIN === 'ON' ) {
46-
// window.channel.unbind('UserLogin');
47-
// window.channel = null;
48-
// }
49-
await this.$store.dispatch('user/logout');
50-
// this.$router.push(`/login?redirect=${this.$route.fullPath}`);
51-
this.$router.push(`/login`);
45+
let tab = {
46+
fullPath: "/dashboard",
47+
meta: {
48+
affix: true,
49+
icon: "dashboard",
50+
title: "面板"
51+
},
52+
name: "Dashboard",
53+
path: "/dashboard",
54+
title: "面板"
55+
}
56+
this.$store.dispatch('tagsView/delOthersViews', tab).then(async () => {
57+
// this.$router.push('/dashboard')
58+
await this.$store.dispatch("user/logout");
59+
this.$router.push(`/login`);
60+
// this.$router.push(`/login?redirect=${this.$route.fullPath}`);
61+
})
5262
}
5363
}
5464
};

‎front.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
## 1安装依赖
2-
`npm install`
1+
## 1. 安装依赖
2+
`npm install`
33

4-
## 2配置后端服务器
4+
## 2. 配置后端服务器
55
前端位于element目录下,.env.development保存开发时的环境,.env.development保存发布后的环境
66

77
配置其中的VUE_APP_BASE_API地址,分别指向开发时的本地后端服务器和发布后线上后端服务器。
88

9-
## 3本地开发
9+
## 3. 本地开发
1010
`npm run dev`
1111

1212
登录用户名和密码使用后端的用户名和密码
1313

14-
## 4编译打包
14+
## 4. 编译打包
1515
`npm run build`
1616

17-
程序打包到了element\dist目录
17+
程序打包到了element\dist目录

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /