修改登出地址
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
<img src="https://img.shields.io/badge/Spring%20Cloud-2020.0.5-blue" alt="Downloads"/>
|
<img src="https://img.shields.io/badge/Spring%20Cloud-2020.0.5-blue" alt="Downloads"/>
|
||||||
<img src="https://img.shields.io/badge/Spring%20Cloud%20Alibaba-2021.1-blue" alt="Downloads"/>
|
<img src="https://img.shields.io/badge/Spring%20Cloud%20Alibaba-2021.1-blue" alt="Downloads"/>
|
||||||
<img src="https://img.shields.io/badge/Elasticsearch-7.x-brightgreen" alt="Downloads"/>
|
<img src="https://img.shields.io/badge/Elasticsearch-7.x-brightgreen" alt="Downloads"/>
|
||||||
|
<img src="https://img.shields.io/badge/Ant%20Design-pro-9cf" alt="Downloads"/>
|
||||||
<a target="_blank" href='https://gitee.com/zlt2000/microservices-platform'>
|
<a target="_blank" href='https://gitee.com/zlt2000/microservices-platform'>
|
||||||
<img src='https://gitee.com/zlt2000/microservices-platform/badge/star.svg' alt='star'/>
|
<img src='https://gitee.com/zlt2000/microservices-platform/badge/star.svg' alt='star'/>
|
||||||
</a>
|
</a>
|
||||||
@@ -97,7 +98,8 @@ central-platform -- 父项目,公共依赖
|
|||||||
│ ├─zlt-uaa -- spring-security认证中心[8000]
|
│ ├─zlt-uaa -- spring-security认证中心[8000]
|
||||||
│ ├─zlt-register -- 注册中心Nacos[8848]
|
│ ├─zlt-register -- 注册中心Nacos[8848]
|
||||||
│ ├─zlt-web -- 前端一级工程
|
│ ├─zlt-web -- 前端一级工程
|
||||||
│ │ ├─back-web -- 后台前端[8066]
|
│ │ ├─layui-web -- layui前端[8066]
|
||||||
|
│ │ ├─react-web -- react前端[8066]
|
||||||
│ ├─zlt-transaction -- 事务一级工程
|
│ ├─zlt-transaction -- 事务一级工程
|
||||||
│ │ ├─txlcn-tm -- tx-lcn事务管理器[7970]
|
│ │ ├─txlcn-tm -- tx-lcn事务管理器[7970]
|
||||||
│ ├─zlt-demo -- demo一级工程
|
│ ├─zlt-demo -- demo一级工程
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<java.version>8</java.version>
|
<java.version>8</java.version>
|
||||||
<spring-cloud-alibaba-dependencies.version>2021.1</spring-cloud-alibaba-dependencies.version>
|
<spring-cloud-alibaba-dependencies.version>2021.1</spring-cloud-alibaba-dependencies.version>
|
||||||
<spring-boot-dependencies.version>2.5.14</spring-boot-dependencies.version>
|
<spring-boot-dependencies.version>2.5.14</spring-boot-dependencies.version>
|
||||||
<spring-cloud-dependencies.version>2020.0.5</spring-cloud-dependencies.version>
|
<spring-cloud-dependencies.version>2020.0.6</spring-cloud-dependencies.version>
|
||||||
<commons-collections4.version>4.4</commons-collections4.version>
|
<commons-collections4.version>4.4</commons-collections4.version>
|
||||||
<swagger.butler.version>2.0.1</swagger.butler.version>
|
<swagger.butler.version>2.0.1</swagger.butler.version>
|
||||||
<jjwt.version>0.9.1</jjwt.version>
|
<jjwt.version>0.9.1</jjwt.version>
|
||||||
|
|||||||
+24
-11
@@ -33,6 +33,9 @@
|
|||||||
#### 2.1.2. 方式二:静态服务器运行
|
#### 2.1.2. 方式二:静态服务器运行
|
||||||
把 `layui-web\src\main\resources\static` 下的内容复制到类似 `Nginx` 之类的静态服务器运行。
|
把 `layui-web\src\main\resources\static` 下的内容复制到类似 `Nginx` 之类的静态服务器运行。
|
||||||
|
|
||||||
|
#### 2.1.3. 后端接口地址修改
|
||||||
|
修改 `layui-web\src\main\resources\static\module\apiUrl.js` 中的地址。
|
||||||
|
|
||||||
|
|
||||||
### 2.2. react-web
|
### 2.2. react-web
|
||||||
**以下 3 种运行方式,选一种运行即可。**
|
**以下 3 种运行方式,选一种运行即可。**
|
||||||
@@ -50,12 +53,33 @@ npm install
|
|||||||
|
|
||||||
运行成功后,浏览器访问:http://localhost:8066
|
运行成功后,浏览器访问:http://localhost:8066
|
||||||
|
|
||||||
|
##### 2.2.1.3. 后端接口地址修改
|
||||||
|
修改 `react-web\src\main\frontend\config\proxy.ts` 中的地址。
|
||||||
|
|
||||||
|
|
||||||
#### 2.2.2. 方式二:静态服务器运行
|
#### 2.2.2. 方式二:静态服务器运行
|
||||||
|
##### 2.2.2.1. 源码编译
|
||||||
运行 `frontend\build.bat` 文件或者执行 `npm run build` 命令进行编译。
|
运行 `frontend\build.bat` 文件或者执行 `npm run build` 命令进行编译。
|
||||||
|
|
||||||
编译成功后,把 `react-web\src\main\frontend\dist` 下的内容复制到类似 `Nginx` 之类的静态服务器运行。
|
编译成功后,把 `react-web\src\main\frontend\dist` 下的内容复制到类似 `Nginx` 之类的静态服务器运行。
|
||||||
|
|
||||||
|
##### 2.2.2.2. 后端接口地址修改
|
||||||
|
通过反向代理,例如 `Nginx` 的配置如下:
|
||||||
|
```json
|
||||||
|
location ~ ^/api-* {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Real-Port $remote_port;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_pass http://127.0.0.1:9900;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
expires 7d;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
#### 2.2.3. 方式三:使用Java运行
|
#### 2.2.3. 方式三:使用Java运行
|
||||||
模块已集成Maven插件`frontend-maven-plugin`用于编译前端代码
|
模块已集成Maven插件`frontend-maven-plugin`用于编译前端代码
|
||||||
@@ -71,17 +95,6 @@ java -jar zlt-web-5.4.0.jar
|
|||||||
或者直接在IDE中运行 `react-web\src\main\java\ui\ReactUiBootApplication.java`
|
或者直接在IDE中运行 `react-web\src\main\java\ui\ReactUiBootApplication.java`
|
||||||
> 运行前必需先使用 maven 对 react-web 工程进行编译或打包。
|
> 运行前必需先使用 maven 对 react-web 工程进行编译或打包。
|
||||||
|
|
||||||
|
|
||||||
## 三、后端接口地址修改
|
|
||||||
两个前端默认请求的后端接口地址默认都是:http://127.0.0.1:9900/
|
|
||||||
|
|
||||||
### 3.1. layui-web
|
|
||||||
修改 `layui-web\src\main\resources\static\module\apiUrl.js` 中的地址。
|
|
||||||
|
|
||||||
|
|
||||||
### 3.2. react-web
|
|
||||||
修改 `react-web\src\main\frontend\config\proxy.ts` 中的地址。
|
|
||||||
|
|
||||||
|
|
||||||
## 四、More
|
## 四、More
|
||||||
开发参考
|
开发参考
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ export async function fetchMenuData(options?: { [key: string]: any }) {
|
|||||||
|
|
||||||
/** 退出登录接口 POST /api/login/outLogin */
|
/** 退出登录接口 POST /api/login/outLogin */
|
||||||
export async function outLogin(options?: { [key: string]: any }) {
|
export async function outLogin(options?: { [key: string]: any }) {
|
||||||
return request<Record<string, any>>('/api/login/outLogin', {
|
return request<Record<string, any>>('/api-uaa/oauth/remove/token', {
|
||||||
method: 'POST',
|
method: 'GET',
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user