fix: 修复下载license时文件名不对的问题

(cherry picked from commit da0156031c)
This commit is contained in:
chenjinsong
2024-03-19 15:38:46 +08:00
committed by 陈劲松
parent 91915996c0
commit d1ae513124

View File

@@ -134,7 +134,8 @@ export default {
},
downloadFile () {
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) {
// 兼容ie11
const blobObject = new Blob([res.data])
@@ -224,13 +225,6 @@ export default {
async mounted () {
this.queryAppearance()
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) {
const { currentRoute } = useRouter()