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