From e5c6e235ae60d90f075b24c5d87c5d2902a42171 Mon Sep 17 00:00:00 2001 From: xyc <3422692813@qq.com> Date: Wed, 18 Jun 2025 17:49:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.js | 8 +++++--- src/views/login.vue | 43 +++++++++++++++++++++++++++++++++++++------ 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/api/login.js b/src/api/login.js index 4be9d0d..7026f28 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -150,8 +150,10 @@ export class socialBindLogin { export function getUserTenant(data) { return request({ - url: '/system/auth/getTenant', - method: 'post', - data: data + url: '/system/auth/getListByPhone', + method: 'get', + params: { + phone: data + } }) } diff --git a/src/views/login.vue b/src/views/login.vue index d8cb2d7..8f148ee 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -96,6 +96,18 @@ + + + {{item.name}} + + + 取 消 + 确 定 + + { console.log("登录", this.loginForm) @@ -259,12 +283,11 @@ export default { removeRememberMe() removeTenantName() } - this.loginForm.captchaVerification = captchaParams.captchaVerification + if (captchaParams){ + this.loginForm.captchaVerification = captchaParams.captchaVerification + } //获取当前登陆人的租户 - await getUserTenant(this.loginForm).then(res => { - console.log('当前登陆人信息', res) - setTenantId(res.data.tenant_id) - }); + // 发起登陆 // console.log("发起登录", this.loginForm); this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => { @@ -276,6 +299,14 @@ export default { } }); }, + async getTenantList(){ + await getUserTenant(this.loginForm.username).then(res => { + console.log('当前登陆人信息', res) + // setTenantId(res.data.tenant_id) + this.tenantList = res.data + }); + this.showTenantList = true + }, async doSocialLogin(socialTypeEnum) { // 设置登录中 this.loading = true;