Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

页面启动后,一直报错,network error #18

Open
binaryjerry opened this issue Nov 6, 2020 · 7 comments
Open

页面启动后,一直报错,network error #18

binaryjerry opened this issue Nov 6, 2020 · 7 comments
Labels
question Further information is requested

Comments

@binaryjerry
Copy link

No description provided.

@everythingbest
Copy link
Owner

可能是你没有启动后端,或者前端的代理没有配置正确

@yiyuzhou
Copy link

后端启动成功 还是network error

@everythingbest
Copy link
Owner

后端启动成功 还是network error

通过这个命令进行前端代码的编译:npm run build
如果前端编译成功,然后后端启动正常,访问 localhost:8080 就可以访问到页面首页了。

@everythingbest everythingbest added the question Further information is requested label Nov 11, 2020
@wzq-xzwj
Copy link

wzq-xzwj commented Oct 9, 2021

请问如何才能通过9528访问且不报错network error呢?看起来这像是一个跨域的问题

@everythingbest
Copy link
Owner

请问如何才能通过9528访问且不报错network error呢?看起来这像是一个跨域的问题
直接对页面请求进行mock 测试的话,可以修改 src/main/frontend/main.js 文件,把
//如果是本地调试就使用,在build的时候正注释掉这行
//import './mock'
上面的注释去掉,然后npm run dev,就可以了。

@wzq-xzwj
Copy link

wzq-xzwj commented Oct 10, 2021 via email

@everythingbest
Copy link
Owner

谢谢!我这边实际测试情况是想要进行前后端分离使用,并不是用来本地调试的。。。不知这种应该如何解决跨域问题,是要使用cas登录吗? 从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送 发件人: @.> 发送时间: 2021年10月9日 14:32 收件人: @.> 抄送: @.>; @.> 主题: Re: [everythingbest/dubbo-postman] 页面启动后,一直报错,network error (#18) 请问如何才能通过9528访问且不报错network error呢?看起来这像是一个跨域的问题 直接对页面请求进行mock 测试的话,可以修改 src/main/frontend/main.js 文件,把 //如果是本地调试就使用,在build的时候正注释掉这行 //import './mock' 上面的注释去掉,然后npm run dev,就可以了。 ― You are receiving this because you commented. Reply to this email directly, view it on GitHub<#18 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIIXWGR2CQTZCVJ6I5HTFXTUF7OX7ANCNFSM4TMKUSDQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

看readme文件:
先编译前端ui: npm run build
再编译后端代码: maven clean package
然后启动: java -jar target/dubbo-postman.jar
访问地址:http://localhost:8080/ 就可以了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants