async getCodeList () {
this.axios({
method: 'post',
url: '/code/generator?tables=sys_user',
responseType: 'blob'
}).then(res => {
let data = res.data
if (!data) {
return
}
let url = window.URL.createObjectURL(new Blob([data]))
let a = document.createElement('a')
a.style.display = 'none'
a.href = url
a.setAttribute('download', 'excel.xls')
document.body.appendChild(a)
a.click()
window.URL.revokeObjectURL(a.href)
document.body.removeChild(a)
}).catch((error) => {
console.log(error)
})
const { data: res } = await this.$http.get('/code/listData', {
params: {
limit: this.queryInfo.limit,
tableName: this.queryInfo.tableName,
page: this.queryInfo.page
}
})
報錯
Access to XMLHttpRequest at 'http://127.0.0.1:7777/code/generator?tables=sys_user' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
眾所周知,C ++的學習曲線陡峭,但是花時間學習這種語言將為您的職業帶來奇跡,并使您與其他開發人員區分開。您會更輕松地學習新語言,形成真正的解決問題的技能,并在編程的基礎上打下堅實的基礎。 C ++將幫助您養成良好的編程習慣(即清晰一致的編碼風格,在撰寫代碼時注釋代碼,并限制類內部的可見性),并且由 ......
值傳遞不會改變本身,參考傳遞(如果傳遞的值需要實體化到堆里)如果發生修改了會改變本身。 1.基本資料型別都是值傳遞 package com.example.basic; public class Test { public static void main(String[] args) { int ......