“linengliang”
2023-11-02 afaaa390b00bee8aea26e5de978fdb19c82aaa8a
src/views/user/Login.vue
@@ -45,6 +45,8 @@
import LoginAccount from './LoginAccount'
import LoginPhone from './LoginPhone'
import store from '@/store'
import { getAction } from '../../api/manage'
export default {
    components: {
@@ -52,7 +54,8 @@
      TwoStepCaptcha,
      // ThirdLogin,
      LoginAccount,
      LoginPhone
      LoginPhone,
      store
    },
    data () {
      return {
@@ -65,6 +68,9 @@
          key:"",
          iv:"",
        },
        url:{
          getPrimaryInfo:"/sys/sysAnnouncementSend/getPrimaryInfo"
        }
      }
    },
    created() {
@@ -106,13 +112,27 @@
      },
      // 登录后台成功
      requestSuccess(loginResult){
        this.$router.push({ path: "/dashboard/analysis" }).catch(()=>{
        this.$router.push({ path: "/isps/userAnnouncement" }).catch(()=>{
          console.log('登录跳转首页出错,这个错误从哪里来的')
        })
        this.$notification.success({
          message: '欢迎',
          description: `${timeFix()},欢迎回来`,
        });
        var userId = store.getters.userInfo.id;
        let that = this;
        getAction(this.url.getPrimaryInfo,{userId:userId}).then(res=>{
            if(res.success){
                for(var i=0;i<res.result.length;i++){
                  that.$notification.success({
                    message: '最新未读消息【'+res.result[i].msgCategory+'】',
                    description:res.result[i].msgContent,
                    duration:60,
                    icon:<a-icon type="exclamation-circle" style="color:red" />,
                  });
                }
            }
        })
        // this.$refs.loginSelect.show(loginResult)
      },
      //登录后台失败
@@ -141,6 +161,7 @@
          message: '欢迎',
          description: `${timeFix()},欢迎回来`,
        });
      },
      stepCaptchaSuccess () {