RuoYi
2021-09-27 1b6b3dc9453c5ef8cfec990a4ad80184fc19fcc8
新增通用方法简化下载使用
已修改3个文件
5 ■■■■■ 文件已修改
src/main/java/com/ruoyi/common/utils/file/FileUtils.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/framework/config/SecurityConfig.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/vm/vue/index.vue.vm 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/common/utils/file/FileUtils.java
@@ -211,6 +211,7 @@
                .append(percentEncodedFileName);
        response.setHeader("Content-disposition", contentDispositionValue.toString());
        response.setHeader("download-filename", percentEncodedFileName);
    }
    /**
src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -107,8 +107,6 @@
                        "/**/*.js",
                        "/profile/**"
                ).permitAll()
                .antMatchers("/common/download**").anonymous()
                .antMatchers("/common/download/resource**").anonymous()
                .antMatchers("/swagger-ui.html").anonymous()
                .antMatchers("/swagger-resources/**").anonymous()
                .antMatchers("/webjars/**").anonymous()
src/main/resources/vm/vue/index.vue.vm
@@ -567,7 +567,7 @@
        this.exportLoading = true;
        return export${BusinessName}(queryParams);
      }).then(response => {
        this.download(response.msg);
        this.#[[$download]]#.name(response.msg);
        this.exportLoading = false;
      }).catch(() => {});
    }