upgrade:Template upgrade

This commit is contained in:
zhangwenjian committed 2020-07-23 21:06:30 +08:00
1 parent 791d07d09b
commit 2549f26147
1 file changed
+7 -2
+7 -2
View File
@@ -24,8 +24,13 @@ pageIndex = tools.StrToInt(err, index)
{{ range .Columns -}}
{{$z := .IsQuery}}
{{- if ($z) -}}data.{{.GoField}} = c.Request.FormValue("{{.JsonField}}")
{{ end -}}
{{- if ($z) -}}
{{ if eq (.GoType) "int" -}}
data.{{.GoField}}, _ = tools.StringToInt(c.Request.FormValue("{{.JsonField}}"))
{{ else -}}
data.{{.GoField}} = c.Request.FormValue("{{.JsonField}}")
{{ end }}
{{- end -}}
{{end}}
data.DataScope = tools.GetUserIdStr(c)