exhcangeBalance(){
this.loading = true
this.exchangeFrom.append('XAuthToken',3)
this.exchangeFrom.append('voucher',this.jinEinput)
this.$axios.post("http://localhost:8080/MeDesignMaster/account/voucherExchange",this.exchangeFrom)
.then(response => {
console.log(response)
//点券
this.designerAccountBalance = response.data.responseDataObject.designerAccountBalance
this.loading = false
})
.catch(function(error) {
this.loading = false
});
}
可能失败了 进入catch分支了。由于catch里的函数没有使用箭头函数,所以这个this指向window