1 回答

TA贡献1829条经验 获得超7个赞
它应该this.$route.query.id代替this.$route.query
mounted: function () {
CifRepository
.getCustomerDetails(this.$route.query.id)
.then(response => {
this.model = response.data.Results;
})
.catch(error => {
console.log(error)
this.errored = true
})
.finally(() => this.loading = false);
}
和
getCustomerDetails(id) {
return Repository.get("/api/Accounts/GetCustomerDetails/" + id);
}
我不确定 C# 部分,但可能是
[HttpGet("GetCustomerDetails/${id}")]
public async Task<CustomerListingDto> GetCustomerDetails(long id)
{
CustomerServiceModel customers = await
_accountService.GetCustomerDetailsByCustomerId(id);
return _mapper.Map<CustomerListingDto>(customers);
}
- 1 回答
- 0 关注
- 121 浏览
添加回答
举报