From 783f6ab545a4304084e0d8210dcfa7ab59e402b2 Mon Sep 17 00:00:00 2001 From: leeguo Date: Thu, 13 Jun 2024 21:04:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Issue=20#21:=20getDefaultM?= =?UTF-8?q?ainTpl=20=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=20content/update?= =?UTF-8?q?=20=E6=98=AF=E6=9C=893=E4=B8=AA=E5=8F=82=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=A8=A1=E6=9D=BF=E6=89=BE=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E6=96=87=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/view/view.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/logic/view/view.go b/internal/logic/view/view.go index 1dae311..7229de8 100644 --- a/internal/logic/view/view.go +++ b/internal/logic/view/view.go @@ -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]) {