Skip to content

Commit

Permalink
修复 Issue gogf#21: getDefaultMainTpl 的时候, content/update 是有3个参数,导致模板找不…
Browse files Browse the repository at this point in the history
…到指定文件。
  • Loading branch information
leeguo2015 committed Jun 13, 2024
1 parent d9034a0 commit 783f6ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/logic/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ func (s *sView) getDefaultMainTpl(ctx context.Context) string {
urlPathArray = urlPathArray[1:]
}
switch {
case len(urlPathArray) == 2:
case len(urlPathArray) == 2 || (len(urlPathArray) >= 2 && urlPathArray[1] == "update"):

// 如果2级路由为数字,那么为模块的详情页面,那么路由固定为/xxx/detail。
// 如果需要定制化内容模板,请在具体路由方法中设置MainTpl。
if gstr.IsNumeric(urlPathArray[1]) {
Expand Down

0 comments on commit 783f6ab

Please sign in to comment.