diff --git a/ruoyi-ui/src/utils/zipdownload.js b/ruoyi-ui/src/utils/zipdownload.js index cf1409dac..dee87b7a8 100644 --- a/ruoyi-ui/src/utils/zipdownload.js +++ b/ruoyi-ui/src/utils/zipdownload.js @@ -18,6 +18,18 @@ export function downLoadZip(str, filename) { resolveBlob(res, mimeMap.zip) }) } +export function downLoadRequestUrl(str) { + var url = baseUrl + str + axios({ + method: 'get', + url: url, + responseType: 'blob', + headers: { 'Authorization': 'Bearer ' + getToken() }, + }).then(res => { + // console.log(res); + }) +} + export function downLoadUrl(str, item) { var url = baseUrl + str axios({ diff --git a/ruoyi-ui/src/views/benyi/child_files/index.vue b/ruoyi-ui/src/views/benyi/child_files/index.vue index a4924e670..e2abd1951 100644 --- a/ruoyi-ui/src/views/benyi/child_files/index.vue +++ b/ruoyi-ui/src/views/benyi/child_files/index.vue @@ -22,8 +22,8 @@ <span>{{ i + 1 }}.</span> <i class="el-icon-document icon"></i>{{ ele.name }} </div> - <!-- <a class="right" :href="apiurl + ele.fileurl">下载</a> --> - <a class="right" @click="down(ele)">下载</a> + <a class="right" :href="apiurl + ele.fileurl">下载</a> + <!-- <a class="right" @click="down(ele)">下载</a> --> </li> </ul> </div> diff --git a/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index ef3add97c..a05c525ac 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -94,9 +94,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/**/*.css", "/**/*.js" ).permitAll() -// .antMatchers("/profile/**").anonymous() -// .antMatchers("/common/download**").anonymous() -// .antMatchers("/common/download/resource**").anonymous() + .antMatchers("/profile/**").anonymous() + .antMatchers("/common/download**").anonymous() + .antMatchers("/common/download/resource**").anonymous() .antMatchers("/swagger-ui.html").anonymous() .antMatchers("/swagger-resources/**").anonymous() .antMatchers("/webjars/**").anonymous()