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

因为字符串"0"在字符串"0,200,20000"里所以返回true了 #86

Closed
bigLRRH opened this issue Aug 21, 2023 · 3 comments
Closed

因为字符串"0"在字符串"0,200,20000"里所以返回true了 #86

bigLRRH opened this issue Aug 21, 2023 · 3 comments

Comments

@bigLRRH
Copy link

bigLRRH commented Aug 21, 2023

src/utils/axios-req.ts 57~62行
` const { code, msg } = res.data

const successCode = '0,200,20000'

const noAuthCode = '401,403'

if (successCode.includes(code)) {

  return res.data

} else {`

还有很多地方

@jzfai
Copy link
Owner

jzfai commented Aug 21, 2023

const successCode = [0,200,20000]
const noAuthCode = [401,403]
if (successCode.includes(code)) {
return res.data
} else {

改为数组吧

@jzfai
Copy link
Owner

jzfai commented Aug 21, 2023

已 fix

@jzfai jzfai closed this as completed Aug 21, 2023
@bigLRRH
Copy link
Author

bigLRRH commented Aug 21, 2023

还有view/login/login-bisic 150行

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