Merge branch 'cherry-pick-da015603' into 'dev-24.01'

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

See merge request cyber-narrator/cn-ui!63
This commit is contained in:
陈劲松
2024-03-19 07:46:16 +00:00

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