多彩编程 多彩编程MZPH · CODE BLOG
ARTICLE DETAIL

文章详情

深耕前端与后端开发技术的一线实战笔记与踩坑复盘。

20260804,日常开发-观察与求助

20260804,日常开发-观察与求助 问题说明在一个内部ERP系统中会跳转一个外部服务。测试同学反馈打不开报错。报错如下问题解决跳转代码如下public static void pcInsuranceReportByLogin(BeatContext beat, String orderNo, String ticket, String url, String mobile, String deviceInfo, Long downloadUser) throws Exception { StringBuffer content new StringBuffer(); content.append(ticket).append().append(ticket); content.append(orderno).append().append(orderNo); content.append(phone).append().append(mobile); content.append(source).append().append(crm); content.append(pdfNameType).append().append(4); content.append(deviceInfo).append().append(deviceInfo); /** * 下载人信息 */ content.append(downloadUser).append().append(downloadUser); logger.info(查看下载检测基础版报告 content is :{} url is {},content.toString(), url); byte[] b HttpUtil.exec(beat.getRequest(), beat.getResponse(), url, GET, content.toString()); writer(beat, b); } private static void writer(BeatContext beat, byte[] b) throws Exception { beat.getResponse().getWriter().write(new String(b, utf-8)); beat.getResponse().getWriter().flush(); beat.getResponse().getWriter().close(); }可见拿到一个地址获取流然后写到response里取。找到对方的地址url打开浏览器发现人家可以正常打开域名是treport.chaboshi.cn。奇怪从erp里走进去路径但是却定位到tqa.chaboshi.cnGET https://tqa.chaboshi.cn/views/pcNewEnergyReport/components/header.js net::ERR_ABORTED 404 (Not Found)问题陷入僵局我知道我们是使用方里边不受我们控制更何况我们这什么也没改。找运维运维说不是我们的问题找h5还是人家慧眼。看到如下为什么一些资源没有绝对路径呢。前端开发过程肯定是相对路径。部署的时候再当前域名下可以但是其他域名进来就会打不开。好吧问题到此水落石出运维的问题。或者说项目打包问题。运维说已经2周了你们都没发现呵呵没人用吧没人较真吧。问题总结遇到问题不要慌不要急线上问题除外放平心态找人协助。也不要急每个团队都有自己的节奏要善于观察和发现。见藐小微物必明察秋毫
返回列表