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

api/v1/report/webscript 接口404 #9

Closed
jiangzhenxiang opened this issue Nov 22, 2018 · 7 comments
Closed

api/v1/report/webscript 接口404 #9

jiangzhenxiang opened this issue Nov 22, 2018 · 7 comments

Comments

@jiangzhenxiang
Copy link

jiangzhenxiang commented Nov 22, 2018

本地启动服务,http://127.0.0.1:7001/api/v1/report/webscript接口404,http://127.0.0.1:7001/api/v1/report/web 同样404

<\script src="/dist/performance-report-default.min.js"><\/script>
<\script>
Performance({
    domain: 'http://127.0.0.1:7001/api/v1/report/webscript', 
    add:{
        appId:'pwBSn621542855731693'
    }
})
<\/script>

难道domain不是这个吗

@jiangzhenxiang jiangzhenxiang changed the title 接口404 api/v1/report/webscript 接口404 Nov 22, 2018
@wangweianger
Copy link
Owner

@jiangzhenxiang 你好webscript接口已经删除 只有 /api/v1/report/web这个接口 可用,项目只能使用sdk上报,404错误应该是你的服务没有启动成功

@jiangzhenxiang
Copy link
Author

已解决谢谢

@wy281704862
Copy link

@jiangzhenxiang 怎么解决的? 我也遇到跟你相同的问题

@jiangzhenxiang
Copy link
Author

jiangzhenxiang commented Dec 5, 2018

@wy281704862 更新了一下代码,我部署到我的服务器上执行npm run dev启动服务,接口没问题了

@wangweianger
Copy link
Owner

@jiangzhenxiang @wy281704862 你好在正式环境中不推荐使用dev命令,推荐使用npm run start命令,
npm run start 命令需要安装 egg-scripts 块:
npm i egg-scripts --save

@wy281704862
Copy link

谢谢,我已经解决了。换成api/v1/report/web 这个接口地址就可以了

@jiangzhenxiang
Copy link
Author

@wangweianger 好的谢谢

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

No branches or pull requests

3 participants