下载文件-还原

This commit is contained in:
zhanglipeng 2021-01-29 15:12:42 +08:00
parent f7db1bcb1b
commit 4fbb01b54e
3 changed files with 17 additions and 5 deletions

View File

@ -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({

View File

@ -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>

View File

@ -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()