打包后发布接口无法访问 doesn't work properly withou

http://8.209.203.24:88/api/mjkj-chat/chat/open/cssz/list

本地运行正常,打包后npm run build 用nginx代理后,所有接口返回的内容如下:

server {

            listen 88;

            server_name  localhost;

    location   / {

    root  C:/ai/Chatgpt_pc/dist/;  #Web网站程序存放目录

    index index.html index.htm;

    error_page 405 =200 $request_uri;

    try_files $uri $uri/ /index.html;

    }

We're sorry but 超级AI大脑 doesn't work properly without JavaScript enabled. Please enable it to continue.

评论区

超级管理员

2024-06-11 14:21

你的nginx配置 少了一段 /api 的配置 是配置Java服务的端口的