jzfai / vue3-admin-plus

👏 An amazing admin framework of vue3
MIT License
849 stars 203 forks source link

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

Closed bigLRRH closed 1 year ago

bigLRRH commented 1 year ago

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 commented 1 year ago

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

改为数组吧

jzfai commented 1 year ago

已 fix

bigLRRH commented 1 year ago

还有view/login/login-bisic 150行