下载文件-还原

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) 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) { export function downLoadUrl(str, item) {
var url = baseUrl + str var url = baseUrl + str
axios({ axios({

View File

@ -22,8 +22,8 @@
<span>{{ i + 1 }}.</span> <span>{{ i + 1 }}.</span>
<i class="el-icon-document icon"></i>{{ ele.name }} <i class="el-icon-document icon"></i>{{ ele.name }}
</div> </div>
<!-- <a class="right" :href="apiurl + ele.fileurl">下载</a> --> <a class="right" :href="apiurl + ele.fileurl">下载</a>
<a class="right" @click="down(ele)">下载</a> <!-- <a class="right" @click="down(ele)">下载</a> -->
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -94,9 +94,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/**/*.css", "/**/*.css",
"/**/*.js" "/**/*.js"
).permitAll() ).permitAll()
// .antMatchers("/profile/**").anonymous() .antMatchers("/profile/**").anonymous()
// .antMatchers("/common/download**").anonymous() .antMatchers("/common/download**").anonymous()
// .antMatchers("/common/download/resource**").anonymous() .antMatchers("/common/download/resource**").anonymous()
.antMatchers("/swagger-ui.html").anonymous() .antMatchers("/swagger-ui.html").anonymous()
.antMatchers("/swagger-resources/**").anonymous() .antMatchers("/swagger-resources/**").anonymous()
.antMatchers("/webjars/**").anonymous() .antMatchers("/webjars/**").anonymous()