feat: 修改axios实例bug,调整登录Input的maxlength

pull/1/head
刘释隆 1 year ago
parent b4a7552917
commit e417bd6251

@ -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('网络未实现')

@ -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)

@ -203,6 +203,7 @@ function forget() {
v-model:value="formForget.agentcode"
class="item-input"
placeholder="请输入企业编码"
maxlength="20"
>
<template #prefix>
<svg-icon size="20" name="enterprise" />
@ -214,6 +215,7 @@ function forget() {
v-model:value="formForget.loginname"
class="item-input"
placeholder="请输入用户名"
maxlength="16"
>
<template #prefix>
<svg-icon size="20" name="account" />
@ -225,6 +227,7 @@ function forget() {
v-model:value="formForget.phone"
class="item-input"
placeholder="请输入手机号"
maxlength="11"
>
<template #prefix>
<img
@ -239,7 +242,7 @@ function forget() {
<n-form-item class="form-item" path="phonecode">
<n-input
v-model:value="formForget.phonecode"
maxlength="6"
maxlength="4"
class="item-input"
placeholder="请输入验证码"
clearable
@ -254,7 +257,7 @@ function forget() {
</template>
<template #suffix>
<div
:class="{ 'code-count': countTime !== '获取验证码' }"
:class="{ 'code-count': countTime !== '获取验证码'|| !(formForget.phone.length == 11) }"
class="code"
@click="sendCode"
>

@ -413,7 +413,7 @@ function forget() {
<n-form-item class="form-item" path="phonecode">
<n-input
v-model:value="formSms.phonecode"
maxlength="6"
maxlength="4"
class="item-input"
placeholder="请输入验证码"
clearable

Loading…
Cancel
Save