TypeError:Cannot read peoperty ‘json’ of undefined 问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/q290994/article/details/81842484

前端运行后,不能获取后端数据,并跳出图片错误:
这里写图片描述

看了半天,晚上找大神解决,大神3分钟找出问题所在。看来还需要很多成长呀。
想知道问题原因在哪吗?
这里写图片描述

此处路径应为

let url = "Shared/getBookById/"+id;

多了一个/,导致找不到后端数据

猜你喜欢

转载自blog.csdn.net/q290994/article/details/81842484