Commit 7882de70 by liangzhen

下载功能

1 parent e603c8d3
// import request from '@/utils/request'
// let mainURL="192.168.8.248:18101"
var qs = require('qs')
import { get, post, download } from '@/utils/http'
......@@ -250,4 +251,9 @@ export function tjrectificationVerification(params) {
//列表
export function materialSync(params) {
return post(`/arch-evaluation/materialSync/`, params)
}
\ No newline at end of file
}
//下载
export function downloadObject(params) {
return post(`/arch-evaluation/oss/downloadObject`, qs.stringify(params))
}
......@@ -26,6 +26,10 @@ function decryptStringBySM4_CBC(str) {//使用sm4-cbc算法给字符串解密
axios.interceptors.request.use(config => {
config.headers['X-USER'] =sessionStorage.getItem('author');
config.headers['X-USER-NAME']=sessionStorage.getItem('authorName')
console.log(config.url.indexOf('oss/downloadObject')!='-1','config.url')
if(config.url.indexOf('oss/downloadObject')!='-1'){
config.headers["Content-Type"] ='application/x-www-form-urlencoded'
}
// config.headers.token = JSON.parse(localStorage.getItem('token')).token;
......
......@@ -546,7 +546,9 @@ export default {
//_blank表示在新窗口打开链接
// link.target = '_blank'
// link.href =scope.url
window.open(scope.url, '_blank');
if(scope.url){
window.open(scope.url, "_blank");
}
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!