主页正常显示,但是登录时报错。
来源:7-18 联调演示与总结
珍妮玛一黛金
2022-03-09
登录功能不能使用,发送请求时没有反应,控制台显示
Status Code:
504 Gateway Time-out
终端报错内容是:
(node:15748) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `username` of 'undefined' or 'null'.
at handleUserRouter (F:\VScode项目库\nodejs\blog-1\src\router\user.js:18:40)
at get.then.then.postData (F:\VScode项目库\nodejs\blog-1\app.js:144:24)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:15748) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15748) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the
future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2回答
-
根据错误提示,找一下这个 user.js 18行是什么代码?截图给我看下
00 -
珍妮玛一黛金
提问者
2022-03-09
登录模块
032022-03-10
相似问题

