登录-清除缓存的数据
This commit is contained in:
parent
22c377cd57
commit
a1c5236c8f
|
@ -2,7 +2,7 @@
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<div class="box-item desc">
|
<div class="box-item desc">
|
||||||
<div class="welcome">
|
<div class="welcome">
|
||||||
<p>欢迎登录 {{homeTitle}}</p>
|
<p>欢迎登录 {{ homeTitle }}</p>
|
||||||
</div>
|
</div>
|
||||||
<img class="welcome-img" :src="leftBg2" />
|
<img class="welcome-img" :src="leftBg2" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,46 +14,28 @@
|
||||||
<el-input v-model.trim="loginForm.username" placeholder="请输入用户名" />
|
<el-input v-model.trim="loginForm.username" placeholder="请输入用户名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password" style="margin-bottom: 15px">
|
<el-form-item prop="password" style="margin-bottom: 15px">
|
||||||
<el-input
|
<el-input v-model="loginForm.password" autocomplete="on" type="password" placeholder="请输入密码" />
|
||||||
v-model="loginForm.password"
|
|
||||||
autocomplete="on"
|
|
||||||
type="password"
|
|
||||||
placeholder="请输入密码"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="flex mb-5">
|
<div class="flex mb-5">
|
||||||
<el-checkbox v-model="loginForm.rememberMe" >记住密码</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe">记住密码</el-checkbox>
|
||||||
<!-- <el-checkbox >阅读并同意《xxx》</el-checkbox> -->
|
<!-- <el-checkbox >阅读并同意《xxx》</el-checkbox> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)"
|
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)">登录</el-button>
|
||||||
>登录</el-button
|
|
||||||
>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
|
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
|
||||||
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="RegisterModel(1)">注册账号</a>
|
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="RegisterModel(1)">注册账号</a>
|
||||||
|
|
|
|
||||||
<a class="hover:text-sky-500" style="margin-left: 10px;" @click="RegisterModel(2)">忘记密码</a>
|
<a class="hover:text-sky-500" style="margin-left: 10px;" @click="RegisterModel(2)">忘记密码</a>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog v-model="showDownLoading" width="500" :show-close="false" :close-on-click-modal="false"
|
||||||
v-model="showDownLoading"
|
:close-on-press-escape="false" align-center>
|
||||||
width="500"
|
<el-progress :text-inside="true" :stroke-width="22" :percentage="downloadProp" :show-text="false"
|
||||||
:show-close="false"
|
status="success" />
|
||||||
:close-on-click-modal="false"
|
|
||||||
:close-on-press-escape="false"
|
|
||||||
align-center
|
|
||||||
>
|
|
||||||
<el-progress
|
|
||||||
:text-inside="true"
|
|
||||||
:stroke-width="22"
|
|
||||||
:percentage="downloadProp"
|
|
||||||
:show-text="false"
|
|
||||||
status="success"
|
|
||||||
/>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--选择学科-->
|
<!--选择学科-->
|
||||||
<SelectSubject v-model="isSubject" :login-data="loginForm" />
|
<SelectSubject v-model="isSubject" :login-data="loginForm" />
|
||||||
|
@ -69,6 +51,7 @@ import leftBg2 from '@/assets/images/login/left-bg2.png'
|
||||||
import WindowTools from '@/components/window-tools/index.vue'
|
import WindowTools from '@/components/window-tools/index.vue'
|
||||||
import SelectSubject from '@/components/select-subject/index.vue'
|
import SelectSubject from '@/components/select-subject/index.vue'
|
||||||
import Register from './components/Register.vue'
|
import Register from './components/Register.vue'
|
||||||
|
import { sessionStore } from '@/utils/store'
|
||||||
|
|
||||||
const { session } = require('@electron/remote')
|
const { session } = require('@electron/remote')
|
||||||
const downloadProp = ref(0)
|
const downloadProp = ref(0)
|
||||||
|
@ -99,7 +82,7 @@ ipcRenderer.on('update-app-progress', (e, prop) => {
|
||||||
showDownLoading.value = prop !== 100
|
showDownLoading.value = prop !== 100
|
||||||
})
|
})
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
const RegisterModel = type =>{
|
const RegisterModel = type => {
|
||||||
RegModel.value.OpenModel(type)
|
RegModel.value.OpenModel(type)
|
||||||
}
|
}
|
||||||
//登录
|
//登录
|
||||||
|
@ -168,6 +151,13 @@ const setCookie = (name, value) => {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
localStorage.clear()
|
localStorage.clear()
|
||||||
|
sessionStore.set('subject', {
|
||||||
|
bookList: null,
|
||||||
|
curBook: null,
|
||||||
|
curNode: null,
|
||||||
|
defaultExpandedKeys: [],
|
||||||
|
subjectTree: []
|
||||||
|
})
|
||||||
getCookie()
|
getCookie()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -179,6 +169,7 @@ onMounted(() => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
|
|
||||||
.box-item {
|
.box-item {
|
||||||
width: 444px;
|
width: 444px;
|
||||||
height: 520px;
|
height: 520px;
|
||||||
|
|
Loading…
Reference in New Issue