From d0d67b90bc5808da88740dc81e4b3bcffbd482a5 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期一, 10 七月 2023 18:20:38 +0800
Subject: [PATCH] add 新增 请求加密传输 合并优化 !pr377

---
 src/views/login.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/views/login.vue b/src/views/login.vue
index af98f01..0ac655c 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -38,10 +38,10 @@
       </el-form-item>
       <div style="display: flex;justify-content: flex-end;flex-direction: row;">
         <el-button circle>
-          <svg-icon icon-class="qq" @click="doSocialLogin('QQ')" />
+          <svg-icon icon-class="qq" @click="doSocialLogin('qq')" />
         </el-button>
         <el-button circle>
-          <svg-icon icon-class="wechat" @click="doSocialLogin('Wechat')" />
+          <svg-icon icon-class="wechat" @click="doSocialLogin('wechat')" />
         </el-button>
         <el-button circle>
           <svg-icon icon-class="gitee" @click="doSocialLogin('gitee')" />
@@ -177,6 +177,12 @@
     }
   }
 }
+
+//妫�娴嬬鎴烽�夋嫨妗嗙殑鍙樺寲
+watch(() => loginForm.value.tenantId, (val: string) => {
+  Cookies.set("tenantId", loginForm.value.tenantId, { expires: 30 })
+});
+
 /**
  * 绗笁鏂圭櫥褰�
  * @param type
@@ -184,8 +190,9 @@
 const doSocialLogin = (type: string) => {
   authBinding(type).then((res: any) => {
     if (res.code === 200) {
-      window.location.href = res.msg;
-  } else {
+      // 鑾峰彇鎺堟潈鍦板潃璺宠浆
+      window.location.href = res.data;
+    } else {
       ElMessage.error(res.msg);
     }
   });

--
Gitblit v1.9.3