Merge branch 'dev'
This commit is contained in:
commit
1d94d571d1
@ -57,8 +57,8 @@ const login = async (formRef: any) => {
|
||||
// 初始化密码管理器
|
||||
console.log('cos 登录 初始化密码管理器')
|
||||
passwordStore.passwordManager.login(database).then((resp: RespData) => {
|
||||
loginStore.logging = false
|
||||
if (!resp.status) {
|
||||
loginStore.logging = false
|
||||
console.log('cos 登录 登录失败: ', resp)
|
||||
ElNotification.error({title: '登录失败', message: resp.message})
|
||||
return
|
||||
|
@ -61,8 +61,8 @@ const login = async (formRef: any) => {
|
||||
// 初始化密码管理器
|
||||
console.log('oss 登录 初始化密码管理器')
|
||||
passwordStore.passwordManager.login(database).then((resp: RespData) => {
|
||||
loginStore.logging = false
|
||||
if (!resp.status) {
|
||||
loginStore.logging = false
|
||||
console.log('oss 登录 登录失败: ', resp)
|
||||
ElNotification.error({title: '登录失败', message: resp.message})
|
||||
return
|
||||
|
@ -56,8 +56,8 @@ const login = async (formRef: any) => {
|
||||
// 初始化密码管理器
|
||||
console.log('private 登录 初始化密码管理器')
|
||||
passwordStore.passwordManager.login(database).then((resp: RespData) => {
|
||||
loginStore.logging = false
|
||||
if (!resp.status) {
|
||||
loginStore.logging = false
|
||||
console.log('private 登录 登录失败: ', resp)
|
||||
ElNotification.error({title: '登录失败', message: resp.message})
|
||||
return
|
||||
|
@ -18,6 +18,7 @@ const router = createRouter({
|
||||
router.beforeEach((to, from, next) => {
|
||||
console.log('路由变化:', from.path, to.path)
|
||||
if (to.path === "/login" || to.path === "/test") {
|
||||
useLoginStore().logging = false
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ export const useLoginStore = defineStore('loginStore', {
|
||||
return {
|
||||
loginType: '',
|
||||
logging: false,
|
||||
loggingText: '正在登录...',
|
||||
loginForm: null
|
||||
}
|
||||
},
|
||||
|
@ -344,6 +344,8 @@ export interface LoginStore {
|
||||
loginType: string,
|
||||
// 登陆中
|
||||
logging: boolean,
|
||||
// 登陆提示文本
|
||||
loggingText: string,
|
||||
// 登录表单
|
||||
loginForm: any,
|
||||
}
|
@ -64,7 +64,7 @@ initForm()
|
||||
<TextLine class="select-type-tip" text="请选择登录方式"></TextLine>
|
||||
<LoginType @loginTypeChange="loginTypeChange"></LoginType>
|
||||
</div>
|
||||
<div v-else class="sliding-element" v-loading="loginStore.logging" element-loading-text="正在登录...">
|
||||
<div v-else class="sliding-element" v-loading="loginStore.logging" :element-loading-text="loginStore.loggingText">
|
||||
<div style="padding: 8px">
|
||||
<el-link v-if="loginStep === 2" @click="loginStep = 1" type="primary" :underline="false">
|
||||
<span class="iconfont icon-back login-back"></span>返回
|
||||
@ -100,7 +100,7 @@ initForm()
|
||||
<TextLine style="margin-top: 20px;margin-bottom: 0" text="请选择登录方式"></TextLine>
|
||||
<LoginType @loginTypeChange="loginTypeChange"></LoginType>
|
||||
</div>
|
||||
<div class="login-form-card" v-else v-loading="loginStore.logging" element-loading-text="正在登录...">
|
||||
<div class="login-form-card" v-else v-loading="loginStore.logging" :element-loading-text="loginStore.loggingText">
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :span="22" :offset="1">
|
||||
<OSSLoginForm v-if="loginStore.loginType === 'oss'"></OSSLoginForm>
|
||||
|
Loading…
x
Reference in New Issue
Block a user