gaoluyang
2025-03-21 f9d1ac78b245cb672342e96cf0e905b812352651
src/views/login.vue
@@ -38,7 +38,7 @@
            <router-link class="link-type" :to="'/register'">立即注册</router-link>
          </div>
        </el-form-item>
        <el-button v-if="false" type="primary" plain @click="goLogin">集团集成登录</el-button>
        <el-button v-if="true" type="primary" plain @click="goLogin">集团集成登录</el-button>
      </el-form>
    </div>
    <!--  底部  -->
@@ -96,11 +96,9 @@
  },
  methods: {
    async goLogin() {
      const {
        data: { data },
      } = await getSsoAuthUrl()
      window.location.href = data
      // this.$router.push({ path: '/thirdpartylogin' })
      await getSsoAuthUrl().then(res => {
        window.location.href = res.data
      })
    },
    getCode() {
      getCodeImg().then(res => {
@@ -135,7 +133,7 @@
            Cookies.remove('rememberMe');
          }
          this.$store.dispatch("Login", this.loginForm).then(() => {
            this.$router.push({ path: this.redirect || "/" }).catch(() => { });
            this.$router.push({ path: "/" }).catch(() => { });
          }).catch(() => {
            this.loading = false;
            if (this.captchaEnabled) {
@@ -150,14 +148,14 @@
</script>
<style rel="stylesheet/scss" lang="scss">
//.login {
//  display: flex;
//  justify-content: center;
//  align-items: center;
//  height: 100%;
//  background-image: url("../assets/images/login-background.jpg");
//  background-size: cover;
//}
.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background-image: url("../assets/images/login-background.jpg");
  background-size: cover;
}
.login {
  width: 100vw;
  height: 100vh;