src/api/login.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/layout/components/SocialCallback/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/permission.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/router/index.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/login.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/user/profile/thirdParty.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/login.ts
@@ -2,7 +2,9 @@ import { AxiosPromise } from 'axios'; import { LoginData, LoginResult, VerifyCodeResult, TenantInfo } from './types'; import { UserInfo } from '@/api/system/user/types'; import { da } from 'element-plus/es/locale'; // pc端åºå®å®¢æ·ç«¯ææid const clientId = 'e5cd7e4891bf95d1d19206ce24a7b32e'; /** * @param data {LoginData} @@ -11,7 +13,7 @@ export function login(data: LoginData): AxiosPromise<LoginResult> { const params = { ...data, clientId: data.clientId || 'e5cd7e4891bf95d1d19206ce24a7b32e', clientId: data.clientId || clientId, grantType: data.grantType || 'password' }; return request({ @@ -59,14 +61,14 @@ timeout: 20000 }); } /** * ç¬¬ä¸æ¹ç»å½ * @param source ç¬¬ä¸æ¹ç»å½ç±»å * */ */ export function callback(data: LoginData): AxiosPromise<any> { const LoginData = { ...data, clientId: 'e5cd7e4891bf95d1d19206ce24a7b32e', clientId: clientId, grantType: 'social' }; return request({ src/layout/components/SocialCallback/index.vue
ÎļþÃû´Ó src/layout/components/SocialLogin/index.vue ÐÞ¸Ä @@ -1,5 +1,5 @@ <template> <div v-loading="loading" class="social-login"></div> <div v-loading="loading" class="social-callback"></div> </template> <script setup lang="ts"> src/permission.ts
@@ -10,7 +10,7 @@ import usePermissionStore from '@/store/modules/permission'; NProgress.configure({ showSpinner: false }); const whiteList = ['/login', '/register', '/social-login']; const whiteList = ['/login', '/register', '/social-callback']; router.beforeEach(async (to, from, next) => { NProgress.start(); src/router/index.ts
@@ -38,9 +38,9 @@ ] }, { path: '/social-login', path: '/social-callback', hidden: true, component: () => import('@/layout/components/SocialLogin/index.vue') component: () => import('@/layout/components/SocialCallback/index.vue') }, { path: '/login', src/views/login.vue
@@ -4,8 +4,7 @@ <h3 class="title">RuoYi-Vue-Pluså¤ç§æ·ç®¡çç³»ç»</h3> <el-form-item prop="tenantId" v-if="tenantEnabled"> <el-select v-model="loginForm.tenantId" filterable placeholder="è¯·éæ©/è¾å ¥å ¬å¸åç§°" style="width: 100%"> <el-option v-for="item in tenantList" :key="item.tenantId" :label="item.companyName" :value="item.tenantId"></el-option> <el-option v-for="item in tenantList" :key="item.tenantId" :label="item.companyName" :value="item.tenantId"></el-option> <template #prefix><svg-icon icon-class="company" class="el-input__icon input-icon" /></template> </el-select> </el-form-item> @@ -15,14 +14,12 @@ </el-input> </el-form-item> <el-form-item prop="password"> <el-input v-model="loginForm.password" type="password" size="large" auto-complete="off" placeholder="å¯ç " @keyup.enter="handleLogin"> <el-input v-model="loginForm.password" type="password" size="large" auto-complete="off" placeholder="å¯ç " @keyup.enter="handleLogin"> <template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template> </el-input> </el-form-item> <el-form-item prop="code" v-if="captchaEnabled"> <el-input v-model="loginForm.code" size="large" auto-complete="off" placeholder="éªè¯ç " style="width: 63%" @keyup.enter="handleLogin"> <el-input v-model="loginForm.code" size="large" auto-complete="off" placeholder="éªè¯ç " style="width: 63%" @keyup.enter="handleLogin"> <template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template> </el-input> <div class="login-code"> @@ -193,7 +190,8 @@ const doSocialLogin = (type: string) => { authBinding(type).then((res: any) => { if (res.code === 200) { window.location.href = res.msg; // è·åææå°å跳转 window.location.href = res.data; } else { ElMessage.error(res.msg); } src/views/system/user/profile/thirdParty.vue
@@ -80,7 +80,7 @@ const authUrl = (source: string) => { authBinding(source).then((res: any) => { if (res.code === 200) { window.location.href = res.msg; window.location.href = res.data; } else { ElMessage.error(res.msg); }