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

为啥我注册成功登不上呢 #6

Open
215272195 opened this issue Jun 21, 2018 · 5 comments
Open

为啥我注册成功登不上呢 #6

215272195 opened this issue Jun 21, 2018 · 5 comments

Comments

@215272195
Copy link

215272195 commented Jun 21, 2018

我看你在http://www.hxvin.com:3000/ 上说了,说明线上没问题,所以在你的本地开发环境没办法登录是吧?可否截个报错的图?

@215272195
Copy link
Author

服务器已启动,端口3000
disconnect transport error
register
[]
注册成功
(node:1763) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ER_NO_DEFAULT_FOR_FIELD: Field 'last_login' doesn't have a default value
(node:1763) [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.
这是我少运行文件了嘛?

@aermin
Copy link
Owner

aermin commented Jun 22, 2018

@215272195 Field 'last_login' doesn't have a default value , 数据库的原因 。
last_login int(10) NOT NULL COMMENT '最后登陆时间', 设置成了必须有值但又没给值,所以报错了。

fix

删掉 /Users/aermin.huang/Documents/mygithub/vue-chat/server/init/sql/airchat.sql中177行

last_login int(10) NOT NULL COMMENT '最后登陆时间',

或者可以修改前端代码,在登录的时候传个last_login时间。(当初本来想做成能看到用户最后登录时间,后来忘记做了)

感谢反馈 我这就修改 抱歉 给你带来麻烦了😂

@215272195
Copy link
Author

mysql 执行index文件也有个报错,请大佬帮助解决
[SUCCESS] sql脚本文件: airchat.sql 第42条脚本 执行成功 O(∩_∩)O !
[SUCCESS] sql脚本文件: airchat.sql 第43条脚本 执行成功 O(∩_∩)O !
(node:1436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ER_INVALID_DEFAULT: Invalid default value for 'sex'
(node:1436) [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.

@215272195
Copy link
Author

我觉得你这个项目很棒已给star,请master尽快更新!

@aermin
Copy link
Owner

aermin commented Jun 22, 2018

好的 我下午下班修一下 谢谢😄

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

2 participants