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

Closed
Ricemonster opened this issue Aug 1, 2019 · 1 comment
Closed

提点意见 #6

Ricemonster opened this issue Aug 1, 2019 · 1 comment

Comments

@Ricemonster
Copy link

图片
我这里返回的状态是 ok 所以你这段错误检测写的还不健壮
if (res.data && (!res.data.success)) { alert(res.data.error_msg) }
错误信息的判断也没有多少,只有一个网络错误

@heuuLZP
Copy link
Owner

heuuLZP commented Aug 16, 2019

@Ricemonster 你好,checkCode() 这个方法主要是为了处理后端返回的业务 code,这里需要您根据你的后端返回的数据结构自行设置的,每个公司或项目后端返回的数据结构也不可能完全一样。

@heuuLZP heuuLZP closed this as completed Aug 16, 2019
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