mirror of
https://gitlab.52pay.top/go/easygoadmin.git
synced 2025-09-26 23:18:02 +08:00
fix: 修复相对路径只取第一级的BUG
修复相对路径只取第一级的BUG
This commit is contained in:
2
main.go
2
main.go
@@ -35,7 +35,7 @@ func main() {
|
||||
//router.HTMLRender = LoadTemplates("views")
|
||||
//router.GET("level/index", controller.Level.Index)
|
||||
//router.GET("position/index", controller.Position.Index)
|
||||
router.Router.Run(":9097") // 监听并在 0.0.0.0:8080 上启动服务
|
||||
router.Router.Run(":9011") // 监听并在 0.0.0.0:8080 上启动服务
|
||||
}
|
||||
|
||||
func LoadTemplates(templatesDir string) multitemplate.Renderer {
|
||||
|
@@ -26,8 +26,11 @@
|
||||
<script type="text/javascript">
|
||||
var url = window.location.pathname.substring(1);
|
||||
var item = url.split("/");
|
||||
var C = item[0];
|
||||
var A = item[1];
|
||||
var delItem = item.splice(item.length -1)
|
||||
var A = delItem.join("")
|
||||
var C = item.join("/")
|
||||
// var C = item[0];
|
||||
// var A = item[1];
|
||||
var cUrl = "/" + C;
|
||||
</script>
|
||||
</head>
|
||||
|
Reference in New Issue
Block a user