Bladeren bron

update 优化 更改方法命名避免误会

疯狂的狮子Li 3 maanden geleden
bovenliggende
commit
56bb05d547
2 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 2 2
      src/api/system/social/auth.ts
  2. 2 2
      src/views/login.vue

+ 2 - 2
src/api/system/social/auth.ts

@@ -1,7 +1,7 @@
 import request from '@/utils/request';
 
-// 绑定账号
-export function authBinding(source: string, tenantId: string) {
+// 获取跳转URL
+export function authRouterUrl(source: string, tenantId: string) {
   return request({
     url: '/auth/binding/' + source,
     method: 'get',

+ 2 - 2
src/views/login.vue

@@ -80,7 +80,7 @@
 
 <script setup lang="ts">
 import { getCodeImg, getTenantList } from '@/api/login';
-import { authBinding } from '@/api/system/social/auth';
+import { authRouterUrl } from '@/api/system/social/auth';
 import { useUserStore } from '@/store/modules/user';
 import { LoginData, TenantVO } from '@/api/types';
 import { to } from 'await-to-js';
@@ -215,7 +215,7 @@ const initTenantList = async () => {
  * @param type
  */
 const doSocialLogin = (type: string) => {
-  authBinding(type, loginForm.value.tenantId).then((res: any) => {
+  authRouterUrl(type, loginForm.value.tenantId).then((res: any) => {
     if (res.code === HttpStatus.SUCCESS) {
       // 获取授权地址跳转
       window.location.href = res.data;