解决Vue中POST提交后变成GET请求
需要在header中添加Content-Type字段,Tornado后台获取用get_arguments()方法。this.$axios({headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',"Authorizatio...
·
需要在header中添加Content-Type字段,Tornado后台获取用get_argument()方法。
this.$axios({
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
"Authorization": 'Bearer ' + this.authorization,
},
method:'get',
url:this.ip + '/algorithms/'+this.currentId+"/version/"+verId ,
}).then((res) =>{
console.log(res)
let data = res.data.data
// self.historyData = data
self.historyData.create_time = data.create_time
self.historyData.algo_content= data.algo_content
self.isHistory = true
this.currentVersionId = verId
self.addNumberLine()
}).catch(function(err){
console.log(err)
})
更多推荐
已为社区贡献3条内容
所有评论(0)