Browse Source

导出文件

kobe6258 4 months ago
parent
commit
c54ddcfd81
1 changed files with 1 additions and 1 deletions
  1. 1 1
      controllers/user.go

+ 1 - 1
controllers/user.go

@@ -461,7 +461,7 @@ func (this *UserController) ExportTemplateUsers() {
 // encodeChineseFilename 将中文文件名编码为 ISO-8859-1
 func (this *UserController) downloadExcelFile(file *excelize.File, filename string) (err error) {
 	// 对文件名进行 ISO-8859-1 编码
-	fn := url.PathEscape(filename)
+	fn := url.QueryEscape(filename)
 	if filename == fn {
 		fn = "filename=" + fn
 	} else {