src/views/user/Login.vue
@@ -61,6 +61,7 @@
      @success="loginSelectOk"
    ></login-select-tenant>
    <!--<third-login ref="thirdLogin"></third-login>-->
    <user-password ref="userPassword"/>
  </div>
</template>
@@ -77,11 +78,11 @@
import LoginPhone from './LoginPhone'
import store from '@/store'
import { getAction } from '../../api/manage'
import AFormModelItem from 'ant-design-vue/es/form-model/FormItem'
import UserPassword from '../../components/tools/UserPassword'
export default {
  components: {
    AFormModelItem,
    UserPassword,
    LoginSelectTenant,
    TwoStepCaptcha,
    // ThirdLogin,
@@ -144,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({
@@ -168,13 +172,25 @@
      // 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(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()