It should have returned json data, but instead returned index.html. The project can be run locally, but after sending it to the server, such an error occurred. Solution
nginx configuration
server {
listen 80;
server_name www.xxxx.cn;
root /data/www/blog/;
location / {
try_files $uri $uri/ /index.html;
}
}
The packaged directories of the server are static and index.html, and the packaged index.html is proxied, so it is text/html
/etc/nginx/mime.types configuration
type {
text/html html htm shtml
}
Look at the error reported above. It means that what you returned is not a correct json. Please post the interface of your backend to spit out data