浏览代码

导出文件

kobe6258 4 月之前
父节点
当前提交
c54ddcfd81
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 {