Merge remote-tracking branch 'origin/main'
# Conflicts: # gateway/src/main/resources/bootstrap.yml # modules/bmw/src/main/resources/static/js/publicJs.js
This commit is contained in:
commit
a60ebe3cb4
|
|
@ -1,42 +1,42 @@
|
||||||
package com.bonus.gateway.config;
|
//package com.bonus.gateway.config;
|
||||||
|
//
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.autoconfigure.web.ServerProperties;
|
//import org.springframework.boot.autoconfigure.web.ServerProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
//import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
//import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.Ordered;
|
//import org.springframework.core.Ordered;
|
||||||
import org.springframework.core.annotation.Order;
|
//import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.http.HttpStatus;
|
//import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
//import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||||
import org.springframework.web.server.ResponseStatusException;
|
//import org.springframework.web.server.ResponseStatusException;
|
||||||
import org.springframework.web.server.WebFilter;
|
//import org.springframework.web.server.WebFilter;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author HeiZi
|
// * @author HeiZi
|
||||||
*/
|
// */
|
||||||
@Configuration
|
//@Configuration
|
||||||
public class ContextPathConfig {
|
//public class ContextPathConfig {
|
||||||
|
//
|
||||||
@Bean
|
// @Bean
|
||||||
@ConditionalOnProperty("server.servlet.context-path")
|
// @ConditionalOnProperty("server.servlet.context-path")
|
||||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
// @Order(Ordered.HIGHEST_PRECEDENCE)
|
||||||
public WebFilter contextPathWebFilter(ServerProperties serverProperties){
|
// public WebFilter contextPathWebFilter(ServerProperties serverProperties){
|
||||||
String contextPath = serverProperties.getServlet().getContextPath();
|
// String contextPath = serverProperties.getServlet().getContextPath();
|
||||||
return (serverWebExchange, webFilterChain) ->{
|
// return (serverWebExchange, webFilterChain) ->{
|
||||||
ServerHttpRequest request = serverWebExchange.getRequest();
|
// ServerHttpRequest request = serverWebExchange.getRequest();
|
||||||
String requestPath = request.getURI().getPath();
|
// String requestPath = request.getURI().getPath();
|
||||||
|
//
|
||||||
if(requestPath.contains(contextPath)){
|
// if(requestPath.contains(contextPath)){
|
||||||
String newPath = requestPath.replaceFirst(contextPath+"/", "");
|
// String newPath = requestPath.replaceFirst(contextPath+"/", "");
|
||||||
ServerHttpRequest newRequest = request.mutate()
|
// ServerHttpRequest newRequest = request.mutate()
|
||||||
.path(newPath).build();
|
// .path(newPath).build();
|
||||||
return webFilterChain.filter(serverWebExchange.mutate()
|
// return webFilterChain.filter(serverWebExchange.mutate()
|
||||||
.request(newRequest)
|
// .request(newRequest)
|
||||||
.build()
|
// .build()
|
||||||
);
|
// );
|
||||||
}else {
|
// }else {
|
||||||
throw new ResponseStatusException(HttpStatus.NOT_FOUND);
|
// throw new ResponseStatusException(HttpStatus.NOT_FOUND);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ server:
|
||||||
# servlet:
|
# servlet:
|
||||||
# context-path: /bmw
|
# context-path: /bmw
|
||||||
|
|
||||||
environment: @profiles.active@
|
|
||||||
|
|
||||||
## Spring
|
## Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ function photoView(idNumber) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportList(id) {
|
function exportList(id) {
|
||||||
location.href = ctxPath + '/salaryBookFill/exportExamList?id='+ id;
|
location.href = ctxPath + '/salaryBookFill/exportExamList?id='+ id + '&token='+ localStorage.getItem("smz-token");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑按钮
|
// 编辑按钮
|
||||||
|
|
@ -155,4 +155,4 @@ function buttonExport(id, permission, pers) {
|
||||||
function buttonView(id,permission, pers) {
|
function buttonView(id,permission, pers) {
|
||||||
var btn = $("<button class='layui-btn layui-btn-xs' title='删除' onclick='photoView(\"" + id + "\")'>查看</button>");
|
var btn = $("<button class='layui-btn layui-btn-xs' title='删除' onclick='photoView(\"" + id + "\")'>查看</button>");
|
||||||
return btn.prop("outerHTML");
|
return btn.prop("outerHTML");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ function dataEdit(idNumber) {
|
||||||
|
|
||||||
|
|
||||||
function exportList(id) {
|
function exportList(id) {
|
||||||
location.href = ctxPath + '/salaryBookFill/exportExamList?id='+ id;
|
location.href = ctxPath + '/salaryBookFill/exportExamList?id='+ id + '&token='+ localStorage.getItem("smz-token");
|
||||||
}
|
}
|
||||||
|
|
||||||
function submit(id) {
|
function submit(id) {
|
||||||
|
|
@ -355,4 +355,4 @@ function reloading() {
|
||||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||||
parent.layer.close(index); //再执行关闭
|
parent.layer.close(index); //再执行关闭
|
||||||
window.parent.location.reload();
|
window.parent.location.reload();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue