浏览代码

登录异常时自动刷新图像验证码

yujinwen 3 月之前
父节点
当前提交
fafdee50f1
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/views/login/hooks/useLogin.js

+ 4 - 1
src/views/login/hooks/useLogin.js

@@ -26,7 +26,10 @@ export function useLogin(){
             TelAreaCode:areaCode+''||'',
             Source:source
         })
-        if(res.Ret!==200) return 
+        if(res.Ret!==200) {
+            getPicCode()
+            return 
+        }
         showToast('验证码已发送')
         //60秒倒计时
         codeCountDown.value = 60