优化部署在revertProxy环境中的basePath无效问题

This commit is contained in:
Moshow郑锴
2024-04-23 21:26:04 +08:00
parent db4c243449
commit 5fd17483f7
4 changed files with 17 additions and 8 deletions

View File

@@ -121,7 +121,7 @@ const vm = new Vue({
generate : function(){
//get value from codemirror
vm.formData.tableSql=$.inputArea.getValue();
axios.post("code/generate",vm.formData).then(function(res){
axios.post(basePath+"/code/generate",vm.formData).then(function(res){
if(res.code===500){
error("生成失败");
return;
@@ -146,7 +146,7 @@ const vm = new Vue({
},
created: function () {
//load all templates for selections 加载所有模板供选择
axios.post("template/all",{
axios.post(basePath+"/template/all",{
id:1234
}).then(function(res){
//console.log(res.templates);

View File

@@ -13,6 +13,9 @@
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
var basePath = "${request.contextPath}";
console.log("basePath",basePath)
</script>
<#if value.mode=='local'>

View File

@@ -113,7 +113,7 @@ by https://zhengkai.blog.csdn.net
<footer class="main-footer">
<!-- To the right -->
<div class="float-right d-none d-sm-inline">
Version 2024 April
Version ${(value.version)!!}
</div>
<!-- Default to the left -->
<strong>Powered by Moshow郑锴 , Might the holy light be with you ! <a href="https://zhengkai.blog.csdn.net" target="_blank"><i class="fa fa-fw fa-thumbs-up"></i>zhengkai.blog.csdn.net</a> <a href="https://github.com/moshowgame/SpringBootCodeGenerator/blob/master/donate.png?raw=true" target="_blank"><i class="fa fa-fw fa-credit-card"></i>打赏</a>

View File

@@ -3,16 +3,22 @@
<head>
<#include "/header.html">
<style>
.el-form-item__content{
/* .el-form-item__content{
line-height : 10px;
}
} */
/*.el-form-item--mini .el-form-item__content, .el-form-item--mini .el-form-item__label{
line-height : 10px;
}*/
.el-button-group-top {
/* .el-button-group-top {
padding-top: 5px;
}
</style>
} */
.el-button--primary.is-plain.is-disabled, .el-button--primary.is-plain.is-disabled:active, .el-button--primary.is-plain.is-disabled:focus, .el-button--primary.is-plain.is-disabled:hover {
color: #f9faff;
background-color: #91979d;
border-color: #d9ecff;
font-weight: bold;
}
</style>
</head>
<body>