src/views/user/Login.vue
@@ -49,6 +49,10 @@
        </a-button>
      </a-form-item>
      <a-form-model-item style="color: red">
        密级:内部&nbsp;&nbsp;&nbsp;&nbsp;警告:本系统禁止存储、处理、传输涉密信息
      </a-form-model-item>
    </a-form-model>
    <!--<two-step-captcha v-if="requiredTwoStepCaptcha" :visible="stepCaptchaVisible" @success="stepCaptchaSuccess" @cancel="stepCaptchaCancel"></two-step-captcha>-->
@@ -57,6 +61,7 @@
      @success="loginSelectOk"
    ></login-select-tenant>
    <!--<third-login ref="thirdLogin"></third-login>-->
    <user-password ref="userPassword"/>
  </div>
</template>
@@ -73,9 +78,11 @@
import LoginPhone from './LoginPhone'
import store from '@/store'
import { getAction } from '../../api/manage'
import UserPassword from '../../components/tools/UserPassword'
export default {
  components: {
    UserPassword,
    LoginSelectTenant,
    TwoStepCaptcha,
    // ThirdLogin,
@@ -138,7 +145,10 @@
    },
    // 登录后台成功
    requestSuccess(loginResult) {
      this.$router.push({ path: "/isps/userAnnouncement" }).catch(() => {
      // this.$router.push({ path: "/isps/userAnnouncement" }).catch(() => {
      //   console.log('登录跳转首页出错,这个错误从哪里来的')
      // })
      this.$router.push({ path: "/dashboard/analysis" }).catch(() => {
        console.log('登录跳转首页出错,这个错误从哪里来的')
      })
      this.$notification.success({
@@ -162,17 +172,29 @@
      // this.$refs.loginSelect.show(loginResult)
    },
    //登录后台失败
    requestFailed(err) {
    requestFailed(err,username) {
      let description = ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试"
      this.$notification['error']({
        message: '登录失败',
        description: description,
        duration: 4,
      });
      //账户密码登录错误后更新验证码
      if (this.customActiveKey === 'tab1' && description.indexOf('密码错误') > 0) {
        this.$refs.alogin.handleChangeCheckCode()
      if(err.code!==5001&&err.code!==5002){
        this.$notification['error']({
          message: '登录失败',
          description: description,
          duration: 4,
        });
      }else{
        this.$notification['warning']({
          message: '提示',
          description: description,
          duration:1,
          onClose:()=>{
            console.log('err',err)
            this.$refs.userPassword.show(username)
          }
        });
      }
      //账户密码登录错误后更新验证码
      // if (this.customActiveKey === 'tab1' && description.indexOf('密码错误') > 0) {
      //   this.$refs.alogin.handleChangeCheckCode()
      // }
      this.loginBtn = false;
    },
    loginSelectOk() {