点击登录
跳出一个弹窗
然后点击里面的某条应用就可进去
但是现在,弹窗出来之后,我刷新页面就直接进入到了主页
想实现,刷新之后还是现在的这个页面,希望大家可以给一点逻辑
<template>
<div>
<div class="login-wrapper">
<div class="login-main">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" label-position="top">
<div class="title-div">
<img class="title-img" src="../assets/images/MS-LOGO.png">
<span class="title-span">管理系统</span>
<div class="title-line"></div>
</div>
<el-form-item label="登录账号" prop="username" class="login-form-item">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号" size="large"
@mouseenter.native="inputLineBright" @mouseleave.native="inputLineDim">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/>
</el-input>
<div class="input-line"></div>
</el-form-item>
<el-form-item label="密码" prop="password" class="login-form-item">
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" size="large"
@keyup.enter.native="handleLogin" @mouseenter.native="inputLineBright"
@mouseleave.native="inputLineDim">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
</el-input>
<div class="input-line"></div>
</el-form-item>
<el-form-item label="验证码" prop="code" class="login-form-item">
<el-input v-model="loginForm.code" auto-complete="off" placeholder="请输入验证码" style="width: 63%" size="large"
@keyup.enter.native="handleLogin" @mouseenter.native="inputLineBright"
@mouseleave.native="inputLineDim">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon"/>
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div>
<div class="input-line"></div>
</el-form-item>
<el-checkbox class="login-form-checkbox" v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">
记住密码
</el-checkbox>
<el-form-item class="login-form-btn">
<el-button
:loading="loading"
size="medium"
type="primary"
style="width:100%;"
@click.native.prevent="handleLogin"
>
<span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span>
</el-button>
</el-form-item>
</el-form>
<el-dialog :title="title" :visible.sync="loginOpen" width="800px" :close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="80px">
<el-row>
<el-col :span="8">
<el-form-item label="应用名称" prop="aplNm">
<el-input v-model="form.aplNm" placeholder="请输入应用名称"/>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="" round>搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="" round>重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table v-loading="loading" :data="aplList" highlight-current-row
@current-change="handleCurrentChange" @row-dblclick="submitForm">
<el-table-column label="应用ID" align="center" prop="aplEcd" />
<el-table-column label="应用名称" align="center" prop="aplNm" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
<!-- 底部 -->
<div class="login-footer">
<span>Copyright © 2018-2022</span>
</div>
</div>
</div>
</template>