fix: 修复下载license时文件名不对的问题
This commit is contained in:
@@ -138,7 +138,8 @@ export default {
|
|||||||
},
|
},
|
||||||
downloadFile () {
|
downloadFile () {
|
||||||
axios.get(this.downloadC2vUrl, { responseType: 'blob' }).then(res => {
|
axios.get(this.downloadC2vUrl, { responseType: 'blob' }).then(res => {
|
||||||
const fileName = 'CN-' + this.supportID + '-license-apply.xml'
|
const disposition = res.headers['content-disposition']
|
||||||
|
const fileName = decodeURI(disposition.split('filename=')[1])
|
||||||
if (window.navigator.msSaveOrOpenBlob) {
|
if (window.navigator.msSaveOrOpenBlob) {
|
||||||
// 兼容ie11
|
// 兼容ie11
|
||||||
const blobObject = new Blob([res.data])
|
const blobObject = new Blob([res.data])
|
||||||
@@ -229,13 +230,6 @@ export default {
|
|||||||
async mounted () {
|
async mounted () {
|
||||||
this.queryAppearance()
|
this.queryAppearance()
|
||||||
this.checkLicenseStatus()
|
this.checkLicenseStatus()
|
||||||
await axios.get(api.license).then(res => {
|
|
||||||
if (res.status === 200) {
|
|
||||||
this.supportID = res.data.data.license.supportID
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
console.log(e)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
setup (props) {
|
setup (props) {
|
||||||
const { currentRoute } = useRouter()
|
const { currentRoute } = useRouter()
|
||||||
|
|||||||
Reference in New Issue
Block a user