用 KOA2 + nodejs + ejs 抓取網(wǎng)頁(yè)數(shù)據(jù),且在前端頁(yè)面顯示出結(jié)果信息:query.jsindex.js在訪問(wèn)“/s*”頁(yè)面時(shí),出現(xiàn):(node:808) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Can't set headers after they are sent.錯(cuò)誤,且頁(yè)面無(wú)法跳轉(zhuǎn)。試了很多方式,但還是不知道應(yīng)該在哪里提前返回。目前已知道,是因?yàn)樵赾tx已經(jīng)結(jié)束之后,又去調(diào)用render去寫(xiě)數(shù)據(jù)。。。但就是找不到該在哪里改。。。求助各位。。
KOA2+node+ejs Error: Can't set headers after they
慕虎7371278
2018-11-21 18:19:28