diff --git a/src/utils/http/axios/checkStatus.ts b/src/utils/http/axios/checkStatus.ts index 3a26090..230e740 100644 --- a/src/utils/http/axios/checkStatus.ts +++ b/src/utils/http/axios/checkStatus.ts @@ -33,7 +33,9 @@ export function checkStatus(status: number, msg: string): void { $message.error('网络请求超时') break case 500: - $message.error('服务器错误,请联系管理员!') + // 若服务出现问题 则无法执行后续操作,故此处判断提示为登录失败 + // $message.error('服务器错误,请联系管理员!') + $message.error('登录失败,请联系管理员!') break case 501: $message.error('网络未实现') diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index dc087ee..e819c07 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -201,7 +201,7 @@ const transform: AxiosTransform = { // eslint-disable-next-line ts/no-use-before-define const instance = http.getAxios() const config = response.config - const whitelist = ['/api/captcha/captchatoken', '/api/captcha/captchaImage', '/api/backstage/adminlogin', '/api/oauthweb/token','/api/web/smslogin/login','/api/web/smslogin/sendcode'] + const whitelist = ['/api/captcha/captchatoken', '/api/captcha/captchaImage', '/api/backstage/adminlogin', '/api/oauthweb/token','/api/web/smslogin/login','/api/web/smslogin/sendcode','/api/ocr/sUser/selectSUser'] const expirationTime = storage.get(TOKEN_EXPIRATION_TIME) // console.log('剩余失效时间(分):', (expirationTime - Date.now()) / 1000 / 60, config.url) diff --git a/src/views/login/components/Forget.vue b/src/views/login/components/Forget.vue index 42a4aca..8607a51 100644 --- a/src/views/login/components/Forget.vue +++ b/src/views/login/components/Forget.vue @@ -203,6 +203,7 @@ function forget() { v-model:value="formForget.agentcode" class="item-input" placeholder="请输入企业编码" + maxlength="20" >