From cce94447499a38569fdc4a609e92858188423068 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期六, 15 三月 2025 13:57:50 +0800
Subject: [PATCH] 单点登录方法获取调整
---
src/views/login.vue | 10 ++++------
src/views/logindemo.vue | 7 +++----
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/views/login.vue b/src/views/login.vue
index 2590586..ee20b62 100644
--- a/src/views/login.vue
+++ b/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 => {
diff --git a/src/views/logindemo.vue b/src/views/logindemo.vue
index 6e71c49..1798948 100644
--- a/src/views/logindemo.vue
+++ b/src/views/logindemo.vue
@@ -13,10 +13,9 @@
computed: {},
methods: {
async goLogin() {
- const {
- data: { data }
- } = await getSsoAuthUrl()
- window.location.href = data
+ await getSsoAuthUrl().then(res => {
+ window.location.href = res.data
+ })
}
}
}
--
Gitblit v1.9.3